diff --git a/src/platforms/app-plus/view/components/video/index.vue b/src/platforms/app-plus/view/components/video/index.vue index 163d6a8dde197263d739503602209f9ee3f34861..27a23d82ffded168217ca2010bcfc7f3465f9d20 100644 --- a/src/platforms/app-plus/view/components/video/index.vue +++ b/src/platforms/app-plus/view/components/video/index.vue @@ -29,7 +29,7 @@ const events = [ 'pause', 'ended', 'timeupdate', - 'fullscreenchange', + 'fullscreenchange', 'fullscreenclick', 'waiting', 'error' @@ -168,7 +168,14 @@ export default { this.video && this.video.setStyles(this.position) }, { deep: true }) this.$watch('hidden', (val) => { - this.video && this.video[val ? 'hide' : 'show']() + const video = this.video + if (video) { + video[val ? 'hide' : 'show']() + // iOS 隐藏状态设置 setStyles 不生效 + if (!val) { + video.setStyles(this.position) + } + } }) events.forEach(key => { video.addEventListener(key, (data = {}) => { @@ -193,9 +200,9 @@ export default { break case 'playbackRate': data = data.rate - break - case 'requestFullScreen': - data = data.direction + break + case 'requestFullScreen': + data = data.direction break } }