Created
February 5, 2019 23:09
-
-
Save ovlb/c57e4eba46c01462c92e51aa67e67b51 to your computer and use it in GitHub Desktop.
KS Video – Parse HLS manifest with library
This file contains hidden or 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
parseHlsManifest() { | |
console.log('HLS – Parsing video manifest') | |
const { Hls } = window | |
const hls = new Hls() | |
const { src } = this.$vidContainer | |
hls.loadSource(src) | |
hls.attachMedia(this.$vidContainer) | |
hls.on(Hls.Events.MANIFEST_PARSED, () => { | |
this.parsed = true | |
this.playVideo() | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment