我有一个 flv vid 并动态设置提示点
vid.addASCuePoint(1, "cuePoint1");
然而它并不总是停在同一个地方。我怎样才能更准确?我认为这是由于缓冲和其他一些因素?
import fl.video.*;
//etc etc
vid.addEventListener(fl.video.VideoEvent.READY, flvPlayback_ready);
vid.addEventListener(MetadataEvent.CUE_POINT, flvPlayback_cuePoint);
function flvPlayback_ready(evt:fl.video.VideoEvent):void {
vid.addASCuePoint(1, "cuePoint1");
vid.play();
}
function flvPlayback_cuePoint(evt:MetadataEvent):void {
vid.pause();
trace("CUE POINT!!!");
trace("\t", "name:", evt.info.name); // name: cuePoint1
trace("\t", "time:", evt.info.time); // time: 1
trace("\t", "type:", evt.info.type); // type: actionscript
}