1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-05 17:46:24 +00:00
NewPipe/app/src
AudricV e3c2aea3cc
Fix playback of non-URI HLS streams
A custom HlsPlaylistParserFactory cannot be used anymore to play HLS streams.

This needs to be replaced by a custom HlsDataSourceFactory, which returns a ByteArrayDataSource (where the bytes of this DataSource correspond to the bytes of the playlist string) and a specified DataSource for other request types.

This model has two limitations:

- if media requests are relative, the URI from which the manifest comes from (either the manifest URI (preferred) or the master URI (if applicable)) must be returned, otherwise the content will be not playable, as it will be an invalid URL, or it may be treat as something unexpected, for instance as a file for DefaultDataSources;
- if the playlist is a master playlist, endless loops should be encountered because the DataSources created for media playlists will use the master playlist response instead of fetching the corresponding playlist. With the current model of HlsDataSourceFactory, there is no possibility to distinguish the playlist type or the URI that is requested.

If ExoPlayer provides a way to create HlsMediaSources with an HlsPlaylist in the future, it should be used instead of this solution.
2022-06-17 22:01:30 +02:00
..
androidTest/java/org/schabi/newpipe Add support of other delivery methods than progressive HTTP (in the player only) 2022-06-17 22:00:22 +02:00
debug Improved documentation 2022-01-24 21:08:48 +01:00
main Fix playback of non-URI HLS streams 2022-06-17 22:01:30 +02:00
test Add support of other delivery methods than progressive HTTP (in the player only) 2022-06-17 22:00:22 +02:00