LivePlayerContext.pause

解释:暂停

方法参数

Object object

object 参数说明

属性名类型默认值必填说明

success

Function

接口调用成功的回调函数

fail

Function

接口调用失败的回调函数

complete

Function

接口调用结束的回调函数(调用成功、失败都会执行)

示例

跳转编辑工具

在开发者工具中打开

在 WEB IDE 中打开

扫码体验

代码示例

百度智能小程序

请使用百度APP扫码

图片示例

LivePlayerContext.pause - 图2

代码示例

  • SWAN
  • JS
  1. <view class="wrap">
  2. <live-player id="myLive" src="{{src}}" autoplay="true">
  3. </live-player>
  4. <button type="primary" bind:tap="livePause" disabled="{{disabled}}">暂停播放 pause</button>
  5. <button type="primary" bind:tap="liveResume" disabled="{{!disabled}}">恢复播放 resume</button>
  6. </view>