For anyone interested in using Stage3D and StageVideo together here is a video of an app I built using Feathers:
I enjoyed that
Nice one! How do you "hide" Starling instance when jumping to StageVideo? Do you move it behind the scenes or stop/dispose it?
It really works well. Great work!
I would just have a question, when the app is loaded, then you are loading the images, then it is freezing while you upload them to the graphic card ? Because you never navigate until all the assets are uploaded to the graphic card.( it's what i felt watching the video ).
I just hide it and disable touch:
this._starling.stage3D.visible = false;
this._starling.stage.touchable = false;
player.visible = true;
If you don't set touchable to false the lists will still receive touch events even while hidden.
You are correct. In the description for the video I mentioned that the framerate was 50+ after the content loaded. Uploading all of those textures has a significant impact on the framerate. It would be great to be able to do this on a separate thread.
This is just a sample app, so I haven't done any optimizations. If I were going to make it into an app for release I would probably do the following:
1. Only load the images that are visible. Right now the scroll container loads all of the lists at start up.
2. Freeze texture uploading while scrolling
3. Stop the list from recycling renderers (right now the list reloads items every time they are brought back into view).
4. Keep the splash screen up until the initial set of images have loaded.
Stop the list from recycling renderers (right now the list reloads items every time they are brought back into view)
Recycling renderers is very important for performance on mobile. Depending on how many items are in the list, you might be able to cache the item data to reuse it.
Agreed. I should have said that I wanted to stop it from continually disposing and reloading textures while scrolling. I just ran some tests where I created a simple class that caches the Images components and reuses them. The list scrolling is now pretty close to being perfectly smooth. I see the framerate drop 1-5 fps now while scrolling, whereas before it was dropping 20-30 fps.
Thank you for posting this as a shining example of "It's possible! StageVideo + Starling + streaming + h.264 IS POSSIBLE!"
There is a ton of information fragmentation about this topic right now. But I'm happy to see your implementation working so well !
With your hints and help, I *JUST* got my implementation working...on device! Thanks
To anyone still working things out, this link helped a lot:
And some old links, helpful, but outdated:
Hi, great work!
I saw that your using a splash screen => how did you implement it on Android ?
Nothing complicated. When the application loads I add the splash screen to the regular display list. Then when Starling is ready, I remove it:
private function onRootCreated(e:Object):void
Hi Derek, thanks for sharing this
I'm attempting to play StageVideo under Starling and wondering about 2 things
1- I don't see any 'touchable' property on the Starling stage object, so I'm not sure what that code refers to.
2- (most important) How do you "clear" StageVideo away when the video is finished? I am trying some things like closing the NetStream and setting my StageVideo object to null - but the problem is that StageVideo simply existing in the app seems to disrupt Starling visuals ... mostly the native overlay. I'm seeing black squares behind certain elements, and text is washed out completely by black squares.
Interestingly, the 'black squares' in the overlay don't appear while the StageVideo is actually playing, only when the video has been stopped or hasn't started yet.
(above problem is seen running on iPhone 4, air 3.5)
If I don't execute any code related to StageVideo, the native overlay is fine.
So the question is - how to really hide or dispose of StageVideo ?
Here is the property I was using:
I don't really ever get the StageVideo to clear, it is just covered up when it is hidden.
Is your overlay transparent? I have seen issues before when using StageVideo and transparent components.
Also, I doubt this will make much difference, but I am not using Starling's nativeOverlay. I am adding objects directly to the display list.
Great project example!
We're having a problem though, because the StageVideoAvailability.AVAILABLE is always 'false'. Render mode is set to 'direct', AIR 3.6 SDK, Flash Player 11 and we attempted debugging through Android simulator, iOS simulator, as well as directly on Android devices.
What else is missing? =(
hello. how you fix the lost context? it's always appear when i use fullscreen video.
You must log in to post.