How to switch between hls and progressive factory in playlist
@marcbaechinger is already working on this.
Since May 2, 2023.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Hi. I am getting lists of urls for audio streams, and some of them are hls.
So I am using this logic, which is suitable for playing separate streams:
val mediaSource = if(lastPath?.contains("m3u8") == true ||
lastPath?.contains("m3u") == true) {
HlsMediaSource.Factory(dataSourceFactory)
setAllowChunklessPreparation(true)
.createMediaSource(mediaItem)
} else {
ProgressiveMediaSource.Factory(dataSourceFactory)
.setContinueLoadingCheckIntervalBytes(checkInterval)
.createMediaSource(mediaItem)
}
To play next/prev stream from notification/lock screen I need to pass list of mediaitems or concatenating mediasource to the player, and I don't see how I can switch between those two factories then.
Maybe with DefaultMediaSourceFactory, but ideally I would like to keep setContinueLoadingCheckIntervalBytes setting.
Is it possible, or should I look into custom actions of notification (i am using PlayerNotificationManager)?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.