blob: 55f6fa2db924c9666cf5d256b6265df34235746a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<html>
<head>
<script>
window.addEventListener('load', async () => {
const peer = new RTCPeerConnection({})
await peer.createOffer({ 'offerToReceiveVideo': true })
const receivers = peer.getReceivers()
const sender = peer.addTrack(receivers[0].track)
peer.close()
await sender.getStats()
await sender.replaceTrack(receivers[0].track)
})
</script>
</head>
</html>
|