Browse Source

摄像头配置获取修改

master
z_yu 3 years ago
parent
commit
d5224e63a9
  1. 4
      src/views/storeManage/warehouse3D/index.vue
  2. 10
      src/views/storeManage/warehouse3D/module/video.vue

4
src/views/storeManage/warehouse3D/index.vue

@ -72,7 +72,9 @@ export default {
this.activeIndex = this.$route.params.roomId this.activeIndex = this.$route.params.roomId
} }
displayConfigApi.list({ storeroomId: '' }).then((data) => { displayConfigApi.list({ storeroomId: '' }).then((data) => {
this.camConfigData = data
if (data) {
this.camConfigData = data
}
}) })
}, },
methods: { methods: {

10
src/views/storeManage/warehouse3D/module/video.vue

@ -17,7 +17,7 @@ export default {
openVideoVisible: false, openVideoVisible: false,
videoTitle: '', videoTitle: '',
camConfig: null, camConfig: null,
myVideo: null
player: null
} }
}, },
methods: { methods: {
@ -25,19 +25,21 @@ export default {
this.openVideoVisible = false this.openVideoVisible = false
// this.myVideo = document.getElementById('canvas') // this.myVideo = document.getElementById('canvas')
// this.myVideo.pause() // this.myVideo.pause()
// $.post('http://127.0.0.1:3000/cameras/close/', { rtspUrl: $('#rtsp').val() }, function(result) {
this.player.destroy()
// })
done() done()
}, },
play() { play() {
// const rtspUrl = 'rtsp://' + this.camConfig.deviceInfo.deviceAccount + ':' + this.camConfig.deviceInfo.devicePassword + '@' + this.camConfig.deviceInfo.deviceIp + ':' + this.camConfig.deviceInfo.devicePort + '/' + this.camConfig.deviceInfo.videoRoute + '/1' // const rtspUrl = 'rtsp://' + this.camConfig.deviceInfo.deviceAccount + ':' + this.camConfig.deviceInfo.devicePassword + '@' + this.camConfig.deviceInfo.deviceIp + ':' + this.camConfig.deviceInfo.devicePort + '/' + this.camConfig.deviceInfo.videoRoute + '/1'
// const data = { rtspUrl: rtspUrl, size: '1024*768' } // const data = { rtspUrl: rtspUrl, size: '1024*768' }
const url = 'ws://127.0.0.1:3539'
const url = 'ws://127.0.0.1:3151'
var canvas = document.getElementById('canvas') var canvas = document.getElementById('canvas')
const opt = { const opt = {
canvas: canvas, canvas: canvas,
poster: '0.jpg' poster: '0.jpg'
} }
const player = new JSMpeg.Player(url, opt)
console.log(player)
this.player = new JSMpeg.Player(url, opt)
} }
} }
} }

Loading…
Cancel
Save