liusuyi
2024-10-10 38f29e38fcc668171dc05c53d40a36b895c86102
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>