Much resently video and audio streaming has become very popular. Most clients want pre-roll and post-roll functions. pre-roll is when video or audio ads play before the main video or audio plays. post-roll is when a video pauses in the middle playing an ad roll before continuing to the end.
I have a live stream application thats a combination of the Php, xml, flash live encoder, flash media server and flash 8 application with some actionscript 2.0.
The actionscript code plays the live video from the flash live encoder fine. Now I am trying to load post-roll video ads using Php, xml so that the videos are played in 15 minute intervals.To get the the 15 minute interval I use action-scipt setInterval function.
The problem I am having is how to mute and load the advert video clips over the live stream when its muted.The plan is play the imported video ads one after the other. After the last video plays I would like to un-mute the livestream to continue untill the next interval.
//This is some prototype code. I have been trying to read the xml videos but not sure how to get them to play one after the other before unmuting the live stream and waiting for the next interval to load other video ad breaks.
myVideo.isLive = true;
//interval untill mute and video ads then loaded.
setInterval( 100000, toExecute);
var urls:Array = ;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = parseXML;
//Trying to play one after the other video ads on the holder movie object. And how to un mute the live stream so the live stream plays on.
//Holder is the mask canvas that hovers over the live stream after the interval has reach
Hope you can help.