First working p2p videochat.
I've integrated a simple react express backend with a Peerjs server. It can be published under a simple "ngrok.io" tunnel for testing on internet.
This commit is contained in:
33
games-party/views/room.ejs
Normal file
33
games-party/views/room.ejs
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script>
|
||||
const ROOM_ID = "<%= roomId %>"
|
||||
</script>
|
||||
<script src="/socket.io/socket.io.js" defer></script>
|
||||
<script src="https://unpkg.com/peerjs@1.3.1/dist/peerjs.min.js" defer></script>
|
||||
<script src="/app.js" defer></script>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<style>
|
||||
#video-grid {
|
||||
display: grip;
|
||||
grid-template-rows: repeat(auto-fill, 300px);
|
||||
grid-auto-rows: 300px;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div id="video-grid"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user