23 lines
504 B
HTML
23 lines
504 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head><meta charset="UTF-8"></head>
|
|
<body>
|
|
<div id="Page that opens a single peerconnection"></div>
|
|
<script>
|
|
let test = async () => {
|
|
let pc = new RTCPeerConnection();
|
|
pc.addTransceiver('audio');
|
|
pc.addTransceiver('video');
|
|
await pc.setLocalDescription();
|
|
await new Promise(r => {
|
|
pc.onicegatheringstatechange = () => {
|
|
if (pc.iceGatheringState == "complete") {
|
|
r();
|
|
}
|
|
};
|
|
});
|
|
};
|
|
test();
|
|
</script>
|
|
</body>
|
|
</html>
|