From 634ef0c55b5384cadcf27b43acb19d92b3471135 Mon Sep 17 00:00:00 2001 From: yxq Date: Wed, 9 Oct 2024 15:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=A1=B5=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=9B=BF=E6=8D=A2=E6=BC=94=E7=A4=BA=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SafeCampus.WEB/public/static/rtsPlayer.html | 3 +-- .../components/traceShow/index.vue | 7 +++++- .../views/attendance/behaviorTrace/index.vue | 4 ++++ .../components/returnConfirm/index.vue | 7 +++++- .../components/returnDetail/index.vue | 7 +++++- SafeCampus.WEB/src/views/screen/classroom.vue | 16 +++++++------ .../views/screen/component/index/video.vue | 23 +++++++++++++------ SafeCampus.WEB/src/views/screen/stureturn.vue | 16 +++++++------ 8 files changed, 57 insertions(+), 26 deletions(-) diff --git a/SafeCampus.WEB/public/static/rtsPlayer.html b/SafeCampus.WEB/public/static/rtsPlayer.html index c3df404..637ad2f 100644 --- a/SafeCampus.WEB/public/static/rtsPlayer.html +++ b/SafeCampus.WEB/public/static/rtsPlayer.html @@ -51,7 +51,7 @@ }; var player = new Aliplayer(options, function () {/* player ready */ }); - + player.setVolume(0) // 降级时会触发此事件 player.on('rtsFallback', function (event) { console.log('[EVENT]rtsFallback', event.paramData); @@ -66,7 +66,6 @@ // 当RTS拉流成功时触发,通过订阅该事件,可以获取到RTS TraceId player.on('rtsTraceId', function (data) { console.log('[EVENT]rtsTraceId', data.paramData); - player.setVolume(0) let fullscreenBtn = document.querySelector('.prism-controlbar .prism-fullscreen-btn') if(fullscreenBtn)fullscreenBtn.style.display = 'none' // event.paramData.traceId 拉流的TraceId diff --git a/SafeCampus.WEB/src/views/attendance/behaviorTrace/components/traceShow/index.vue b/SafeCampus.WEB/src/views/attendance/behaviorTrace/components/traceShow/index.vue index 7c8153b..a53909e 100644 --- a/SafeCampus.WEB/src/views/attendance/behaviorTrace/components/traceShow/index.vue +++ b/SafeCampus.WEB/src/views/attendance/behaviorTrace/components/traceShow/index.vue @@ -144,5 +144,10 @@ defineExpose({ }); - + \ No newline at end of file diff --git a/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue b/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue index f259486..9530ac3 100644 --- a/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue +++ b/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue @@ -192,6 +192,10 @@ onMounted(async () => { }); + \ No newline at end of file diff --git a/SafeCampus.WEB/src/views/attendance/studentsReturn/components/returnDetail/index.vue b/SafeCampus.WEB/src/views/attendance/studentsReturn/components/returnDetail/index.vue index 181acb6..25db667 100644 --- a/SafeCampus.WEB/src/views/attendance/studentsReturn/components/returnDetail/index.vue +++ b/SafeCampus.WEB/src/views/attendance/studentsReturn/components/returnDetail/index.vue @@ -124,5 +124,10 @@ defineExpose({ }); - + \ No newline at end of file diff --git a/SafeCampus.WEB/src/views/screen/classroom.vue b/SafeCampus.WEB/src/views/screen/classroom.vue index 0946790..dd5d1b4 100644 --- a/SafeCampus.WEB/src/views/screen/classroom.vue +++ b/SafeCampus.WEB/src/views/screen/classroom.vue @@ -117,13 +117,15 @@ const showRts = sensorId_ => { let rtsUrl_ = "/static/rtsPlayer.html?height=556px&rtsUrl="; sensorId.value = sensorId_; screenApi.detail({ sensorId: sensorId_ }).then(res => { - if (res.code == 200) { - if (res.data.rtsPullStreamUrls[0]) { - rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; - } - streamId.value = res.data.streamId; - videoToken.value = res.data.videoToken; - } + // if (res.code == 200) { + // if (res.data.rtsPullStreamUrls[0]) { + // rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; + // } + // streamId.value = res.data.streamId; + // videoToken.value = res.data.videoToken; + // } + // 演示 + rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/5.mp4"; }); } }; diff --git a/SafeCampus.WEB/src/views/screen/component/index/video.vue b/SafeCampus.WEB/src/views/screen/component/index/video.vue index 2326399..898dd0b 100644 --- a/SafeCampus.WEB/src/views/screen/component/index/video.vue +++ b/SafeCampus.WEB/src/views/screen/component/index/video.vue @@ -16,7 +16,6 @@
-
@@ -122,12 +121,22 @@ const itemClick = item => { let rtsUrl_ = "/static/rtsPlayer.html?height=487px&rtsUrl="; sensorId.value = item.sensorId; screenApi.detail({ sensorId: item.sensorId }).then(res => { - if (res.code == 200) { - if (res.data.rtsPullStreamUrls[0]) { - rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; - } - streamId.value = res.data.streamId; - videoToken.value = res.data.videoToken; + // if (res.code == 200) { + // if (res.data.rtsPullStreamUrls[0]) { + // rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; + // } + // streamId.value = res.data.streamId; + // videoToken.value = res.data.videoToken; + // } + // 演示 + if (item.sensorName == "厨房(良景)") { + rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/4.mp4"; + } + if (item.sensorName == "大厅(魔豆)") { + rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/2.mp4"; + } + if (item.sensorName == "教学区域(海康)") { + rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/5.mp4"; } }); }; diff --git a/SafeCampus.WEB/src/views/screen/stureturn.vue b/SafeCampus.WEB/src/views/screen/stureturn.vue index 338cf70..6200c26 100644 --- a/SafeCampus.WEB/src/views/screen/stureturn.vue +++ b/SafeCampus.WEB/src/views/screen/stureturn.vue @@ -132,13 +132,15 @@ const showRts = sensorId_ => { let rtsUrl_ = "/static/rtsPlayer.html?height=446px&rtsUrl="; sensorId.value = sensorId_; screenApi.detail({ sensorId: sensorId_ }).then(res => { - if (res.code == 200) { - if (res.data.rtsPullStreamUrls[0]) { - rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; - } - streamId.value = res.data.streamId; - videoToken.value = res.data.videoToken; - } + // if (res.code == 200) { + // if (res.data.rtsPullStreamUrls[0]) { + // rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; + // } + // streamId.value = res.data.streamId; + // videoToken.value = res.data.videoToken; + // } + // 演示 + rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/5.mp4"; }); } };