mirror of
https://github.com/androidx/media.git
synced 2025-05-16 20:19:57 +08:00
Keep ExtractorMediaSource duration for repreparation.
This allows to know the duration immediately and fixes the temporary unknown duration in the UI when repreparing the same extractor media source. The isSeekable property is still reset to false as we can't actually seek until the seek map has been reloaded. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=188145860
This commit is contained in:
parent
e9f36f06ec
commit
b37773c5d6
@ -319,11 +319,12 @@ public final class ExtractorMediaSource extends BaseMediaSource
|
||||
this.eventDispatcher = new EventDispatcher(eventHandler, eventListener);
|
||||
this.customCacheKey = customCacheKey;
|
||||
this.continueLoadingCheckIntervalBytes = continueLoadingCheckIntervalBytes;
|
||||
this.timelineDurationUs = C.TIME_UNSET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepareSourceInternal(ExoPlayer player, boolean isTopLevelSource) {
|
||||
notifySourceInfoRefreshed(C.TIME_UNSET, false);
|
||||
notifySourceInfoRefreshed(timelineDurationUs, /* isSeekable= */ false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user