Skip to content

Instantly share code, notes, and snippets.

@ovlb
Created February 5, 2019 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ovlb/c57e4eba46c01462c92e51aa67e67b51 to your computer and use it in GitHub Desktop.
Save ovlb/c57e4eba46c01462c92e51aa67e67b51 to your computer and use it in GitHub Desktop.
KS Video – Parse HLS manifest with library
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