From 38f29e38fcc668171dc05c53d40a36b895c86102 Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: 星期四, 10 十月 2024 13:34:28 +0800
Subject: [PATCH] init

---
 ard-work/src/main/resources/templates/preview.html |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ard-work/src/main/resources/templates/preview.html b/ard-work/src/main/resources/templates/preview.html
index 609e256..003d22d 100644
--- a/ard-work/src/main/resources/templates/preview.html
+++ b/ard-work/src/main/resources/templates/preview.html
@@ -101,7 +101,7 @@
             <button class="toggle-button" onclick="changeGrid(7, 7)">7x7</button>
             <button class="toggle-button" onclick="changeGrid(8, 8)">8x8</button>
             <button class="toggle-button" onclick="changeGrid(9, 9)">9x9</button>
-            <input id="videoUrl" type="text" value="http://192.168.1.227:8889/164/" style="width: 250px"/>
+            <input id="videoUrl" type="text" value="http://192.168.1.227:8889/0d1c9f80a7b4480c8b401ba6b140b581_1/" style="width: 250px"/>
         </div>
     </div>
 </div>
@@ -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);
@@ -236,8 +240,9 @@
                     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');
+                    this.wurl = new URL(res.headers.get('location'),  this.wurl.origin).toString();
                     return res.text();
                 })
                 .then((sdp) => this.onRemoteAnswer(new RTCSessionDescription({
@@ -297,6 +302,7 @@
                     'Content-Type': 'application/trickle-ice-sdpfrag',
                     'If-Match': this.eTag,
                 },
+
                 body: generateSdpFragment(this.offerData, candidates),
             })
                 .then((res) => {

--
Gitblit v1.9.3