Hello Matt,
Thanks for joining the Hangout today, and for putting together this
thorough example. I'm passing it along to our Players engineering team
now for further investigation, and I'll update this thread when I hear
back.
Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
On Apr 25, 2:06 pm, Matthew Woomer <m...@bluemammothgames.com> wrote:
> Hi Jeff,
>
> Thanks for hosting the hangout! I attached the code we took a look at in
> the hangout:
>
> The AS3 Youtube player won't unload with the destroy code below, causing a
> memory leak. I've attached a very simple runnable example of the problem
> with the code. Click the blue button to load and unload the video (let the
> player fully load, I removed the player-not-yet-loaded checks for
> readability)
>
> Here is the relevant AS3 unloading code, in case anyone could see a problem
> on my end with it:
> if (mVideoLoader)
> {
> mVideoLoader.
> contentLoaderInfo.removeEventListener(Event.INIT, LoaderInitHandler);
>
> mVideoLoader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,
> LoaderNoOp);
>
> mVideoLoader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECUR ITY_ERROR,
> LoaderNoOp);
>
> var player:Object = mVideoLoader.content;
> player.removeEventListener("onReady", PlayerReadyHandler);
> player.stopVideo();
> player.destroy();
> player = null;
>
> mVideoLoader.unloadAndStop(true);
>
> if (mVideoLoader.parent)
> mVideoLoader.parent.removeChild(mVideoLoader);
>
> mVideoLoader = null;
> }
>
> My current best guess is that the loader is a victim of this Flash bug:https://bugbase.adobe.com/index.cfm?event=bug&id=3071138in which case the
> workaround in the player would be very simple.
>
> Thanks, Matt Woomer
>
> Main.as
> 5KViewDownload
>
> VimeoPlayer.as
> 12KViewDownload
>
> VideoAbout.swf
> 8KViewDownload
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment