webview网页引用的别人的iframe视频播放不能全屏和横屏播放怎么办
1、APP模块配置里勾选了videoplayer和Android X5 webview
"orientation" : [
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
]
这个也配置了,
onReady() {
// vue页面设置webview宽高
// #ifdef APP-PLUS
var currentWebview = this.$scope.$getAppWebview()
setTimeout(function() {
wv = currentWebview.children()[0]
wv.setStyle({height:300})
}, 1000); //如果是页面初始化调用时,需要延时一下
// #endif
},
onLoad() {
// #ifdef APP-PLUS
var currentWebview = this.$scope.$getAppWebview();
console.log(currentWebview)
setTimeout(function() {
wv = currentWebview.children()[0];
wv.setStyle({
videoFullscreen: 'landscape',
//videoFullscreen:'landscape-primary',//视频全屏时支持横屏 IOS 端无效
});
}, 1000); //如果是页面初始化调用时,需要延时一下
// #endif
}
视频播放的时候不是不能点击全屏就是全屏后不能横屏播放
2 个回复
降龙十八掌
同求,,,,看了很多代码都解决不了
蜡笔小新人
楼主解决了吗?
同问 :uniapp webview,视频不能全屏播放。
安卓端不行
苹果端会调用系统默认的播放器。