I am working on a project that requires me to embed metadata on the fly with a recorded stream from a webcam. I am utilizing Flash Builder 4.5.1 creating a mobile project. I am using a simple netStream.send function to set the metadata I want. This works just fine until my netstream time goes over around 10 seconds, then the function ceases to work or will not embed into the video. All my connections are correct and I can record to the Flash Media Server
The only thing I can think of is that my Flash Media Server 4 Developer is being over loaded and does not compute the metadata I send.
Any ideas would greatly help.
private function sendMetadata():void {
infotxt.text += 'called';
trace("sendMetaData() called")
myMetadata = new Object();
myMetadata.customProp = "This message is sent by @setDataFrame.";
myMetadata.customOther = cueHolder;
ns.send("@setDataFrame", "onMetaData", myMetadata);
}
And here is my onMetaData function
public function onMetaData(info:Object):void {
trace("caught");
infotxt.text = 'caught';
var key:String;
for (key in info){
outputWindow.text +=(key + ": " + info[key] + "\n");
}
//cueHolderReturn = info.customOther;
for (var i:int = 0; i < info.customOther.length; i++)
{
infotxt.text += info.customOther[i]
}
//infotxt.text = info.customOther[0];
}
ns.send("@clearDataFrame", "onMetaData");
(also add a validation forinfo == null
on onMetaData). – Frederic