brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.51k stars 2.26k forks source link

Playlist: HLS (.m3u8) files not playing #30093

Open petemill opened 1 year ago

petemill commented 1 year ago

Description

Playlist service is assuming all files will be .mp4 (or single file). Many sites provide an m3u8 index which offers conditional chunks based on device characteristics like resolution or network speed. This affects:

The HLS Playlist format looks like this:

Android stop-gap solution

In order to support m3u8 on android the quickest, we could allow Android to perform its own .m3u8 offline download with local APIs which are available. The android Java would check its own offline state for each media item as well as the Playlist Service's offline state for each media item.

In the future, the Playlist Service may support .m3u8 / HSL offline download and we can change Android to use that at that time.

Supporting offline HLS media downloads in Chromium

To integrate HSL in to the current PlaylistService architecture, we would need to

Parsing

Unknowns

sangwoo108 commented 1 year ago

@deeppandya , so online playing wasn't working with wrong extension? I'm really curious why it had worked before.

deeppandya commented 1 year ago

@deeppandya , so online playing wasn't working with wrong extension? I'm really curious why it had worked before.

I have the implementation ready to work with HLS file with online mode.

sangwoo108 commented 1 year ago

I have the implementation ready to work with HLS file with online mode.

I mean, you said it worked before, HLS wasn't supported then?

sangwoo108 commented 1 year ago

Accidentlay typed "Playlist" to cs.chromium.org and got this

https://source.chromium.org/chromium/chromium/src/+/8b69eb115911bcb85a160c7ae31e4c323535f5eb:media/formats/hls/playlist.h;bpv=1;bpt=0