|
@@ -176,7 +176,6 @@ watch(() => progress2.value, (newVal, oldVal) => {
|
|
|
}, { immediate: true })
|
|
}, { immediate: true })
|
|
|
const timers = ref(100)
|
|
const timers = ref(100)
|
|
|
const timer = ref<any>()
|
|
const timer = ref<any>()
|
|
|
-
|
|
|
|
|
function handleTop() {
|
|
function handleTop() {
|
|
|
progress2.value = 5
|
|
progress2.value = 5
|
|
|
}
|
|
}
|
|
@@ -201,6 +200,12 @@ function playVoice(val) {
|
|
|
innerAudioContext.value.src = val;
|
|
innerAudioContext.value.src = val;
|
|
|
innerAudioContext.value.play();
|
|
innerAudioContext.value.play();
|
|
|
}
|
|
}
|
|
|
|
|
+function handleLoadedMetadata() {
|
|
|
|
|
+ // 视频加载完成后,设置全屏播放
|
|
|
|
|
+ uni.createVideoContext('video1').requestFullScreen()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
clearInterval(timer.value)
|
|
clearInterval(timer.value)
|
|
|
innerAudioContext.value.stop();
|
|
innerAudioContext.value.stop();
|
|
@@ -213,7 +218,8 @@ onUnmounted(() => {
|
|
|
<view class="video-container">
|
|
<view class="video-container">
|
|
|
<video v-if="progress2 !== 4" id="video1" class="w-full h-full " enable-play-gesture :src="data.videoSrc"
|
|
<video v-if="progress2 !== 4" id="video1" class="w-full h-full " enable-play-gesture :src="data.videoSrc"
|
|
|
:show-center-play-btn="false" :show-background-playback-button="false" :show-fullscreen-btn="false"
|
|
:show-center-play-btn="false" :show-background-playback-button="false" :show-fullscreen-btn="false"
|
|
|
- :show-casting-button="false" autoplay @controlstoggle="handleControlsToggle" @ended="handleEnded">
|
|
|
|
|
|
|
+ :show-casting-button="false" autoplay @controlstoggle="handleControlsToggle" @ended="handleEnded"
|
|
|
|
|
+ @loadedmetadata="handleLoadedMetadata">
|
|
|
</video>
|
|
</video>
|
|
|
<view v-else class="w-full h-full ">
|
|
<view v-else class="w-full h-full ">
|
|
|
<image mode="aspectFill" src="https://oss.xiaoxiongcode.com/static/home/assert_1.gif" alt=""
|
|
<image mode="aspectFill" src="https://oss.xiaoxiongcode.com/static/home/assert_1.gif" alt=""
|