Created
March 25, 2021 19:06
-
-
Save LiorB-D/66d92be4673b37cd17b42e92cf133449 to your computer and use it in GitHub Desktop.
Video Chat - room.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Set the ROOM_ID variable to the roomId that is passed in by server.js --> | |
<script> | |
const ROOM_ID = "<%= roomId %>" | |
</script> | |
<!-- CDN in the peerJS and socket.io libraries --> | |
<script defer src="https://unpkg.com/peerjs@1.3.1/dist/peerjs.min.js"></script> | |
<script src = "/socket.io/socket.io.js" defer></script> | |
<!-- Load in script.js, our client-side script --> | |
<script src = "script.js" defer></script> | |
<title>Video App</title> | |
<!-- Make a grid of 300x300 videos --> | |
<style> | |
#video-grid { | |
display: grid; | |
grid-template-columns: repeat(auto-fill, 300px); | |
grid-auto-rows: 300px; | |
} | |
video { | |
width: 100%; | |
height: 100%; | |
object-fit: cover; | |
} | |
</style> | |
</head> | |
<body> | |
<!-- Make our video grid --> | |
<div id="video-grid"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment