I have an flv file:
http://www.stumpymoose.com/flvTest/videoCueTest.flv
..which has embedded cue points, both event and navigation, but I can't work out the AS to read them. See code below and imagine me staring blankly at a monitor for several hours.
First person to post a working solution to this problem wins an exciting prize* and much appreciation.
*Prize is a virtual prize. No cash value.
Code:
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
import fl.video.MetadataEvent;
stop();
var video:Video=new Video(300,169);
addChildAt(video, 0);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream=new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
function onCuePoint(infoObject:Object):void {
var key:String;
for (key in infoObject) {
trace(key + ": " + infoObject[key]);
}
}
video.addEventListener(MetadataEvent.CUE_POINT, testFunction );
function testFunction(evt:MetadataEvent):void {
trace(evt.info.name);
}
function onStatusEvent(stat:Object):void {
// trace(stat.info.code);
}
var meta:Object = new Object();
meta.onMetaData = function(meta:Object)
{
// trace(meta.duration);
};
var cueTest:Object = new Object();
cueTest.CUE_POINT = function(cueTest:Object)
{
trace(cueTest);
};
ns.client=meta;
video.attachNetStream(ns);
ns.play("http://www.stumpymoose.com/flvTest/videoCueTest.flv");
var myClient:Object = {}; myClient.onCuePoint = function( data:Object ):void {} myClient.onMetaData = function( data:Object ):void {} ns.client = myClient;function onCuePoint( data:Object ):void {} function onMetaData( data:Object ):void {} ns.client = this;