diff --git a/web_src/src/components/CloudRecord.vue b/web_src/src/components/CloudRecord.vue index f5d052a3..78f8a46e 100644 --- a/web_src/src/components/CloudRecord.vue +++ b/web_src/src/components/CloudRecord.vue @@ -6,7 +6,9 @@
- 云端录像 + 云端录像 + +
节点选择: @@ -20,7 +22,6 @@
-
@@ -53,7 +54,7 @@ :total="total">
- +
@@ -72,6 +73,7 @@ return { mediaServerList: [], // 滅体节点列表 mediaServerId: null, // 媒体服务 + mediaServerPath: null, // 媒体服务地址 recordList: [], // 设备列表 chooseRecord: null, // 媒体服务 @@ -115,6 +117,11 @@ that.mediaServerList = data.data; if (that.mediaServerList.length > 0) { that.mediaServerId = that.mediaServerList[0].id + let port = that.mediaServerList[0].httpPort; + if (location.protocol === "https:" && that.mediaServerList[0].httpSSlPort) { + port = that.mediaServerList[0].httpSSlPort + } + that.mediaServerPath = location.protocol + "//" + that.mediaServerList[0].streamIp + ":" + port that.getRecordList(); } }) diff --git a/web_src/src/components/CloudRecordDetail.vue b/web_src/src/components/CloudRecordDetail.vue index 5d6ca90b..fe534ec8 100644 --- a/web_src/src/components/CloudRecordDetail.vue +++ b/web_src/src/components/CloudRecordDetail.vue @@ -15,7 +15,8 @@ {{ item.substring(0,17)}} - + + @@ -75,7 +76,7 @@
  • {{ item.startTime.substr(10) }}-{{item.endTime.substr(10)}} - +
  • @@ -111,10 +112,10 @@ components: { uiHeader, player }, - props: ['recordFile', 'mediaServerId', 'dateFiles'], + props: ['recordFile', 'mediaServerId', 'dateFiles', 'mediaServerPath'], data() { return { - basePath: process.env.NODE_ENV === 'development'?`${location.origin}/debug/zlm/${this.mediaServerId}`:`${location.origin}/zlm/${this.mediaServerId}`, + basePath: `${this.mediaServerPath}/record`, dateFilesObj: [], detailFiles: [], chooseDate: null, @@ -264,7 +265,7 @@ this.videoUrl = ""; }else { // TODO 控制列表滚动条 - this.videoUrl = `${this.basePath}/${this.mediaServerId}/record/${this.recordFile.app}/${this.recordFile.stream}/${this.chooseDate}/${this.choosedFile}` + this.videoUrl = `${this.basePath}/${this.recordFile.app}/${this.recordFile.stream}/${this.chooseDate}/${this.choosedFile}` console.log(this.videoUrl) } diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue index 60cd6001..42dcfc4b 100644 --- a/web_src/src/components/dialog/devicePlayer.vue +++ b/web_src/src/components/dialog/devicePlayer.vue @@ -287,11 +287,13 @@ export default { // return `http://${baseZlmApi}/${streamInfo.app}/${streamInfo.streamId}.flv`; if (location.protocol === "https:") { if (streamInfo.wss_flv === null) { - this.$message({ - showClose: true, - message: '媒体服务器未配置ssl端口', - type: 'error' - }); + console.error("媒体服务器未配置ssl端口, 使用http端口") + // this.$message({ + // showClose: true, + // message: '媒体服务器未配置ssl端口, ', + // type: 'error' + // }); + return streamInfo.ws_flv }else { return streamInfo.wss_flv; }