Update cwPlay.vue
This commit is contained in:
parent
bbeeda0333
commit
223a8b5e00
|
@ -4,13 +4,13 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import api from '@/axios'
|
||||
import { Ref, ref, watch, onMounted, onBeforeMount, onBeforeUnmount, reactive } from 'vue'
|
||||
import {ref, onMounted, onBeforeUnmount} from 'vue'
|
||||
import {useRouter} from 'vue-router'
|
||||
const router = useRouter()
|
||||
|
||||
onMounted(() => {
|
||||
let date = {
|
||||
pointId: router.currentRoute.value.query.pointId,
|
||||
pointId: router.currentRoute.value.query.pointId
|
||||
}
|
||||
const player = ref<any>(null)
|
||||
// console.log(player.value)
|
||||
|
@ -21,6 +21,7 @@ onMounted(() => {
|
|||
// console.log(Player)
|
||||
|
||||
try {
|
||||
// @ts-ignore
|
||||
player.value = new Player(document.getElementById('playerBox'))
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
@ -31,10 +32,10 @@ onMounted(() => {
|
|||
// var playUrl = 'http://192.168.1.201:7000/stream/ZY7y3ZJJWJe_j_jXYjWQLkB3?app=out&token=BitKDx--E7E'
|
||||
// player.play(playUrl, true, '')
|
||||
|
||||
api.post('/multialarm/video/preview', { ...date }).then((res) => {
|
||||
api.post('/multialarm/video/preview', {...date}).then((res: any) => {
|
||||
console.log('🚀 ~ /multialarm/video/preview:', res)
|
||||
console.log(res.data.videoUrl)
|
||||
|
||||
// @ts-ignore
|
||||
player.play(res.data.videoUrl, true, '')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue