I am Recording Video using webcam in my flex application using FMS. and publish that video as a
ns.publish("mp4:"+FILENAME+".mp4","record");
now i am trying to play that video directly which is stream , click on play button
ns.play("mp4:"+FILENAME +".mp4");
video is playing fine but using timer i am trying to display time it doesn't show. I debug my code so it's show error like Error #1069: Property onMetaData not found on flash.net.NetStream and there is no default value.
with same code i am trying to play video by giving static video url the it will show time.
ns.play("filename.mp4");
I am using NetStatusEvent.NET_STATUS EventListener of netstream.
You need to define specific client in order to use this: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#event:onMetaData
It's property of that client that you've assigned, not the NetStream itself.
I'll copy some of the docs so you can get a quick sample:
var ns:NetStream = new NetStream(nc);
ns.client = {};
ns.client.onMetaData = ns_onMetaData;
video.attachNetStream(ns);
ns.play("http://www.helpexamples.com/flash/video/cuepoints.flv");
function ns_onMetaData(item:Object):void {
trace("metaData");
}
Hope that helps!