Taro.createLivePlayerContext(id, component)
创建 live-player 上下文 LivePlayerContext 对象。
类型
(id: string, component?: Record<string, any>) => LivePlayerContext
参数
| 参数 | 类型 | 说明 |
|---|---|---|
| id | string | live-player 组件的 id |
| component | Record<string, any> | 在自定义组件下,当前组件实例的this,以操作组件内 live-player 组件 |
API 支持度
| API | 微信小程序 | H5 | React Native |
|---|---|---|---|
| Taro.createLivePlayerContext | ✔️ |