Compare commits
No commits in common. "7edfd5275ff406c5d3f980cebe8b058766480599" and "e4986834f21de6b4d4e40111f44ea0a737c6672f" have entirely different histories.
7edfd5275f
...
e4986834f2
8758
analyze.html
8758
analyze.html
File diff suppressed because one or more lines are too long
|
@ -13,8 +13,6 @@
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script
|
<script
|
||||||
src="https://webapi.amap.com/maps?v=1.4.15&key=8910226d8d36a41d856262b1a588850c&plugin=AMap.MarkerClusterer"></script>
|
src="https://webapi.amap.com/maps?v=1.4.15&key=8910226d8d36a41d856262b1a588850c&plugin=AMap.MarkerClusterer"></script>
|
||||||
<!-- <script src="./public/jquery-3.4.1.min.js"></script>
|
|
||||||
<script src="./public/h5player.min.js"></script> -->
|
|
||||||
<script src="./jquery-3.4.1.min.js"></script>
|
<script src="./jquery-3.4.1.min.js"></script>
|
||||||
<script src="./h5player.min.js"></script>
|
<script src="./h5player.min.js"></script>
|
||||||
<script type="module" src="/src/main.ts">
|
<script type="module" src="/src/main.ts">
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { createRouter, createWebHistory, createWebHashHistory } from "vue-router";
|
import {createRouter, createWebHistory,createWebHashHistory} from "vue-router";
|
||||||
import { staticRouter, errorRouter } from "@/router/modules/staticRouters";
|
import {staticRouter, errorRouter} from "@/router/modules/staticRouters";
|
||||||
import { LOGIN_ROUTER, ROUTER_WHITE_LIST } from "@/configs";
|
import {LOGIN_ROUTER, ROUTER_WHITE_LIST} from "@/configs";
|
||||||
import { useUserStore } from "@/stores/modules/userStore";
|
import {useUserStore} from "@/stores/modules/userStore";
|
||||||
import { message, Modal } from "ant-design-vue";
|
import {message, Modal} from "ant-design-vue";
|
||||||
import { start, close } from '@/utils/nporgress'
|
import {start, close} from '@/utils/nporgress'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* createWebHistory & createWebHashHistory
|
* createWebHistory & createWebHashHistory
|
||||||
|
@ -14,7 +14,7 @@ const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
routes: [...staticRouter, ...errorRouter],
|
routes: [...staticRouter, ...errorRouter],
|
||||||
strict: false,
|
strict: false,
|
||||||
scrollBehavior: () => ({ left: 0, top: 0 })
|
scrollBehavior: () => ({left: 0, top: 0})
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -59,7 +59,7 @@ const loginParams = ref<{
|
||||||
passWord: string
|
passWord: string
|
||||||
code: string
|
code: string
|
||||||
}>({
|
}>({
|
||||||
userNameOrTelephone: import.meta.env.VITE_APP_ENV === 'development' ? 'test001' : '',
|
userNameOrTelephone: import.meta.env.VITE_APP_ENV === 'development' ? 'admin' : '',
|
||||||
passWord: import.meta.env.VITE_APP_ENV === 'development' ? '123456' : '',
|
passWord: import.meta.env.VITE_APP_ENV === 'development' ? '123456' : '',
|
||||||
code: import.meta.env.VITE_APP_ENV === 'development' ? '1234' : '',
|
code: import.meta.env.VITE_APP_ENV === 'development' ? '1234' : '',
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,106 +1,109 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="player"></div>
|
<div id="player"></div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import api from '@/axios'
|
import api from '@/axios'
|
||||||
import { Ref, ref, watch, onMounted, onBeforeMount, onBeforeUnmount, reactive, getCurrentInstance } from 'vue'
|
import { Ref, ref, watch, onMounted, onBeforeMount, onBeforeUnmount, reactive, getCurrentInstance } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const infoData = ref()
|
const infoData = ref()
|
||||||
var curIndex = 0 // 当前窗口下标
|
var curIndex = 0 // 当前窗口下标
|
||||||
let myPlugin: any
|
let myPlugin : any
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (typeof window.JSPlugin === 'undefined') {
|
if (typeof window.JSPlugin === 'undefined') {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
let date = {
|
let date = {
|
||||||
pointId: router.currentRoute.value.query.pointId,
|
pointId: router.currentRoute.value.query.pointId,
|
||||||
useTLS: 0,
|
useTLS: 0,
|
||||||
}
|
}
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
date.useTLS = 1
|
date.useTLS = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
api.post('/multialarm/video/preview', { ...date }).then((res) => {
|
api.post('/multialarm/video/preview', { ...date }).then((res) => {
|
||||||
// console.log('router222', res)
|
// console.log('router222', res)
|
||||||
console.log('播放地址', res.data.videoUrl)
|
console.log('播放地址', res.data.videoUrl)
|
||||||
var code = res['code']
|
var code = res['code']
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
var playURL = res.data.videoUrl
|
var playURL = res.data.videoUrl
|
||||||
// var playURL = 'wss://w.hnjinglian.cn:2563/haikang play/openUrl/w64vRni'
|
// var playURL = 'wss://w.hnjinglian.cn:2563/haikang play/openUrl/w64vRni'
|
||||||
var IS_MOVE_DEVICE = document.body.clientWidth < 992 // 是否移动设备
|
var IS_MOVE_DEVICE = document.body.clientWidth < 992 // 是否移动设备
|
||||||
var MSE_IS_SUPPORT = !!window.MediaSource // 是否支持mse
|
var MSE_IS_SUPPORT = !!window.MediaSource // 是否支持mse
|
||||||
myPlugin = new window.JSPlugin({
|
myPlugin = new window.JSPlugin({
|
||||||
// 当容器div#play_window有固定宽高时,可不传iWidth和iHeight,窗口大小将自适应容器宽高
|
// 当容器div#play_window有固定宽高时,可不传iWidth和iHeight,窗口大小将自适应容器宽高
|
||||||
// iWidth: 600,
|
// iWidth: 600,
|
||||||
// iHeight: 400,
|
// iHeight: 400,
|
||||||
szId: 'player', //需要英文字母开头,唯一性,必填
|
szId: 'player', //需要英文字母开头,唯一性,必填
|
||||||
szBasePath: './', // 必填,与h5player.min.js的引用目录一致
|
szBasePath: './', // 必填,与h5player.min.js的引用目录一致
|
||||||
iMaxSplit: 1, // 分屏播放,默认最大分屏4*4
|
iMaxSplit: 1, // 分屏播放,默认最大分屏4*4
|
||||||
iCurrentSplit: IS_MOVE_DEVICE ? 1 : 2,
|
iCurrentSplit: IS_MOVE_DEVICE ? 1 : 2,
|
||||||
openDebug: true,
|
openDebug: true,
|
||||||
oStyle: {
|
oStyle: {
|
||||||
borderSelect: IS_MOVE_DEVICE ? '#000' : '#FFCC00',
|
borderSelect: IS_MOVE_DEVICE ? '#000' : '#FFCC00',
|
||||||
},
|
},
|
||||||
bSupporDoubleClickFull: true, //是否支持双击全屏,默认true
|
bSupporDoubleClickFull: true, //是否支持双击全屏,默认true
|
||||||
})
|
})
|
||||||
myPlugin
|
myPlugin.JS_SetWindowControlCallback({
|
||||||
.JS_SetWindowControlCallback({
|
pluginErrorHandler: function (index : any, iErrorCode : any, oError : any) {
|
||||||
pluginErrorHandler: function (index: any, iErrorCode: any, oError: any) {},
|
|
||||||
})
|
|
||||||
.then((res: any) => {})
|
|
||||||
|
|
||||||
var controlIndex = 2
|
},
|
||||||
function playVideo() {
|
})
|
||||||
myPlugin
|
.then((res : any) => {
|
||||||
.JS_Play(
|
})
|
||||||
playURL,
|
|
||||||
{
|
|
||||||
playURL: playURL, // 流媒体播放时必传
|
|
||||||
mode: 1, // 解码类型:0=普通模式; 1=高级模式 默认为0
|
|
||||||
},
|
|
||||||
curIndex //当前窗口下标
|
|
||||||
)
|
|
||||||
.then(
|
|
||||||
() => {},
|
|
||||||
(e: any) => {
|
|
||||||
// console.log('网络流中断')
|
|
||||||
controlIndex--
|
|
||||||
if (controlIndex <= 0) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// console.info('JS_Play failed:', e)
|
|
||||||
playVideo()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
playVideo()
|
|
||||||
} else {
|
|
||||||
alert('播放失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// 停止播放断开 ws 连接
|
var controlIndex = 2
|
||||||
onBeforeUnmount(() => {
|
function playVideo() {
|
||||||
myPlugin.JS_Stop(curIndex).then(
|
myPlugin
|
||||||
() => {
|
.JS_Play(
|
||||||
console.info('JS_Stop success')
|
playURL,
|
||||||
// do you want...
|
{
|
||||||
},
|
playURL: playURL, // 流媒体播放时必传
|
||||||
(err: any) => {
|
mode: 1, // 解码类型:0=普通模式; 1=高级模式 默认为0
|
||||||
console.info('JS_Stop failed:', err)
|
},
|
||||||
// do you want...
|
curIndex //当前窗口下标
|
||||||
}
|
)
|
||||||
)
|
.then(
|
||||||
})
|
() => {
|
||||||
|
},
|
||||||
|
(e : any) => {
|
||||||
|
// console.log('网络流中断')
|
||||||
|
controlIndex--
|
||||||
|
if (controlIndex <= 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// console.info('JS_Play failed:', e)
|
||||||
|
playVideo()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
playVideo()
|
||||||
|
} else {
|
||||||
|
alert('播放失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// 停止播放断开 ws 连接
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
myPlugin.JS_Stop(curIndex).then(
|
||||||
|
() => {
|
||||||
|
console.info('JS_Stop success')
|
||||||
|
// do you want...
|
||||||
|
},
|
||||||
|
(err : any) => {
|
||||||
|
console.info('JS_Stop failed:', err)
|
||||||
|
// do you want...
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
#player {
|
#player {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #000;
|
background: #000;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1061,10 +1061,6 @@ const pointCode = ref()
|
||||||
try {
|
try {
|
||||||
// router.push({ path: '/index/hkplay', query: { pointId: a.pointId } })
|
// router.push({ path: '/index/hkplay', query: { pointId: a.pointId } })
|
||||||
let routeData = router.resolve({ path: '/index/hkplay', query: { pointId: a.pointId } })
|
let routeData = router.resolve({ path: '/index/hkplay', query: { pointId: a.pointId } })
|
||||||
// console.log('routeData.href_____________________', routeData.href)
|
|
||||||
// routeData.href = 'index.html' + routeData.href
|
|
||||||
console.log('routeData.href_____________________', routeData.href)
|
|
||||||
|
|
||||||
// console.log('🚀 ~ routeData:', JSON.stringify(routeData))
|
// console.log('🚀 ~ routeData:', JSON.stringify(routeData))
|
||||||
// window.location.href = routeData.href
|
// window.location.href = routeData.href
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue