title: Taro.createVideoContext(id, component)
sidebar_label: createVideoContext
创建 video 上下文 VideoContext 对象。
支持情况:
类型
(id: string, component?: TaroGeneral.IAnyObject) => VideoContext
参数
参数 | 类型 | 说明 |
---|---|---|
id | string |
video 组件的 id |
component | TaroGeneral.IAnyObject |
在自定义组件下,当前组件实例的this,以操作组件内 video 组件 |
示例代码
videoContext = Taro.createVideoContext('myVideo')