Giter Site home page Giter Site logo

chart's Introduction

新共享播放器API说明

对外提供简单的API实现视频的播放,暂停,快进或者快退,全屏操作。

  • API列表
    • 播放:window.__toThirdPartyAPI.play();
    • 暂停:window.__toThirdPartyAPI.pause();
    • 快进:window.__toThirdPartyAPI.progress(seconds); seconds: 快进的秒数
    • 快退:window.__toThirdPartyAPI.back(seconds); seconds: 后退的秒数
    • 进入全屏:window.__toThirdPartyAPI.fullScreen();
    • 退出全屏:window.__toThirdPartyAPI.exitFullScreen();

播放器初始化完成后,向document对象抛出“videoReady"事件,用户可以监听这个事件,监听方法格式如下:

    /*
     * 回调函数在'videoReady'触发后调用,用户可以在函数体中写希望播放器加载完毕后,
     * 被执行的任何自定义方法。
     * 参数e: 事件对象
     * 参数msg: 'Video is ready!'
     * 
    */
    $(document).on('videoReady', function(e, msg){
        console.log(msg); 
    });

chart's People

Contributors

liyang007700 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.