|
@ -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) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|