From 61c240013230d8b91a9e72a81c0ff6fc713c322f Mon Sep 17 00:00:00 2001
From: wwp <782568523@qq.com>
Date: Fri, 22 Nov 2024 09:31:28 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9B=91=E6=8E=A7=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=8E=A5=E5=8F=A3=E5=9C=B0=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/monitor/live/index.vue | 28 ++----
.../monitor/live/{index1.vue => index2.vue} | 28 ++++--
monitorMobile/pages/monitor/index.vue | 88 +++++++------------
.../{index - 副本.vue => index2.vue} | 88 ++++++++++++-------
4 files changed, 116 insertions(+), 116 deletions(-)
rename SafeCampus.WEB/src/views/monitor/live/{index1.vue => index2.vue} (96%)
rename monitorMobile/pages/monitor/{index - 副本.vue => index2.vue} (91%)
diff --git a/SafeCampus.WEB/src/views/monitor/live/index.vue b/SafeCampus.WEB/src/views/monitor/live/index.vue
index a442cd2..19c14d6 100644
--- a/SafeCampus.WEB/src/views/monitor/live/index.vue
+++ b/SafeCampus.WEB/src/views/monitor/live/index.vue
@@ -107,12 +107,12 @@
@@ -436,7 +436,7 @@ function onDetail(row: any) {
visible.value = true;
detailData.sensorId = row.sensorId;
detailData.title = row.sensorName + "(" + row.sensorId + ")";
- getUrl(row.sensorId);
+ getUrl();
}
// 刷新
const showVideo = ref(false);
@@ -449,8 +449,7 @@ function refreshUrl() {
}, 1000);
}
let num = 1;
-
-function getUrl(sensorId:any) {
+function getUrl() {
detailData.videoType = "m3u8";
setTimeout(async () => {
await monitorLIVEApi.detail({ sensorId: detailData.sensorId }).then((res:any) => {
@@ -464,18 +463,7 @@ function getUrl(sensorId:any) {
detailData.streamId = data.streamId;
detailData.videoToken = data.videoToken;
// getvideo1()
- let localurl = ''
- if(sensorId == 'SXT001') {
- localurl = 'http://123.57.209.16:8004/video/1.mp4'
- getvideo2(localurl);
- } else if(sensorId == 'SXT002'){
- localurl = 'http://123.57.209.16:8004/video/5.mp4'
- getvideo2(localurl);
- } else if(sensorId == 'SXT003') {
- localurl = 'http://123.57.209.16:8004/video/2.mp4'
- getvideo2(localurl);
- }
-
+ getvideo2();
}
});
});
@@ -512,10 +500,10 @@ function getvideo1() {
// aliRts.startLiveStream(pullStreamUrl, mediaEle);
}
let player = ref(null);
-function getvideo2(url:any) {
+function getvideo2() {
var options = {
id: "player-con",
- source: url,
+ source: detailData.videoUrl + "&subaudio=no&jitterbuffer=6000",
// "rtsFallbackSource": "降级地址,如HLS",
width: "100%",
height: "500px",
@@ -561,7 +549,7 @@ const handleClose = () => {
visible.value = false;
detailData.videoUrl = "";
detailData.videoType = "";
- // stopUrl();
+ stopUrl();
if (player.value) {
player.value.dispose();
}
diff --git a/SafeCampus.WEB/src/views/monitor/live/index1.vue b/SafeCampus.WEB/src/views/monitor/live/index2.vue
similarity index 96%
rename from SafeCampus.WEB/src/views/monitor/live/index1.vue
rename to SafeCampus.WEB/src/views/monitor/live/index2.vue
index 19c14d6..a442cd2 100644
--- a/SafeCampus.WEB/src/views/monitor/live/index1.vue
+++ b/SafeCampus.WEB/src/views/monitor/live/index2.vue
@@ -107,12 +107,12 @@