修复wvp使用https时播放流地址使用wss,以使用ssl播放

This commit is contained in:
648540858
2021-09-30 16:46:10 +08:00
parent da44fae98d
commit b922898129
3 changed files with 124 additions and 2 deletions

View File

@@ -285,7 +285,21 @@ export default {
let baseZlmApi = process.env.NODE_ENV === 'development'?`${location.host}/debug/zlm`:`${location.host}/zlm`
// return `${baseZlmApi}/${streamInfo.app}/${streamInfo.streamId}.flv`;
// return `http://${baseZlmApi}/${streamInfo.app}/${streamInfo.streamId}.flv`;
return streamInfo.ws_flv;
if (location.protocol === "https:") {
if (streamInfo.wss_flv === null) {
this.$message({
showClose: true,
message: '媒体服务器未配置ssl端口',
type: 'error'
});
}else {
return streamInfo.wss_flv;
}
}else {
return streamInfo.ws_flv;
}
},
coverPlay: function () {
var that = this;