|
@@ -38,7 +38,7 @@
|
|
|
muted
|
|
|
></video>
|
|
|
<img
|
|
|
- v-show="videoPlaying"
|
|
|
+ v-show="videoNeedPlay"
|
|
|
@click.stop="handleVideoPlay"
|
|
|
class="videoPlay"
|
|
|
:src="require('@/assets/images/default/bofang.png')"
|
|
@@ -125,7 +125,7 @@ const props = defineProps({
|
|
|
});
|
|
|
const store = useStore();
|
|
|
const openvideo$ = ref(null);
|
|
|
-const videoPlaying = ref(true);
|
|
|
+const videoNeedPlay = ref(true);
|
|
|
|
|
|
const isMixinMode = computed(
|
|
|
() => props.coverData.coverSelect.toLowerCase().indexOf("and") > -1
|
|
@@ -161,6 +161,12 @@ const videoIndex = ref(1);
|
|
|
|
|
|
const currentScene = computed(() => store.getters["scene/currentScene"]);
|
|
|
|
|
|
+const handleVideoPlay = () => {
|
|
|
+ window.alert("play");
|
|
|
+ let video = unref(openvideo$);
|
|
|
+ video && video.play();
|
|
|
+};
|
|
|
+
|
|
|
//手动跳转
|
|
|
const jumpImage = () => {
|
|
|
if (unref(isMixinMode)) {
|
|
@@ -309,14 +315,14 @@ onMounted(() => {
|
|
|
});
|
|
|
|
|
|
openvideo$.value.addEventListener("playing", () => {
|
|
|
- if (videoPlaying.value) {
|
|
|
- videoPlaying.value = false;
|
|
|
+ if (videoNeedPlay.value) {
|
|
|
+ videoNeedPlay.value = false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
openvideo$.value.addEventListener("pause", () => {
|
|
|
- if (!videoPlaying.value) {
|
|
|
- videoPlaying.value = true;
|
|
|
+ if (!videoNeedPlay.value) {
|
|
|
+ videoNeedPlay.value = true;
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -408,7 +414,7 @@ onMounted(() => {
|
|
|
object-fit: cover;
|
|
|
}
|
|
|
|
|
|
- .bofang {
|
|
|
+ .videoPlay {
|
|
|
position: absolute;
|
|
|
top: 50%;
|
|
|
transform: translate(-50%, -50%);
|
|
@@ -416,7 +422,6 @@ onMounted(() => {
|
|
|
width: 80px;
|
|
|
height: 80px;
|
|
|
z-index: 99999;
|
|
|
- pointer-events: none;
|
|
|
}
|
|
|
}
|
|
|
|