阅读(1139) (7)

tt.createLivePlayerContext

2020-02-11 18:30:09 更新
基础库 1.38.1 版本开始支持,低版本需做兼容处理。这是一个同步方法。

根据 live-player 组件 id 创建可以控制组件的上下文LivePlayerContext对象。


参数

tt.createLivePlayerContext(id, [component]);

参数说明:

参数名类型默认值必填说明
idstringttml 中组件的 id
componentObject在自定义组件下,当前组件实例的 this,以操作组件内 live-player 组件


返回值

LivePlayerContext