Spaces:
Running
Running
| <html> | |
| <head> | |
| <title>Video Call</title> | |
| <script src="https://webrtc.github.io/adapter/adapter-latest.js"></script> | |
| </head> | |
| <body> | |
| <h1>Video Call Room</h1> | |
| <video id="localVideo" autoplay playsinline></video> | |
| <video id="remoteVideo" autoplay playsinline></video> | |
| <script> | |
| // WebRTC connection setup | |
| const localVideo = document.getElementById('localVideo'); | |
| const remoteVideo = document.getElementById('remoteVideo'); | |
| const constraints = { video: true, audio: true }; | |
| navigator.mediaDevices.getUserMedia(constraints).then(stream => { | |
| localVideo.srcObject = stream; | |
| // Handle further signaling and P2P connection logic here | |
| }).catch(error => console.error(error)); | |
| </script> | |
| </body> | |
| </html> | |