Added bigbuck.mp4, the sample file Install nodemon module for streaming Modified index.html to contain the video, and changed the title Modified index.js to add /video dir for the video streaming
24 lines
647 B
HTML
24 lines
647 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Client</title>
|
|
</head>
|
|
<body>
|
|
Client page!
|
|
<br/>
|
|
<video id="videoPlayer" width="650" controls disablePictureInPicture controlsList="nodownload" autoplay>
|
|
<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> |