From a30ff222ec73ad0898e92d1c569f72863445d413 Mon Sep 17 00:00:00 2001 From: xiaoQQya <xiaoQQya@126.com> Date: 星期二, 07 十一月 2023 09:37:40 +0800 Subject: [PATCH] fix(player): 修复分屏页面视频无法自动播放的问题 --- web_src/src/components/common/jessibuca.vue | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/web_src/src/components/common/jessibuca.vue b/web_src/src/components/common/jessibuca.vue index bdb5793..5b48da4 100755 --- a/web_src/src/components/common/jessibuca.vue +++ b/web_src/src/components/common/jessibuca.vue @@ -1,6 +1,6 @@ <template> <div ref="container" @dblclick="fullscreenSwich" - style="width:100%;height:100%;background-color: #000000;margin:0 auto;"> + style="width:100%;height:100%;background-color: #000000;margin:0 auto;position: relative;"> <div class="buttons-box" id="buttonsBox"> <div class="buttons-box-left"> <i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i> @@ -60,8 +60,13 @@ }) }, watch: { - videoUrl(val, _) { - this.play(val); + videoUrl: { + handler(val, _) { + this.$nextTick(() => { + this.play(val); + }) + }, + immediate: true } }, methods: { -- Gitblit v1.8.0