We are interested in streaming flash like a tv station on our website. We have a 35 minute loop that we would like to set up as streaming on our homepage, so a visitor will hit whatever random part of the loop is playing when they log onto the site, much as a tv channel surfer switches into whatever random part of a tv program is on a network when they switch the tv tuner to it. I've surfed the net and had a hard tome coming up with any explanation as how to do this. Video on demand (clicking a play button to start a particular video from the beginning is relatively easy), but setting up a constant, tv-channel-like stream, I'm having a hard time finding. Thanks for all your help in advance. Reid
What you want to do is set up a server side stream, and then play a list of flv files over that stream. See the docs for the server side Stream class to see how. Now that we have the playing part done, we need to think about the looping part. What you want to do use the Stream.onSync method to watch for the netstream.buffer.empty and netstream.buffer.flush information object codes. Once the buffer is both empty and flushed, you'll know there's not more video left, so it's time to start the loop over. Now, if you want to keep the loop running all the time (so the timeline is maintined even if there's nobody connect to the app) you can do one of two things... either build a function to keep track of the time (so you can start the playlist from a specific point), or you can just prevent the application instance from shutting down (create an application.onAppStop method that returns false).
Don't see what you're looking for? Try a search.
|