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 @@