Using OSMF 1.5 and I need to access a loaded video's metadata. I've seen a million ways to do this but none of them work. Can someone please post a simple example?
Typically I can get as far as accessing a video's netstream client, but I always get an error saying "onMetaData" is undefined.
OK - when I switch to an FLV, I can get onMetaData to work.
So I suppose I need an example of onMetaData working with an rtmp URL. Is that even possible?
I specifically just need the width/height of the stream's video (not the layout of the container).
It shouldn't be any difference between Progressive Download and Metadata regarding the onMetadata.
This is an example code that access the metadata of an asset:
media:MediaElement = new MediaElement(new URLResource(url));
var meta:Metadata = media.getMetadata(metadaNameSpace);
if (meta.keys.indexOf(key) != -1)
var readValue:String = meta.getValue(key);
Hope this helps,