最近开发app的uniapp的video视频播放时,发现IOS端在mounted调用requestFullScreen自动全屏时会偶发失效,找了很久资料,终于解决,特此记录一下
在调用时加个定时器即可
mounted() {
videoCTX = this.$refs.video
setTimeout(() => {
videoCTX.requestFullScreen()
}, 100)
},
最近开发app的uniapp的video视频播放时,发现IOS端在mounted调用requestFullScreen自动全屏时会偶发失效,找了很久资料,终于解决,特此记录一下
在调用时加个定时器即可
mounted() {
videoCTX = this.$refs.video
setTimeout(() => {
videoCTX.requestFullScreen()
}, 100)
},