# FMS: Getting Audio Stream MetaData

**URL:** <https://forum.kirupa.com/t/fms-getting-audio-stream-metadata/292979>\
**Category:** flash\
**Created:** [July 21, 2009, 4:31pm UTC](https://forum.kirupa.com/t/fms-getting-audio-stream-metadata/292979 "2009-07-21T16:31:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [July 21, 2009, 4:31pm UTC](https://forum.kirupa.com/t/fms-getting-audio-stream-metadata/292979/1 "2009-07-21T16:31:23Z")

</div>

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.

```auto

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

```auto

You've connected successfully
metadata: duration=undefined width=undefined height=undefined framerate=undefined

```

TIA
