VideoContext mc.createVideoContext(String id, Object this)

创建 video 上下文 VideoContext 对象。也可使用 mc.createSelectorQuery 获取 context 对象。

参数

参数 类型 默认值 必填 说明
id String video 组件id
this Object 组件范围,不传时默认为当前页面

返回值

类型 说明
VideoContext video 组件的 context 对象

const context = mc.createVideoContext('video');

context.seek(10);//跳转到10秒处播放

context.playbackRate(1.5);//1.5倍播放速度

context.play();//播放

context.pause();//暂停

context.stop();//停止

results matching ""

    No results matching ""

    results matching ""

      No results matching ""