Nov 06 2008

Difference in Netstream behavior

Published by at 4:35 pm under AS 3.0

My post about problems with Flex Videodisplay component has been the most viewed post. All this while the alternative video component i created was used with wowza streaming server. It was a Flex Component and wasn’t just pure Flash i.e. not using Flex Framework classes.

 

I had to create a Flash only AS3 Videoplayer component which would work with both the streaming server and also play normal flv files like youtube does.

 

I came across a very interesting Netstream problem, While playing local files the netstream would broadcast “NetStream.Play.Stop” fine but when i was streaming the flv files the broadcast of “NetStream.Play.Stop” would happen few seconds before the movie actually was supposed to stop. 

 

Sometimes it would be 20 seconds before the movie would stop playing, so if you are streaming flv files and need to know when exactly the movie ends, you should be using “onPlayStatus”. This is sent by the server whenever the playback movie ends. 

 

This can be implemented in the same way as one would implement “onMetaData” or “OnCuePoint” listeners. Hope this post helps you if you are planning to write a generic Flash AS3 videoplayer. 

 

No responses yet

Trackback URI | Comments RSS

Leave a Reply