mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Do not update queue when the queue did not actually change to avoid
unnecessary updates are broadcasted to all clients. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162728670
This commit is contained in:
parent
89181cf4bc
commit
3bc3900dba
1 changed files with 6 additions and 1 deletions
|
|
@ -93,7 +93,12 @@ public abstract class TimelineQueueNavigator implements MediaSessionConnector.Qu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCurrentWindowIndexChanged(Player player) {
|
public void onCurrentWindowIndexChanged(Player player) {
|
||||||
publishFloatingQueueWindow(player);
|
if (activeQueueItemId == MediaSessionCompat.QueueItem.UNKNOWN_ID
|
||||||
|
|| player.getCurrentTimeline().getWindowCount() > maxQueueSize) {
|
||||||
|
publishFloatingQueueWindow(player);
|
||||||
|
} else if (!player.getCurrentTimeline().isEmpty()) {
|
||||||
|
activeQueueItemId = player.getCurrentWindowIndex();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue