Jump to content
GreenSock

Mr Pablo

Flex Mobile, Videos and StageVideo

Recommended Posts

Videos played with LoaderMax isndie a Flex Mobile app are stuttering quite badly on a HDMI Android stick I am using for development.

 

To see if it helps, I am trying to utilise StageVideo, yet I'm struggling to find a good, complete example.

 

I understand LoaderMax's support of StageVideo is fairly new, but I need some help getting it to work.

 

I am using:

 

var v:Vector.<StageVideo> = stage.stageVideos;
                                    if ( v.length >= 1 )       
                                    {       
                                        stageVideo = v[0];       
                                    }
                                    stageVideo.viewPort = new Rectangle(0, 0, 1280, 720);
                                    
                                    stageVideo.attachNetStream(currentAsset.netStream);
                                    currentAsset.netStream.resume();
 

to play my video.

 

How do i detect the end of the video?

 

My previous method was to use:

 

 

 

currentAsset.addEventListener(VideoLoader.VIDEO_COMPLETE, onVideoComplete);
 

Would this work for StageVideo and netStream?

 

EDIT - turns out using StageVideo doesn't even load the video on the HDMI stick. Could this be due to it not being very powerful?

 

I moved to StageVideo as the stick was sturggling with videos that play 100% fine in the system video player. Is there anyway to get smooth playback in Flex Mobile on Android, with or without Stagevideo?

Link to comment
Share on other sites

I wish I could help more, but I'm not a Flex guy at all - I have tried to avoid it because...well, a lot of reasons (performance being one of them). I'd suggest trying to create the most bare-bones example you possibly can (without even using LoaderMax/VideoLoader). Then, build up from there. If you find that you can't even do a simple standalone StageVideo NetStream, then at least you'll know the issue has nothing to do with VideoLoader and you don't need to spin your wheels there. 

 

And for the record, you can define a stageVideo in the VideoLoader's constructor and the VideoLoader will put the NetStream there instead of into a Video instance. See the docs: 

http://api.greensock.com/as/ That way, you can listen for all the regular events on the VideoLoader (you asked about sensing when it's complete) and you can control it accordingly too. 

Link to comment
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.
×