Hello,
I am having trouble getting audio stream meta data from an Akamai FMS stream.
Everything is undefined and I’m not sure why.
I am hoping maybe someone will notice something that I am overlooking. The stream is connecting and playing without a problem I just can’t seem to figure out why all the meta data is undefined.
package
{
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.net.NetConnection;
import flash.net.NetStream;
public class StreamTest extends Sprite
{
private var connection:NetConnection;
private var stream:NetStream;
public function StreamTest()
{
connection=new NetConnection();
connection.connect("rtmp://server/");
connection.client=this
connection.addEventListener("netStatus", onNCStatus);
}
public function onNCStatus(event:NetStatusEvent):void
{
switch (event.info.code)
{
case "NetConnection.Connect.Success":
trace("You've connected successfully");
break;
case "NetStream.Publish.BadName":
trace("Please check the name of the publishing stream");
break;
}
}
public function onBWDone(... args):void
{
stream=new NetStream(connection);
stream.play("streamID");
var custom_obj:Object=new Object();
custom_obj.onMetaData=onMetaDataHandler;
custom_obj.onCuePoint=onCuePointHandler;
stream.client=custom_obj;
}
public function onMetaDataHandler(metaInfoObj:Object):void
{
// this is all undefined
trace("metadata: duration=" + metaInfoObj.duration + " width=" + metaInfoObj.width + " height=" + metaInfoObj.height + " framerate=" + metaInfoObj.framerate);
}
public function onCuePointHandler(cueInfoObj:Object):void
{
trace("cuepoint: time=" + cueInfoObj.time + " name=" + cueInfoObj.name + " type=" + cueInfoObj.type);
}
}
}
The output is
You've connected successfully
metadata: duration=undefined width=undefined height=undefined framerate=undefined
TIA