|
@@ -336,65 +336,46 @@
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<transition name="fade-in-out-slow">
|
|
<transition name="fade-in-out-slow">
|
|
- <div
|
|
|
|
|
|
+ <VideoAdapter
|
|
v-if="isShowCameraIntro"
|
|
v-if="isShowCameraIntro"
|
|
- class="text-wrap"
|
|
|
|
- >
|
|
|
|
- <button
|
|
|
|
- class="skip"
|
|
|
|
- @click="skipCameraIntro"
|
|
|
|
- />
|
|
|
|
- <img
|
|
|
|
- v-if="showVideoPlay"
|
|
|
|
- class="pano-play-icon"
|
|
|
|
- src="@/assets/images/play.png"
|
|
|
|
- @click="() => {
|
|
|
|
- videoRef?.play()
|
|
|
|
- showVideoPlay = false
|
|
|
|
- }"
|
|
|
|
- >
|
|
|
|
- <video
|
|
|
|
- ref="videoRef"
|
|
|
|
- :poster="require(`@/assets/images/mobile-intro/${toggleCameraVideoName}.jpg`)"
|
|
|
|
- :src="require(`@/assets/videos/mobile-intro/${toggleCameraVideoName}.mp4`)"
|
|
|
|
- autoplay
|
|
|
|
- x5-playsinline="true"
|
|
|
|
- playsinline="true"
|
|
|
|
- webkit-playsinline="true"
|
|
|
|
- x-webkit-airplay="true"
|
|
|
|
- x5-video-player-type="h5-page"
|
|
|
|
- style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: bottom;"
|
|
|
|
- @play="showVideoPlay = false"
|
|
|
|
- @ended="skipCameraIntro"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
|
|
+ :poster="require(`@/assets/images/mobile-intro/${toggleCameraVideoName}.jpg`)"
|
|
|
|
+ :src="require(`@/assets/videos/mobile-intro/${toggleCameraVideoName}.mp4`)"
|
|
|
|
+ :object-position="$mediaNeedContain ? 'center' : 'center bottom'"
|
|
|
|
+ @ended="skipCameraIntro"
|
|
|
|
+ />
|
|
</transition>
|
|
</transition>
|
|
</template>
|
|
</template>
|
|
<!-- end of 镜头切换过渡 -->
|
|
<!-- end of 镜头切换过渡 -->
|
|
<!-- 场景切换过渡 -->
|
|
<!-- 场景切换过渡 -->
|
|
- <video
|
|
|
|
|
|
+ <VideoAdapter
|
|
v-show="isShowSceneIntroVideoStart"
|
|
v-show="isShowSceneIntroVideoStart"
|
|
ref="sceneIntrovideoStartEl"
|
|
ref="sceneIntrovideoStartEl"
|
|
- class="scene-intro-video scene-intro-video-start"
|
|
|
|
|
|
+ :show-play="false"
|
|
|
|
+ :show-skip="false"
|
|
:src="videoIntroUrl"
|
|
:src="videoIntroUrl"
|
|
- x5-playsinline="true"
|
|
|
|
- playsinline="true"
|
|
|
|
- webkit-playsinline="true"
|
|
|
|
- x-webkit-airplay="true"
|
|
|
|
- x5-video-player-type="h5-page"
|
|
|
|
@ended="onPlayedFirstSceneIntroVideoEnded"
|
|
@ended="onPlayedFirstSceneIntroVideoEnded"
|
|
- />
|
|
|
|
- <button
|
|
|
|
- v-show="isShowSceneIntroVideoStart"
|
|
|
|
- class="skip-scene-intro"
|
|
|
|
- :style="{
|
|
|
|
- left: skipBtnLeftTop.x + 'px',
|
|
|
|
- top: skipBtnLeftTop.y + 'px',
|
|
|
|
- width: skipBtnRightBottom.x - skipBtnLeftTop.x + 'px',
|
|
|
|
- height: skipBtnRightBottom.y - skipBtnLeftTop.y + 'px',
|
|
|
|
- }"
|
|
|
|
- @click="skipFirstSceneIntro"
|
|
|
|
- />
|
|
|
|
|
|
+ >
|
|
|
|
+ <button
|
|
|
|
+ v-if="!$mediaNeedContain"
|
|
|
|
+ class="skip-scene-intro"
|
|
|
|
+ :style="{
|
|
|
|
+ left: skipBtnLeftTop.x + 'px',
|
|
|
|
+ top: skipBtnLeftTop.y + 'px',
|
|
|
|
+ width: skipBtnRightBottom.x - skipBtnLeftTop.x + 'px',
|
|
|
|
+ height: skipBtnRightBottom.y - skipBtnLeftTop.y + 'px',
|
|
|
|
+ }"
|
|
|
|
+ @click="skipFirstSceneIntro"
|
|
|
|
+ />
|
|
|
|
+ <button
|
|
|
|
+ v-else
|
|
|
|
+ class="skip-scene-intro-contain"
|
|
|
|
+ :style="{
|
|
|
|
+ width: skipBtnRightBottom.x - skipBtnLeftTop.x + 'px',
|
|
|
|
+ height: skipBtnRightBottom.y - skipBtnLeftTop.y + 'px',
|
|
|
|
+ }"
|
|
|
|
+ @click="skipFirstSceneIntro"
|
|
|
|
+ />
|
|
|
|
+ </VideoAdapter>
|
|
<!-- end of 场景切换过渡 -->
|
|
<!-- end of 场景切换过渡 -->
|
|
|
|
|
|
<MsgContent
|
|
<MsgContent
|
|
@@ -473,7 +454,9 @@ import MutiRelicHotSpot from "@/components/MutiRelicHotSpot.vue"
|
|
import ShipGameView from '@/views/ShipGame/ShipGameView.vue'
|
|
import ShipGameView from '@/views/ShipGame/ShipGameView.vue'
|
|
import GameEntryPage from '@/components/GameEntryPage.vue'
|
|
import GameEntryPage from '@/components/GameEntryPage.vue'
|
|
import ScreenSaver from '@/components/ScreenSaver.vue'
|
|
import ScreenSaver from '@/components/ScreenSaver.vue'
|
|
|
|
+import VideoAdapter from '@/components/VideoAdapter.vue'
|
|
|
|
|
|
|
|
+const $mediaNeedContain = inject('$mediaNeedContain')
|
|
const $isMobile = inject('$isMobile')
|
|
const $isMobile = inject('$isMobile')
|
|
const GUIDE_KEY = 'is-open-guide'
|
|
const GUIDE_KEY = 'is-open-guide'
|
|
const msgVisible = ref(false)
|
|
const msgVisible = ref(false)
|
|
@@ -481,8 +464,7 @@ const curMsgIndex = ref(0)
|
|
const showGuide = ref(false)
|
|
const showGuide = ref(false)
|
|
const showShipGame = ref(false)
|
|
const showShipGame = ref(false)
|
|
const showScreensaver = ref(false)
|
|
const showScreensaver = ref(false)
|
|
-const showVideoPlay = ref(true)
|
|
|
|
-const videoRef = ref()
|
|
|
|
|
|
+
|
|
let screensaverTime = 0
|
|
let screensaverTime = 0
|
|
let screensaverTimer = null
|
|
let screensaverTimer = null
|
|
|
|
|
|
@@ -807,7 +789,6 @@ watch(cameraIdx, (vNew, pVal) => {
|
|
|
|
|
|
// 跳过按钮 功能
|
|
// 跳过按钮 功能
|
|
function skipCameraIntro(showAction, routeChange) {
|
|
function skipCameraIntro(showAction, routeChange) {
|
|
- showVideoPlay.value = true
|
|
|
|
clearTimeout(cameraIntroAudioTimeoutId)
|
|
clearTimeout(cameraIntroAudioTimeoutId)
|
|
!$isMobile && sceneIntroaudioStartEl.value?.pause()
|
|
!$isMobile && sceneIntroaudioStartEl.value?.pause()
|
|
clearCameraIntroMedia(showAction, routeChange)
|
|
clearCameraIntroMedia(showAction, routeChange)
|
|
@@ -842,7 +823,7 @@ watch(sceneIdx, (vNew) => {
|
|
isShowSceneIntroVideoStart.value = true
|
|
isShowSceneIntroVideoStart.value = true
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- sceneIntrovideoStartEl.value.play()
|
|
|
|
|
|
+ sceneIntrovideoStartEl.value.videoRef.play()
|
|
}, 500)
|
|
}, 500)
|
|
})
|
|
})
|
|
} else if (!$isMobile) {
|
|
} else if (!$isMobile) {
|
|
@@ -924,14 +905,14 @@ function skipSceneIntro() {
|
|
})
|
|
})
|
|
isShowSceneIntroVideoStart.value = false
|
|
isShowSceneIntroVideoStart.value = false
|
|
isShowSceneIntroVideoEnd.value = false
|
|
isShowSceneIntroVideoEnd.value = false
|
|
- sceneIntrovideoStartEl.value?.pause()
|
|
|
|
|
|
+ sceneIntrovideoStartEl.value?.videoRef.pause()
|
|
sceneIntrovideoEndEl.value?.pause()
|
|
sceneIntrovideoEndEl.value?.pause()
|
|
}
|
|
}
|
|
function skipFirstSceneIntro() {
|
|
function skipFirstSceneIntro() {
|
|
if (jumpIntroduceDisable) return
|
|
if (jumpIntroduceDisable) return
|
|
|
|
|
|
jumpIntroduceDisable = true
|
|
jumpIntroduceDisable = true
|
|
- const video = sceneIntrovideoStartEl.value
|
|
|
|
|
|
+ // const video = sceneIntrovideoStartEl.value.videoRef
|
|
// 不需要过渡
|
|
// 不需要过渡
|
|
// switch (sceneIdx.value) {
|
|
// switch (sceneIdx.value) {
|
|
// case 0:
|
|
// case 0:
|
|
@@ -943,7 +924,8 @@ function skipFirstSceneIntro() {
|
|
// default:
|
|
// default:
|
|
// video.currentTime = $isMobile ? 31 : 31
|
|
// video.currentTime = $isMobile ? 31 : 31
|
|
// }
|
|
// }
|
|
- video.currentTime = video.duration
|
|
|
|
|
|
+ // video.currentTime = video.duration
|
|
|
|
+ sceneIntrovideoStartEl.value.toEnd()
|
|
}
|
|
}
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
skipSceneIntro()
|
|
skipSceneIntro()
|
|
@@ -1753,27 +1735,26 @@ const {
|
|
/**
|
|
/**
|
|
* 场景切换过渡
|
|
* 场景切换过渡
|
|
*/
|
|
*/
|
|
- >video.scene-intro-video{
|
|
|
|
- position: absolute;
|
|
|
|
- left: 0;
|
|
|
|
- top: 0;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- object-fit: cover;
|
|
|
|
- z-index: 20;
|
|
|
|
- }
|
|
|
|
- >button.skip-scene-intro{
|
|
|
|
|
|
+ button.skip-scene-intro{
|
|
position: absolute;
|
|
position: absolute;
|
|
z-index: 21;
|
|
z-index: 21;
|
|
// background-color: red;
|
|
// background-color: red;
|
|
// opacity: 0.5;
|
|
// opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
+ .skip-scene-intro-contain {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: 50%;
|
|
|
|
+ margin-top: calc(300 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
+ z-index: 21;
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* end of 场景切换过渡
|
|
* end of 场景切换过渡
|
|
*/
|
|
*/
|
|
}
|
|
}
|
|
|
|
|
|
-@media screen and (max-height: 480px) {
|
|
|
|
|
|
+@media screen and (max-height: 740px) {
|
|
.skip-scene-intro {
|
|
.skip-scene-intro {
|
|
top: unset !important;
|
|
top: unset !important;
|
|
padding: 20px;
|
|
padding: 20px;
|
|
@@ -1807,6 +1788,16 @@ const {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+@media screen and (min-height: 480px) and (max-height: 740px) {
|
|
|
|
+ .skip-scene-intro {
|
|
|
|
+ top: unset !important;
|
|
|
|
+ padding: 20px;
|
|
|
|
+ margin-left: calc(-20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
+ bottom: calc(150 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
|
+ box-sizing: content-box;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
.pano-play-icon {
|
|
.pano-play-icon {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 50%;
|
|
top: 50%;
|
|
@@ -1818,7 +1809,7 @@ const {
|
|
</style>
|
|
</style>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
-@media screen and (max-height: 480px) {
|
|
|
|
|
|
+@media screen and (max-height: 740px) {
|
|
.pano-view > .text-wrap {
|
|
.pano-view > .text-wrap {
|
|
.text,
|
|
.text,
|
|
.text p {
|
|
.text p {
|