Skip to content

Commit

Permalink
Update display_text.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Agoston10 authored May 30, 2024
1 parent 8f57fa4 commit 80a558c
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions display_text.html
Original file line number Diff line number Diff line change
@@ -1,29 +1 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Webcam Stream</title>
</head>
<body>
<h1>Live Stream</h1>
<video id="video" width="640" height="480" controls autoplay></video>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script>
if (Hls.isSupported()) {
var video = document.getElementById('video');
var hls = new Hls();
hls.loadSource('http://localhost:8080/live/mystream.flv');
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function () {
video.play();
});
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = 'http://localhost:8080/live/mystream.flv';
video.addEventListener('canplay', function () {
video.play();
});
}
</script>
</body>
</html>

0 comments on commit 80a558c

Please sign in to comment.