blob: 4b4432c51b4531e47a23d85dad1a38d9cbee380e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<!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>
|