Last active
May 18, 2022 21:25
-
-
Save Adophilus/82659a3082646b750db7eda564c4364d to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<!-- REDACTED --> | |
</head> | |
<body> | |
<video id="player"></video> | |
<!-- On the watcher --> | |
<script src="https://cdn.socket.io/4.5.0/socket.io.min.js" integrity="sha384-7EyYLQZgWBi67fBtVxw60/OWl1kjsfrPFcaU0pp0nAh+i8FD068QogUvg85Ewy1k" crossorigin="anonymous"></script> | |
<script src="https://github.com/Adophilus/video-streaming/raw/main/public/peerjs%401.3.1.min.js"></script> | |
<script src="https://github.com/Adophilus/video-streaming/raw/main/public/watcher.js"></script> | |
<script> | |
let vid = document.querySelector("video#player") | |
let watcher = new Watcher(vid) | |
// watcher.stop() // to stop the watcher. The watcher cannot be resumed after stopped | |
</script> | |
<!-- On the broadcaster --> | |
<script src="https://cdn.socket.io/4.5.0/socket.io.min.js" integrity="sha384-7EyYLQZgWBi67fBtVxw60/OWl1kjsfrPFcaU0pp0nAh+i8FD068QogUvg85Ewy1k" crossorigin="anonymous"></script> | |
<script src="https://github.com/Adophilus/video-streaming/raw/main/public/peerjs%401.3.1.min.js"></script> | |
<script src="https://github.com/Adophilus/video-streaming/raw/main/public/broadcaster.js"></script> | |
<script> | |
let broadcaster = new Broadcaster() | |
broadcaster.start() | |
// broadcaster.pause() // to pause the broadcaster | |
// broadcaster.resume() // to resume the broadcaster | |
// broadcaster.stop() // to stop the broadcaster. It cannot be resumed after it has been stopped | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment