mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
开源版本,视频直播功能
This commit is contained in:
@@ -138,16 +138,7 @@ export default {
|
|||||||
this.$refs.player.registercallback('loadingTimeout', this.TimeoutCallback);
|
this.$refs.player.registercallback('loadingTimeout', this.TimeoutCallback);
|
||||||
this.$refs.player.registercallback('delayTimeout', this.TimeoutCallback);
|
this.$refs.player.registercallback('delayTimeout', this.TimeoutCallback);
|
||||||
if (this.playrecord) {
|
if (this.playrecord) {
|
||||||
startPlayRecord(this.deviceId, this.channelId).then((response) => {
|
|
||||||
console.log('开始录像:' + this.deviceId + ' : ' + this.channelId);
|
|
||||||
const res = response.data;
|
|
||||||
this.streamId = res.streamId;
|
|
||||||
this.playurl = res.playurl;
|
|
||||||
this.$refs.player.play(res.playurl);
|
|
||||||
this.playing = true;
|
|
||||||
this.playrecording = true;
|
|
||||||
this.pushStream = true;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
startPlay(this.deviceId, this.channelId).then((response) => {
|
startPlay(this.deviceId, this.channelId).then((response) => {
|
||||||
console.log('开始推流: [' + this.streamId + ']');
|
console.log('开始推流: [' + this.streamId + ']');
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default {
|
|||||||
if (useVconsole && window.VConsole) {
|
if (useVconsole && window.VConsole) {
|
||||||
new window.VConsole();
|
new window.VConsole();
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$forceUpdate(() => {
|
||||||
this.initplayer();
|
this.initplayer();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -562,7 +562,6 @@ export default {
|
|||||||
tabChange(panel) {
|
tabChange(panel) {
|
||||||
if (this.form.deviceType == 3 && panel.name != 'deviceReturn') {
|
if (this.form.deviceType == 3 && panel.name != 'deviceReturn') {
|
||||||
if (panel.name === 'videoLive') {
|
if (panel.name === 'videoLive') {
|
||||||
this.$refs.deviceVideo.destroy();
|
|
||||||
if (this.channelId) {
|
if (this.channelId) {
|
||||||
this.$refs.deviceLiveStream.channelId = this.channelId;
|
this.$refs.deviceLiveStream.channelId = this.channelId;
|
||||||
this.$refs.deviceLiveStream.changeChannel();
|
this.$refs.deviceLiveStream.changeChannel();
|
||||||
@@ -570,11 +569,6 @@ export default {
|
|||||||
if (this.$refs.deviceLiveStream.channelId) {
|
if (this.$refs.deviceLiveStream.channelId) {
|
||||||
this.$refs.deviceLiveStream.changeChannel();
|
this.$refs.deviceLiveStream.changeChannel();
|
||||||
}
|
}
|
||||||
} else if (panel.name === 'deviceVideo') {
|
|
||||||
this.$refs.deviceLiveStream.destroy();
|
|
||||||
if (this.$refs.deviceVideo.channelId && this.$refs.deviceVideo.queryDate) {
|
|
||||||
this.$refs.deviceVideo.loadDevRecord();
|
|
||||||
}
|
|
||||||
} else if (panel.name === 'sipChannel') {
|
} else if (panel.name === 'sipChannel') {
|
||||||
this.$refs.deviceChannel.getList();
|
this.$refs.deviceChannel.getList();
|
||||||
}
|
}
|
||||||
@@ -584,12 +578,6 @@ export default {
|
|||||||
this.$refs.deviceLiveStream.closeDestroy(false);
|
this.$refs.deviceLiveStream.closeDestroy(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//关闭录像流
|
|
||||||
if (panel.name !== 'deviceVideo') {
|
|
||||||
if(this.$refs.deviceVideo.playing) {
|
|
||||||
this.$refs.deviceVideo.closeDestroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 获取监测统计数据
|
// 获取监测统计数据
|
||||||
|
|||||||
Reference in New Issue
Block a user