Closed saeedesmaili closed 1 month ago
loads
loads a playlist from a string. You need to use load
if you want to load from a URL, as shown at https://github.com/globocom/m3u8?tab=readme-ov-file#loading-a-playlist.
Once you have that, you can use the bits at https://github.com/globocom/m3u8#variant-playlists-variable-bitrates. Subtitle playlists are described in MEDIA
tags with TYPE=SUBTITLES
- get the URI
for the one you are interested in and load
that.
Thank you @davemevans
I was trying to use this library to parse a m3u8 file from apple's website: m3u8 file: https://devstreaming-cdn.apple.com/videos/wwdc/2021/102/9/185FF8CB-65B8-468D-9AF3-E6B6444F9AB7/cmaf.m3u8 video: https://developer.apple.com/videos/play/wwdc2021/102/
When I load the URL, it doesn't have any data:
There are a bunch of other m3u8 files inside this file, and I wonder what's the best way to parse such a playlist file? I aim to get to the video's subtitle (webvtt) from this playlist file.