Sending metaData with netStream.send is not working
I'm trying to send metaData from client to FMS server when recording Webcam video and have implemented sending of metaData as stated on Adobe's help page at: http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7ff6.html
However when I play the recorded video from FMS, my custom metaData properties trace "undefined". I can trace default metaData properties such as duration or videocodecid successfully, but not my custom properties such customProp, width or height. Here is part of my code that is related to the issue:
private function ncNetStatus(event:NetStatusEvent):void {
if (event.info.code == "NetConnection.Connect.Success") {
ns = new NetStream(nc);
ns.client = this;
ns.publish(webcam_test, "record");
}
}
private function netStatus(event:NetStatusEvent):void {
if (event.info.code == "NetStream.Publish.Start") {
sendMetadata();
}
}
private function sendMetadata():void {
trace("sendMetaData() called...");
myMetadata = new Object();
myMetadata.customProp = "Welcome to the Live feed of YOUR LIFE";
ns.send("@setDataFrame", "onMetaData", myMetadata);
}
public function onMetaData(info:Object):void {
trace('videocodecid: ',info.videocodecid); //returns 2
trace('customProp: ',info.customProp); // returns undefined
}
And here is my trace result:
NetConnection.Connect.Success
NetStream.Publish.Start
sendMetaData() called...
NetStream.Record.Start
Stopped webcam recording...
NetStream.Record.Stop
NetStream.Unpublish.Success
NetStream.Play.Reset
NetStream.Play.Start
videocodecid: 2
customProp: undefined
