Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
zroobavela

video starts playing before it's visible (I see a temporary white screen)

Recommended Posts

Hey there

 

I'm using video loader to load a video. While this is happening, I have some other image covering the screen.

 

I add the video to the stage, I wait until the load is complete, autoplay is false, buffertime is huge. When loading is complete, I start playing and hide the cover image. 

 

My problem is that I see a white screen for a few milliseconds before the video appears.

 

 

onComplete() :void {

coverScreen.visible = false;

video.playVideo();

}

 

I tried to mitigate this problem by moving the oncomplete code to some cuepoint at the beginning of the video, but the cuepoint needs to be at time > 0.5 seconds before the problem goes away. this is too long.

 

When can I guarantee that the video will be visible? what event should I be listening to? 

 

VideoLoader.PLAY doesn't seem to do the trick.

 

thanks.

 

 

Link to post
Share on other sites

Hi and welcome to the GreenSock forums.

 

Have you tested with other video files? I would suggest trying a very small video (in both filesize and dimensions) just as a simple test to see if cpu-strain or something is at play here.

Link to post
Share on other sites

This issue occurs with small videos as well as large. I am pre loading the video. So I believe this is to do with a known flash weirdness of video not rendering when attaching and pausing immediately. An issue greensock claims it handles using _video.cacheAsBitmap = false

 

Is there any underlying netstream event I can listen to that will guarantee to trigger when video is rendered or shortly thereafter?

 

thanks!

Link to post
Share on other sites

Adobe's NetStream class has the most buggy behavior of anything I've seen (other than Flex), so I'm not entirely confident there's a "bulletproof" way to tell when things actually get rendered to the screen through a NetStream that's being displayed in a Video object. If you want to access a particular NetStream event, you can add a listener to the VideoLoader's netStream. Or the rawContent is a "Video" object in case you want to tap directly into that. 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×