Closed simpler23 closed 5 years ago
@tonihei can you provide advise here?
I think the easiest solution is to create all 700 MediaSources and set the useLazyPreparation
parameter is the constructor to true
. This causes the source to not prepare all HLS sources at once but only if they are actually needed. This way the index in the playlist can also stay the same as the index in your PagedList and you don't need any extra logic.
Thank you for sharing your tip! But I worry about instantiating 700 objects at once that might not be used. Is it fine in memory perspective?
That shouldn't be an issue. I just tested creating 700 HlsMediaSource and they use up only 233 KB of memory.
Closing, because the question has been answered.
Thank you for the answers!!
[REQUIRED] Searched documentation and issues
I found playlist feature can be implemented using ConcatenatingMediaSource class which be added MediaSource instance.
[REQUIRED] Question
Hi, I'm implementing playlist feature that has about 700 songs. I've implemented using ConcatenatingMediaSource instance. But it require to instantiate HlsMediaSource instance about 700 times at once to add there .
I use PageList class(AAC) to show playlist in view. Is there any way to use the pageList to exoplayer playlist feature.
Is any advice in this scenario?