- LivePlayerContext
- 示例
- 图片示例
- 代码示例
- 错误码
- Android
- iOS
- 示例
LivePlayerContext
解释: swan.createLivePlayerContext 的返回值
示例
跳转编辑工具
在开发者工具中打开
在 WEB IDE 中打开
扫码体验
代码示例
请使用百度APP扫码
图片示例
代码示例
- SWAN
- JS
<view class="wrap">
<live-player id="myLive" src="{{src}}"></live-player>
<button type="primary" bind:tap="livePlay">播放</button>
<button type="primary" bind:tap="livePause">暂停</button>
<button type="primary" bind:tap="liveMute">点击静音</button>
<button type="primary" bind:tap="liveResume">恢复</button>
<button type="primary" bind:tap="liveStop">停止</button>
<button type="primary" bind:tap="requestFullScreen">进入全屏</button>
</view>
错误码
Android
错误码 | 说明 |
---|---|
201 |
解析失败,请检查调起协议是否合法 |
401 |
安全校验失败 |
1001 |
执行失败 |
iOS
错误码 | 说明 |
---|---|
202 |
解析失败,请检查参数是否正确 |
401 |
安全校验失败 |