删除废弃文件
This commit is contained in:
parent
1005cb8eb6
commit
51a8f78477
|
|
@ -46,11 +46,6 @@ export const constantRoutes = [
|
|||
component: () => import('@/views/login'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/demo',
|
||||
component: () => import('@/views/demo/index.vue'),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
component: () => import('@/views/register'),
|
||||
|
|
|
|||
|
|
@ -1,133 +0,0 @@
|
|||
<template>
|
||||
<!-- <div class="jessibuca">
|
||||
<div id="container" ref="container"></div>
|
||||
</div> -->
|
||||
|
||||
<div class="jessibuca">
|
||||
<JessibucaH265 />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getVideoList } from '@/api/screen/screen'
|
||||
// import '../../../public/jessibuca.js'
|
||||
import { getQxToken } from '@/api/video/camera'
|
||||
import { selectVideoLoginInfo } from '@/api/screen/screen'
|
||||
import JessibucaH265 from '@/components/JessibucaH265'
|
||||
export default {
|
||||
components: { JessibucaH265 },
|
||||
data() {
|
||||
return {
|
||||
jessibuca: null,
|
||||
playUrl: '',
|
||||
qxToken: '',
|
||||
qxInfo: {},
|
||||
fixedData: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createJessibuca() {
|
||||
this.jessibuca = new window.Jessibuca({
|
||||
container: this.$refs.container,
|
||||
videoBuffer: 0.2, // 缓存时长
|
||||
isResize: false,
|
||||
text: '',
|
||||
debug: false,
|
||||
showBandwidth: true, // 显示网速
|
||||
operateBtns: {
|
||||
fullscreen: true,
|
||||
screenshot: true,
|
||||
play: true,
|
||||
audio: true,
|
||||
},
|
||||
forceNoOffscreen: true,
|
||||
isNotMute: true,
|
||||
})
|
||||
this.jessibuca.on('load', function () {
|
||||
console.log('on load')
|
||||
})
|
||||
this.jessibuca.on('play', function () {
|
||||
console.log('on play')
|
||||
})
|
||||
this.jessibuca.on('audioInfo', function (msg) {
|
||||
// console.log('audioInfo', msg)
|
||||
})
|
||||
|
||||
this.jessibuca.on('videoInfo', function (info) {
|
||||
// console.log('videoInfo', info)
|
||||
})
|
||||
|
||||
this.jessibuca.on('error', function (error) {
|
||||
console.log('error', error)
|
||||
})
|
||||
|
||||
this.jessibuca.on('start', function () {
|
||||
console.log('start')
|
||||
})
|
||||
|
||||
this.jessibuca.on('stats', function (stats) {
|
||||
// console.log('stats', stats)
|
||||
})
|
||||
},
|
||||
playvideo() {
|
||||
if (this.playUrl) {
|
||||
console.log('播放--')
|
||||
this.jessibuca.play(this.playUrl)
|
||||
}
|
||||
},
|
||||
async stopvideo() {
|
||||
if (this.jessibuca) {
|
||||
await this.jessibuca.destroy()
|
||||
jessibuca = null
|
||||
}
|
||||
},
|
||||
|
||||
async getQxToken() {
|
||||
const res = await getQxToken()
|
||||
this.qxToken = res.msg
|
||||
},
|
||||
async selectVideoLoginInfo() {
|
||||
const res = await selectVideoLoginInfo()
|
||||
this.qxInfo = res.data
|
||||
},
|
||||
|
||||
async getDeviceList() {
|
||||
const res = await getVideoList({
|
||||
deviceType: '固定摄像头',
|
||||
})
|
||||
this.fixedData = res.data
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// this.createJessibuca()
|
||||
// Promise.all([this.getQxToken(), this.selectVideoLoginInfo(), this.getDeviceList()]).then(() => {
|
||||
// const { puid, ballIndex } = this.fixedData[0]
|
||||
// this.playUrl =
|
||||
// this.qxInfo.q2Url + 'stream.flv?puid=' + puid + '&idx=' + ballIndex + '&stream=0&token=' + this.qxToken
|
||||
// console.log('this.playUrl', this.playUrl)
|
||||
// this.playvideo()
|
||||
// })
|
||||
// this.playUrl = 'http://218.21.27.6:29605/icvs2/stream.flv?puid=64010100001180000001&idx=0&stream=0&token=MuWeVqBGoH'
|
||||
// this.playvideo()
|
||||
},
|
||||
// beforeDestroy() {
|
||||
// if (this.jessibuca) {
|
||||
// this.jessibuca.destroy()
|
||||
// this.jessibuca = null
|
||||
// }
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.jessibuca {
|
||||
height: 100%;
|
||||
& > #container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: fill;
|
||||
background-color: black;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue