微信小程序使用hic-video-player
app(android和ios)使用好用视频播放器注:用的是旧版本的这个组件


目前只有app中支持竖屏横批选集
android视频全屏是通过
beforeDestroy() {
// #ifdef APP-VUE
// 页面关闭时关闭沉浸模式
if (uni.getSystemInfoSync().platform == "ios") {
plus.navigator.setFullscreen(false);
}
plus.screen.lockOrientation(this.options.generallyDirection);
// #endif
},
// 部分代码
launchFullscreenRender() {
if (document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document
.webkitFullscreenElement || this.container && this.container.style.position == 'fixed') {
return
}
let dom = document.getElementById('yingbing-video' + this.videoPhoneNormalProp.dataId) || {
}
var rfs = dom.requestFullscreen || dom.mozRequestFullScreen || dom.msRequestFullscreen || dom
.webkitRequestFullscreen
// 通过获取视频video所在的标签 向浏览器申请该标签全屏展示
// 然后通过plus.screen.lockOrientation来设置屏幕旋转方向
if (typeof rfs != 'undefined' && rfs) {
dom.addEventListener('fullscreenchange', this.fullscreenchanged

1万+

被折叠的 条评论
为什么被折叠?



