mirror of
https://github.com/samsonjs/media.git
synced 2026-03-31 10:25:48 +00:00
Merge #5126: fix(playlist): always call onCompletion when moving media sources
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/5126
Closes #5125
Merge 55a4c1e15de7f100f37e38119f1da360910fd1e3 into fe41f17c38
PiperOrigin-RevId: 222612873
This commit is contained in:
parent
3039c358cc
commit
e99c904179
1 changed files with 3 additions and 0 deletions
|
|
@ -365,6 +365,9 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
|
|||
public final synchronized void moveMediaSource(
|
||||
int currentIndex, int newIndex, @Nullable Runnable actionOnCompletion) {
|
||||
if (currentIndex == newIndex) {
|
||||
if (actionOnCompletion != null) {
|
||||
actionOnCompletion.run();
|
||||
}
|
||||
return;
|
||||
}
|
||||
mediaSourcesPublic.add(newIndex, mediaSourcesPublic.remove(currentIndex));
|
||||
|
|
|
|||
Loading…
Reference in a new issue