<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/09/15/viewing-an-flv-videos-metadata-using-a-flex-videodisplay-control/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white" viewSourceURL="srcview/index.html">

    <mx:Script>
        <![CDATA[
            import mx.events.MetadataEvent;
            import mx.utils.ObjectUtil;

            private const VIDEO_URL:String = "http://www.helpexamples.com/flash/video/cuepoints.flv";

            private function videoDisplay_metadataReceived(evt:MetadataEvent):void {
                var arr:Array = [];
                var item:String;
                var meta:Object = evt.info; // videoDisplay.metadata;
                var value:*;
                for (item in meta) {
                    if (ObjectUtil.isSimple(meta[item])) {
                        if (meta[item] is Array) {
                            value = "[Array]";
                        } else {
                            value = meta[item]
                        }
                        arr.push({name:item, value:value});
                    }
                }
                arr.sortOn("name", Array.CASEINSENSITIVE);
                dataGrid.dataProvider = arr;
                dataGrid.visible = true;
            }
        ]]>
    </mx:Script>

    <mx:Button label="Click here to load video"
            click="videoDisplay.source = VIDEO_URL;" />

    <mx:VideoDisplay id="videoDisplay"
            visible="false"
            ready="videoDisplay.visible = true;"
            metadataReceived="videoDisplay_metadataReceived(event);" />

    <mx:DataGrid id="dataGrid"
            visible="false"
            width="100%"
            height="100%" >
        <mx:columns>
            <mx:DataGridColumn dataField="name"
                    headerText="Name:"
                    sortable="false" />
            <mx:DataGridColumn dataField="value"
                    headerText="Value:"
                    sortable="false" />
        </mx:columns>
    </mx:DataGrid>

</mx:Application>