<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<video id="video" width="1280" height="720" controls autoplay muted></video>
<script>
var video = document.getElementById('video');
var videoSrc = 'https://webcams.coecis.cornell.edu/solar_clock.m3u8';
//
// First check for native browser HLS support
//
if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = videoSrc;
video.addEventListener('canplay',function()
{
video.play();
});
//
// If no native HLS support, check if HLS.js is supported
//
} else if (Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(videoSrc);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function()
{
video.play();
});
}
</script>
Adjust the VIDEO tag to specify the width and height of the video window. Common widths and heights are: 1920x1080, 1280x720, 854x480, 640x360
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<video id="video" width="1280" height="720" controls autoplay muted></video>
<script>
var video = document.getElementById('video');
var videoSrc = 'https://webcams.coecis.cornell.edu/solar_clock_second_broadcast.m3u8';
//
// First check for native browser HLS support
//
if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = videoSrc;
video.addEventListener('canplay',function()
{
video.play();
});
//
// If no native HLS support, check if HLS.js is supported
//
} else if (Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(videoSrc);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function()
{
video.play();
});
}
</script>
Adjust the VIDEO tag to specify the width and height of the video window. Common widths and heights are: 1920x1080, 1280x720, 854x480, 640x360