There is a lot involved in trying to do something like this. Injecting cuepoints in each stream server-side in some way that can be used to sync them later (server timecode or markers added by user action, perhaps), reading them in Flash Actionscript, and using that info to sync in the client. We don’t have any examples of this at the moment but obviously it would involve monitoring these cuepoints in each stream the probably using NetStream.seek() commands to make adjustments, e.g. catch streams up that are have fallen behind. I’m sure there are many approaches.
To read in Flash you have to have a callback that matches the signature of the cuepoint. Feferring to the example cuepoint in the cuepoint injection article linked above, it is named “onTextData”, it is packaged in an AMFDataMixedArray and contains 3 fields or properties: text, language and trackid
AMFDataMixedArray data = new AMFDataMixedArray();
data.put("text", new AMFDataItem(text));
data.put("language", new AMFDataItem(language));
data.put("trackid", new AMFDataItem(trackid));
stream.sendDirect("onTextData", data);
On the Flash side you need a callback with matching name and Object (corresponding to the AMFDataMixedArray), which will contain the text, language and trackid data. This is created using the NetStream:
var nsPlayClientObj:Object = new Object();
nsPlay = new NetStream(nc);
nsPlay.client = nsPlayClientObj;
nsPlayClientObj.onTextData = function(obj:Object):void
{
trace(obj.text);
trace(obj.language);
trace(obj.trackid);
}
nsPlay.play("syncme.mp4");
If you are going to mark cuepoints by user action, you need a Flash client that plays the live stream with NetStream.bufferLength set to 0 and controls (button, data inputs) and Actionscript methods to use NetConnection.call() to call server-side callback functions. The ServerSideModules example that ships with Wowza in the /examples folder is a working reference of all these methods.
Richard