html: fix syntax problem in iceServers (#77)

This commit is contained in:
Zeyu Dong 2023-06-26 07:46:41 -04:00 committed by GitHub
parent 01b0e969b3
commit afff8b9d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -754,11 +754,11 @@
show(videoContainer); show(videoContainer);
const iceServers = [ const iceServers = [
[ { urls: ['stun:stun.l.google.com:19302'] } ] { urls: ['stun:stun.l.google.com:19302'] }
]; ];
fetch(webrtcURL, { fetch(webrtcURL, {
body: JSON.stringify({type: 'request'}), body: JSON.stringify({type: 'request', iceServers: iceServers}),
headers: {'Content-Type': 'application/json'}, headers: {'Content-Type': 'application/json'},
method: 'POST' method: 'POST'
}).then(function(response) { }).then(function(response) {
@ -819,4 +819,4 @@
} }
}) })
</script> </script>
</html> </html>

View File

@ -48,7 +48,7 @@
<script> <script>
function startWebRTC() { function startWebRTC() {
const iceServers = [ const iceServers = [
[ { urls: ['stun:stun.l.google.com:19302'] } ] { urls: ['stun:stun.l.google.com:19302'] }
]; ];
var pc = null; var pc = null;