-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support lazy preparation in ConcatenatingMediaSource for long playlists #3972
Comments
I think we can do this as it will also clean up some of the code in the already long More generally, the problem you are trying to solve is actually a useful feature especially for long playlists of DASH, HLS or SmoothStreaming media items where all manifests are downloaded immediately. The downside of not downloading the manifests is that the duration of the item stays unknown until you are beginning to play it. I think it would still be helpful to provide that as an option in the constructor of the DynamicConcatenatingMediaSource (which defaults to immediate child preparation). Assuming we would add such a feature, would you still need access to the DeferredTimeline class? Or would it be enough to leave it internal in this case? |
The problem above is my only use case of |
|
Not yet, sorry. It has just been merged with the existing |
This adds an optional parameter to ConcatenatingMediaSource to prepare child sources only lazily when are needed. This is helpful for long playlists of media sources with manifests to prevent a lot of simultaneous manifest loads. Issue:#3972 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198855676
Now available with the commit referenced above. |
Change request
I found this class is very useful
DynamicConcatenatingMediaSource.DeferredTimeline
, I think it is reusable, just likeDeferredMediaPeriod
class. Please make it public.I need to use
DeferredTimeline
to create a class calledDeferredMediaSource
: https://gist.github.com/Khang-NT/985e12e1d73454a79a989165c9bd13fa . This class solves my problem when usingDynamicConcatenatingMediaSource
, becauseDynamicConcatenatingMediaSource
prepare all child media source immediately, for instance, I have a playlist contains 100 DASH media,DynamicConcatenatingMediaSource
will prepare/download 100 manifest file, but I just need to prepare current playing item, and prepare the next position for pre-buffering (similar with #3400)Version of ExoPlayer being used
2.7.0
The text was updated successfully, but these errors were encountered: