tt.createLivePlayerContext
基础库 1.38.1 版本开始支持,低版本需做 兼容处理。这是一个同步方法。
根据 <live-player /> 组件 id
创建可以控制组件的上下文 LivePlayerContext 对象。
语法
tt.createLivePlayerContext(id, [component])
参数说明
参数名 | 类型 | 默认值 | 必填 | 说明 | 最低支持版本 |
---|---|---|---|---|---|
id | string | 是 | <live-player /> 组件的 id | 1.38.1 | |
component | object | 否 | 在自定义组件下,当前组件实例的 this,以操作组件内 <live-player /> 组件 | 1.38.1 |
返回值
点击纠错
评价此篇文档