|
|
@ -58,7 +58,7 @@ export default { |
|
|
|
// $.post('http://127.0.0.1:3000/cameras/close/', { rtspUrl: $('#rtsp').val() }, function(result) { |
|
|
|
const data = { rtspUrl: this.rtspUrl } |
|
|
|
// console.log(process.env.VUE_APP_CAMERA_API) |
|
|
|
const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + ':3000/cameras/close/' |
|
|
|
const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + '/cameras/close/' |
|
|
|
axios.post(Uri, qs.stringify(data), |
|
|
|
{ |
|
|
|
headers: { |
|
|
@ -76,8 +76,8 @@ export default { |
|
|
|
// this.play() |
|
|
|
}, |
|
|
|
play() { |
|
|
|
const data = { rtspUrl: this.rtspUrl, size: '1024*768' } |
|
|
|
const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + ':3000/cameras/' |
|
|
|
const data = { rtspUrl: this.rtspUrl, size: '1024*768', port: process.env.VUE_APP_CAMERA_API.split(':')[1], videoRoute: this.camConfig.deviceInfo.videoRoute } |
|
|
|
const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + '/cameras/' |
|
|
|
axios.post(Uri, qs.stringify(data), |
|
|
|
{ |
|
|
|
headers: { |
|
|
@ -86,7 +86,8 @@ export default { |
|
|
|
} |
|
|
|
).then(res => { |
|
|
|
// res.data.port |
|
|
|
const url = 'ws://' + process.env.VUE_APP_CAMERA_API + ':' + res.data.port |
|
|
|
const ip = process.env.VUE_APP_CAMERA_API.split(':')[0] |
|
|
|
const url = 'ws://' + ip + ':' + res.data.port |
|
|
|
// var canvas = document.getElementById('canvas') |
|
|
|
const opt = { |
|
|
|
contianer: this.$refs['canvas-wrap'], |
|
|
|