Created
January 11, 2019 06:21
-
-
Save tonyspiro/729b52df5b1ba48ea519cc7f641340a2 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
<video id="myVideo" controls></video> | |
<!-- Use HLS.js to support the HLS format in browsers. --> | |
<script src="https://cdn.jsdelivr.net/npm/hls.js@0.8.2"></script> | |
<script> | |
(function(){ | |
// Replace with your asset's playback ID | |
var playbackId = "oIdQlddn3YGhfCK00Mkj0169KMArk2s701Q"; | |
var url = "https://stream.mux.com/"+playbackId+".m3u8"; | |
// HLS.js-specific setup code | |
if (Hls.isSupported()) { | |
var video = document.getElementById("myVideo"); | |
var hls = new Hls(); | |
hls.loadSource(url); | |
hls.attachMedia(video); | |
} | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment