mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Allow reusing SingleSampleMediaSource.
GitHub:#3498 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=183391117
This commit is contained in:
parent
de8d402aa6
commit
f581acbf5d
1 changed files with 0 additions and 4 deletions
|
|
@ -158,8 +158,6 @@ public final class SingleSampleMediaSource implements MediaSource {
|
|||
private final boolean treatLoadErrorsAsEndOfStream;
|
||||
private final Timeline timeline;
|
||||
|
||||
private boolean isPrepared;
|
||||
|
||||
/**
|
||||
* @param uri The {@link Uri} of the media stream.
|
||||
* @param dataSourceFactory The factory from which the {@link DataSource} to read the media will
|
||||
|
|
@ -253,8 +251,6 @@ public final class SingleSampleMediaSource implements MediaSource {
|
|||
|
||||
@Override
|
||||
public void prepareSource(ExoPlayer player, boolean isTopLevelSource, Listener listener) {
|
||||
Assertions.checkState(!isPrepared, MEDIA_SOURCE_REUSED_ERROR_MESSAGE);
|
||||
isPrepared = true;
|
||||
listener.onSourceInfoRefreshed(this, timeline, null);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue