From 9aac460a313ac8284e0fd633183c93815f95e0de Mon Sep 17 00:00:00 2001 From: zhangnaisong <2434969829@qq.com> Date: 星期三, 24 七月 2024 17:21:57 +0800 Subject: [PATCH] 实时状态预提交修改提交 --- ard-work/src/main/resources/templates/test.html | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ard-work/src/main/resources/templates/test.html b/ard-work/src/main/resources/templates/test.html index 5623b4b..6284aaf 100644 --- a/ard-work/src/main/resources/templates/test.html +++ b/ard-work/src/main/resources/templates/test.html @@ -1048,8 +1048,10 @@ } // 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({ type: 'answer', sdp, @@ -1093,8 +1095,10 @@ if (evt.candidate !== null) { if (this.eTag === '') { + console.log("222222222222222222222") this.queuedCandidates.push(evt.candidate); } else { + console.log("333333333333333333333") this.sendLocalCandidates([evt.candidate]) } } @@ -1153,7 +1157,6 @@ } function realView(whepUrl, videoId) { - console.log(whepUrl) webrtcClient = new WHEPClient(whepUrl, videoId); } </script> -- Gitblit v1.9.3