From dc85547a4e5b3d377c7613efa32fc6cc0ab2e8c1 Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期四, 11 四月 2024 09:23:14 +0800
Subject: [PATCH] app光电查询rtsp路径修改提交

---
 ard-work/src/main/resources/templates/preview.html |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/ard-work/src/main/resources/templates/preview.html b/ard-work/src/main/resources/templates/preview.html
index f3ec144..273683e 100644
--- a/ard-work/src/main/resources/templates/preview.html
+++ b/ard-work/src/main/resources/templates/preview.html
@@ -110,6 +110,10 @@
     console.log(RTCRtpReceiver.getCapabilities('video').codecs)
     console.log(RTCRtpReceiver.getCapabilities('audio').codecs)
     //whep鎿嶄綔鏂规硶
+    const restartPause = 2000;
+    const unquoteCredential = (v) => (
+        JSON.parse(`"${v}"`)
+    );
     const linkToIceServers = (links) => (
         (links !== null) ? links.split(', ').map((link) => {
             const m = link.match(/^<(.+?)>; rel="ice-server"(; username="(.*?)"; credential="(.*?)"; credential-type="password")?/i);
@@ -190,9 +194,6 @@
             console.log("requesting ICE servers");
             fetch(this.wurl, {
                 method: 'OPTIONS',
-                headers: {
-                    'Referer': this.wurl,
-                },
             })
                 .then((res) => this.onIceServers(res))
                 .catch((err) => {
@@ -232,7 +233,6 @@
                 method: 'POST',
                 headers: {
                     'Content-Type': 'application/sdp',
-                    'Referer': this.wurl,
                 },
                 body: offer.sdp,
             })
@@ -240,7 +240,7 @@
                     if (res.status !== 201) {
                         throw new Error('bad status code');
                     }
-                   // this.eTag = res.headers.get('ETag');
+                    // this.eTag = res.headers.get('ETag');
                     this.eTag = res.headers.get("ETag") || res.headers.get('E-Tag');
                     return res.text();
                 })
@@ -300,7 +300,6 @@
                 headers: {
                     'Content-Type': 'application/trickle-ice-sdpfrag',
                     'If-Match': this.eTag,
-                    'Referer': this.wurl,
                 },
 
                 body: generateSdpFragment(this.offerData, candidates),

--
Gitblit v1.9.3