wx.createLivePlayerContext-操作对应的 组件。 创建并返回 live-player 上下文 LivePlayerContext 对象

wx.createLivePlayerContext(domId, this)

基础库 1.7.0 开始支持,低版本需做兼容处理

操作对应的 <live-player/> 组件。 创建并返回 live-player 上下文 LivePlayerContext 对象。在自定义组件下,第二个参数传入组件实例this,以操作组件内 <live-player/> 组件

livePlayerContext

livePlayerContext 对象的方法列表:

方法参数说明
playOBJECT播放
stopOBJECT停止
muteOBJECT静音
requestFullScreenOBJECT进入全屏
exitFullScreenOBJECT退出全屏


requestFullScreen 的 OBJECT 参数列表:

参数类型必填说明
directionNumber有效值为 0(正常竖向), 90(屏幕逆时针90度), -90(屏幕顺时针90度)
successFunction接口调用成功的回调函数
failFunction接口调用失败的回调函数
completeFunction接口调用结束的回调函数(调用成功、失败都会执行)

其他方法的 OBJECT 参数列表:

参数类型必填说明
successFunction接口调用成功的回调函数
failFunction接口调用失败的回调函数
completeFunction接口调用结束的回调函数(调用成功、失败都会执行)