VideoContext
VideoContext 实例,可通过 bl.createVideoContext 接口获取实例。
VideoContext 通过 id 跟一个 video 组件绑定,操作对应的 video 组件。
方法
VideoContext.play()
播放视频
VideoContext.pause()
暂停视频
VideoContext.playbackRate(number rate)
倍速播放
VideoContext.sendDanmu(Object data)
发送弹幕
VideoContext.seek(number position)
跳转到指定位置
VideoContext.stop()
停止
VideoContext.requestFullScreen()
基础库版本 >=
3.26.0
开始支持,低版本需做兼容处理
支持切换横向全屏及竖向全屏
VideoContext.exitFullScreen()
基础库版本 >=
3.26.0
开始支持,低版本需做兼容处理
退出全屏
VideoContext.graftPlayer()
基础库版本 >=
3.28.0
开始支持,低版本需做兼容处理
返回共享播放器 sharedId
VideoContext.gotoFreeFlow(Object data)
基础库版本 >=
3.35.0
开始支持,低版本需做兼容处理
我要免流
VideoContext.allowWWANPlay()
基础库版本 >=
3.35.0
开始支持,低版本需做兼容处理
允许流量播放