|
@@ -18,25 +18,40 @@
|
|
|
></path>
|
|
></path>
|
|
|
</svg>
|
|
</svg>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <pub-video /> -->
|
|
|
|
|
- <div class="video-box-wrapper mt-10px relative">
|
|
|
|
|
- <video
|
|
|
|
|
- class="video-count object-fill"
|
|
|
|
|
- width="100%"
|
|
|
|
|
- height="550px"
|
|
|
|
|
- autoplay
|
|
|
|
|
- muted
|
|
|
|
|
- playsinline
|
|
|
|
|
- loop
|
|
|
|
|
- >
|
|
|
|
|
- <source src="@/assets/videos/temp.mp4" type="video/mp4" />
|
|
|
|
|
|
|
+ <div class="video-box-wrapper mt-10px relative bg-#00000080">
|
|
|
|
|
+ <UseFullscreen v-slot="{ toggle, isFullscreen }">
|
|
|
|
|
+ <div class="relative w-full h-full flex items-center">
|
|
|
|
|
+ <pub-video-new class="aspect-ratio-video" @click.right.prevent="rightClickFn" />
|
|
|
|
|
+ <!-- 全屏按钮 -->
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="all-screen popover-screen-full-trigger cursor-pointer z-99 absolute right-8px top-8px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Icon
|
|
|
|
|
+ icon="icon-park-outline:off-screen"
|
|
|
|
|
+ color="#8ac5ff"
|
|
|
|
|
+ width="25"
|
|
|
|
|
+ height="25"
|
|
|
|
|
+ v-if="isFullscreen"
|
|
|
|
|
+ @click="toggle"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Icon
|
|
|
|
|
+ icon="iconamoon:screen-full"
|
|
|
|
|
+ color="#8ac5ff"
|
|
|
|
|
+ width="25"
|
|
|
|
|
+ height="25"
|
|
|
|
|
+ @click="toggle"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="loading"
|
|
|
|
|
+ class="absolute top-50% left-50% transform-translate--50% flex justify-center items-center"
|
|
|
|
|
+ >
|
|
|
|
|
+ <NSpin />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </UseFullscreen>
|
|
|
|
|
|
|
|
- Download the
|
|
|
|
|
- <a href="/media/cc0-videos/flower.webm">WEBM</a>
|
|
|
|
|
- or
|
|
|
|
|
- <a href="/assets/videos/temp.mp4">MP4</a>
|
|
|
|
|
- video.
|
|
|
|
|
- </video>
|
|
|
|
|
<TagBox
|
|
<TagBox
|
|
|
v-for="(tag, i) in tagList"
|
|
v-for="(tag, i) in tagList"
|
|
|
:key="i"
|
|
:key="i"
|
|
@@ -45,20 +60,29 @@
|
|
|
:left="tag.x"
|
|
:left="tag.x"
|
|
|
:label="tag.name"
|
|
:label="tag.name"
|
|
|
></TagBox>
|
|
></TagBox>
|
|
|
|
|
+ <!-- <RightClick :x="xy.x" :y="xy.y" /> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
- import useWorker from '@/assets/js/video-lib/omnimatrix-video-player'
|
|
|
|
|
- import TagBox from './components/TagBox.vue'
|
|
|
|
|
|
|
+ // import useWorker from '@/assets/js/video-lib/omnimatrix-video-player'
|
|
|
|
|
+ import { omatVideoPlayer } from '@/assets/js/video-lib/flv/omatVideoPlayer'
|
|
|
|
|
+ import TagBox from './components/tagBox.vue'
|
|
|
import { useOutsideSystemStore } from '@/stores/modules/system.js'
|
|
import { useOutsideSystemStore } from '@/stores/modules/system.js'
|
|
|
import { useOutsideHomeStore } from '@/stores/modules/home'
|
|
import { useOutsideHomeStore } from '@/stores/modules/home'
|
|
|
- import { useRatio } from '@/hooks/useRatio.js'
|
|
|
|
|
|
|
+ import { UseFullscreen } from '@vueuse/components'
|
|
|
|
|
+ import { NSpin } from 'naive-ui'
|
|
|
|
|
+ // import { useRatio } from '@/hooks/useRatio.js'
|
|
|
|
|
+ import RightClick from './components/rightBox.vue'
|
|
|
|
|
|
|
|
|
|
+ const props = defineProps({
|
|
|
|
|
+ id: Number
|
|
|
|
|
+ })
|
|
|
|
|
+ const { API_MR_VIDEO_LIST_GET } = useRequest()
|
|
|
const useHomeStore = useOutsideHomeStore()
|
|
const useHomeStore = useOutsideHomeStore()
|
|
|
const useSystem = useOutsideSystemStore()
|
|
const useSystem = useOutsideSystemStore()
|
|
|
- let workerObj = shallowRef(null)
|
|
|
|
|
|
|
+ const loading = ref(true)
|
|
|
|
|
|
|
|
const tagList = [
|
|
const tagList = [
|
|
|
{
|
|
{
|
|
@@ -88,14 +112,31 @@
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
+ let playerObj = null
|
|
|
|
|
+
|
|
|
const init = async () => {
|
|
const init = async () => {
|
|
|
- useRatio()
|
|
|
|
|
- await useSystem.getDeviceInfo()
|
|
|
|
|
- await useSystem.getVideoUrl(0)
|
|
|
|
|
- console.log('websocket请求')
|
|
|
|
|
- workerObj.value = useWorker(useSystem.videoUrl, '.pub-video', null, () => {
|
|
|
|
|
- useSystem.videoLoading = false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const res = await API_MR_VIDEO_LIST_GET()
|
|
|
|
|
+ const url = res.pano_view.replace('{14}', props.id)
|
|
|
|
|
+ console.log(url)
|
|
|
|
|
+
|
|
|
|
|
+ loading.value = true
|
|
|
|
|
+ try {
|
|
|
|
|
+ // await useSystem.getDeviceInfo()
|
|
|
|
|
+ console.log('websocket请求')
|
|
|
|
|
+ playerObj = omatVideoPlayer(
|
|
|
|
|
+ '.pub-video',
|
|
|
|
|
+ url,
|
|
|
|
|
+ () => {
|
|
|
|
|
+ loading.value = false
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ enableZoom: false,
|
|
|
|
|
+ enableDrag: false
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.log(error)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const toMap = () => {
|
|
const toMap = () => {
|
|
@@ -104,10 +145,21 @@
|
|
|
useHomeStore.temp = 'map'
|
|
useHomeStore.temp = 'map'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const xy = ref({ x: 0, y: 0 })
|
|
|
|
|
+ const rightClickFn = (event) => {
|
|
|
|
|
+ console.log(event.target.offsetWidth)
|
|
|
|
|
+ console.log()
|
|
|
|
|
+ const scale = document.body.style.transform.split('(')[1].split(')')[0]
|
|
|
|
|
+ const [x, y] = [event.offsetX * parseFloat(scale), event.offsetY * parseFloat(scale)]
|
|
|
|
|
+
|
|
|
|
|
+ xy.value.x = event.offsetX
|
|
|
|
|
+ xy.value.y = event.offsetY
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- // init()
|
|
|
|
|
|
|
+ init()
|
|
|
})
|
|
})
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
|
- useSystem.resetQj(workerObj.value)
|
|
|
|
|
|
|
+ playerObj?.destroyed()
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|