Repository navigation
Conversation
… locked On CarPlay with the device locked, a voice message playlist stopped after its first item: the next item got the audio session, but no sound followed. Music was registered as Now Playing and kept playing; voice messages were not. Register the voice playlist (voice and round video messages) for Now Playing and remote commands, like music: - title is the sender, subtitle "Voice Message" / "Video Message" or the group; - no names when "Names on lock-screen" is off or the app is passcode-locked; - the reported playback rate is the player's base rate; - remote commands that start playback are refused while recording, so they can't take the audio session from the recorder. Fixes https://bugs.telegram.org/c/66358
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.
Fixes https://bugs.telegram.org/c/66358: on CarPlay with the iPhone locked, playback stops after the first voice message. The next message is selected but no sound follows. It works with the phone unlocked, and music files in a row keep playing.
Cause
When a voice message ends, the playlist creates the next item's player. Its audio session holder is pushed and the session activates without an error, then nothing plays. The log has no deactivation, interruption or route change after that point. Reproduced with Apple's CarPlay Simulator and an iPhone 17 Pro Max on iOS 27, using the App Store build:
Music and voice share the player and the audio session setup. The one remaining difference relevant here is that only music registered Now Playing info and remote commands (
MediaManagerlimited both totype == .music). The playback code itself hasn't changed in this area since 12.4.Change
MediaManagertreats the voice playlist like music for Now Playing:.voiceas well. The voice playlist also carries round video messages, so they are included.Message.Audio) or "Video Message" (Message.VideoMessage), or the group's name, following the in-app player bar. The voice and video cases already existed but were unreachable, and useddebugDisplayTitle.InAppNotificationSettings.displayNameOnLockscreen) or the app is passcode-locked, the entry shows only "Voice Message" or "Video Message", with no sender or group.MediaManagerImplnow takesisPasscodeLockedfrom the app lock context for this.SharedMediaPlayeralready guards.Users now see voice and video messages in Control Center, on the lock screen and in CarPlay's Now Playing while they play.
Testing