zoukankan      html  css  js  c++  java
  • FLVPlayback应用

    // ActionScript 3.0
    /* Requires
     * - FLVPlayback control in Flash library
     */
    import fl.video.FLVPlayback;
    import fl.video.MetadataEvent;
    import fl.video.*;
     
    var flvPlayback:FLVPlayback = new FLVPlayback();
    flvPlayback.autoPlay = false;
    flvPlayback.addEventListener(MetadataEvent.METADATA_RECEIVED, flvPlayback_metadataReceived);
    flvPlayback.addEventListener(VideoEvent.READY, flvPlayback_ready);
    flvPlayback.addEventListener(MetadataEvent.CUE_POINT, flvPlayback_cuePoint);
    flvPlayback.source = "http://www.helpexamples.com/flash/video/cuepoints.flv";
    flvPlayback.skin = "SkinOverPlaySeekMute.swf";
    flvPlayback.x = 10;
    flvPlayback.y = 10;
    addChild(flvPlayback);
     
    function flvPlayback_metadataReceived(evt:MetadataEvent):void {
        trace("duration:", evt.info.duration); // 16.334
        trace("framerate:", evt.info.framerate); // 15
        trace("", evt.info.width); // 320
        trace("height:", evt.info.height); // 213
    }
    function flvPlayback_ready(evt:VideoEvent):void {
        flvPlayback.addASCuePoint(1, "cuePoint1");
    }
     
    function flvPlayback_cuePoint(evt:MetadataEvent):void {
        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
    }
    

      

  • 相关阅读:
    0302思考并回答一些问题
    0104 自下而上
    1203 有穷自动机的构造
    11 10我的评论
    1029 C语言文法翻译(2)
    1014 对编译程序的心得与总结
    我们小组的编译程序
    0921 词法分析程序
    0909 关于编译原理的思考
    数据库设计之数据库设计三大范式
  • 原文地址:https://www.cnblogs.com/wqing/p/2539106.html
Copyright © 2011-2022 走看看