commit
f4ee7271e7
|
@ -121,6 +121,10 @@
|
||||||
<el-tag >RTC:</el-tag>
|
<el-tag >RTC:</el-tag>
|
||||||
<span>{{ streamInfo.rtc }}</span>
|
<span>{{ streamInfo.rtc }}</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="streamInfo.rtcs">
|
||||||
|
<el-tag >RTCS:</el-tag>
|
||||||
|
<span>{{ streamInfo.rtcs }}</span>
|
||||||
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="streamInfo.rtmp">
|
<el-dropdown-item :command="streamInfo.rtmp">
|
||||||
<el-tag >RTMP:</el-tag>
|
<el-tag >RTMP:</el-tag>
|
||||||
<span>{{ streamInfo.rtmp }}</span>
|
<span>{{ streamInfo.rtmp }}</span>
|
||||||
|
@ -322,7 +326,7 @@ export default {
|
||||||
player: {
|
player: {
|
||||||
jessibuca : ["ws_flv", "wss_flv"],
|
jessibuca : ["ws_flv", "wss_flv"],
|
||||||
livePlayer : ["ws_flv", "wss_flv"],
|
livePlayer : ["ws_flv", "wss_flv"],
|
||||||
webRTC: ["rtc", "rtc"],
|
webRTC: ["rtc", "rtcs"],
|
||||||
},
|
},
|
||||||
videoHistory: {
|
videoHistory: {
|
||||||
date: '',
|
date: '',
|
||||||
|
@ -393,7 +397,7 @@ export default {
|
||||||
changePlayer: function (tab) {
|
changePlayer: function (tab) {
|
||||||
console.log(this.player[tab.name][0])
|
console.log(this.player[tab.name][0])
|
||||||
this.activePlayer = tab.name;
|
this.activePlayer = tab.name;
|
||||||
this.videoUrl = this.streamInfo[this.player[tab.name][0]]
|
this.videoUrl = this.getUrlByStreamInfo()
|
||||||
console.log(this.videoUrl)
|
console.log(this.videoUrl)
|
||||||
},
|
},
|
||||||
openDialog: function (tab, deviceId, channelId, param) {
|
openDialog: function (tab, deviceId, channelId, param) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
webrtcPlayer.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,(e)=>{//获取到了远端流,可以播放
|
webrtcPlayer.on(ZLMRTCClient.Events.WEBRTC_ON_REMOTE_STREAMS,(e)=>{//获取到了远端流,可以播放
|
||||||
console.error('播放成功',e.streams)
|
console.log('播放成功',e.streams)
|
||||||
this.eventcallbacK("playing", "播放成功")
|
this.eventcallbacK("playing", "播放成功")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
||||||
console.error('offer anwser 交换失败',e)
|
console.error('offer anwser 交换失败',e)
|
||||||
this.eventcallbacK("OFFER ANSWER ERROR ", "offer anwser 交换失败")
|
this.eventcallbacK("OFFER ANSWER ERROR ", "offer anwser 交换失败")
|
||||||
if (e.code ==-400 && e.msg=="流不存在"){
|
if (e.code ==-400 && e.msg=="流不存在"){
|
||||||
console.log("111111")
|
console.log("流不存在")
|
||||||
this.timer = setTimeout(()=>{
|
this.timer = setTimeout(()=>{
|
||||||
this.webrtcPlayer.close();
|
this.webrtcPlayer.close();
|
||||||
this.play(url)
|
this.play(url)
|
||||||
|
|
|
@ -138,8 +138,14 @@ export default {
|
||||||
url: '/api/play/start/' + deviceId + '/' + channelId
|
url: '/api/play/start/' + deviceId + '/' + channelId
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
itemData.playUrl = res.data.data.httpsFlv
|
let videoUrl;
|
||||||
that.setPlayUrl(res.data.data.ws_flv, idxTmp)
|
if (location.protocol === "https:") {
|
||||||
|
videoUrl = res.data.data.wss_flv;
|
||||||
|
} else {
|
||||||
|
videoUrl = res.data.data.ws_flv;
|
||||||
|
}
|
||||||
|
itemData.playUrl = videoUrl;
|
||||||
|
that.setPlayUrl(videoUrl, idxTmp);
|
||||||
} else {
|
} else {
|
||||||
that.$message.error(res.data.msg);
|
that.$message.error(res.data.msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue