ansible/roles/nginx-rtmp/templates/index.html

29 lines
768 B
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Crans Live</title>
<link href="//unpkg.com/bootstrap@4.5/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="//unpkg.com/video.js@7/dist/video-js.min.css" rel="stylesheet">
</head>
<body class="bg-dark m-2">
<div class="container">
<video id="my-video" class="video-js embed-responsive shadow-lg rounded-sm"></video>
</div>
<script src="//unpkg.com/video.js@7/dist/video.min.js"></script>
<script>
const videoId = window.location.pathname.split("/").pop()
videojs('my-video', {
controls: true,
autoplay: true,
preload: 'auto',
muted: true
}).src({
type: 'application/x-mpegURL',
src: `/hls/${videoId}.m3u8`
});
</script>
</body>
</html>