Repository navigation
Conversation
…andby Android TV pauses the active media session on the way into standby. The pause went to the server as a controller command and paused the whole group. On a TV that is not interactive, send client/leave instead, and fall back to pause if a server that predates the message ignores it. SendSpinPlayer.stop() also sent its pause twice; it now sends one.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an Android TV goes to sleep while it plays in a sync group, the whole group stops.
Android pauses the active media session on the way into standby.
SendSpinPlayerforwards that as a controllerpause, which applies to the group. Seen with 2.0.0 on a Mi Box (Android TV 11), in a group (sleep timeout) and playing alone (sleep key):Change
A pause that arrives on a TV while it is not interactive sends
client/leave("to stop taking part in its group's playback") instead ofpause:pause, as beforeclient/leave, once per burstpause, as beforeclient/leave)pause, as beforeSendSpinPlayer.stop()sentpausetwice (throughsetPlayWhenReady(false)and directly), which would have bypassed this. It now sends one.Testing
SendSpinPlayerand for the message itself; they failed before the change.testDebugUnitTest :shared:testAndroidHostTestpasses,assembleReleasebuilds.pause(now)client/leave(this PR)Limitations
SendspinPlayer._on_group_changed) without handing it over asset_membersdoes. With that cancel disabled in a test server the other player kept getting audio after the leave. So this case needs a server fix as well; with this PR alone it behaves as before.client/leave; the fallback is for those. It is covered by unit tests only.