Added video-sync for clients. Tweaked the code.
Moved the script for index.html (the home page) to client.js Created a new directory for videos: /videos Added a new video: /videos/Shreksophone_Original.mp4 Moved bigbuck.mp4 to /videos Added the video-sync clinet code to client.js Added the video-sync client code to index.js Updated index.html inner html to work with the vidoe-sync
This commit is contained in:
11
index.html
11
index.html
@@ -3,22 +3,15 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script defer type="text/javascript" src="client.js"></script>
|
||||
<title>Client</title>
|
||||
</head>
|
||||
<body>
|
||||
Client page!
|
||||
<br/>
|
||||
<video id="videoPlayer" width="650" controls disablePictureInPicture controlsList="nodownload" autoplay>
|
||||
<video id="videoPlayer" width="650" controls disablePictureInPicture controlsList="nodownload noplaybackrate" muted>
|
||||
<source src="/video" type="video/mp4" />
|
||||
</video>
|
||||
</body>
|
||||
<script>
|
||||
// Create WebSocket connection.
|
||||
const socket = new WebSocket('ws://localhost:3000');
|
||||
|
||||
// Connection opened
|
||||
socket.addEventListener('open', function (event) {
|
||||
console.log('Connected to WS Server')
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user