Skip to content

Fix: allow AirPlay audio routing during media playback#2109

Open
estevecastells wants to merge 1 commit intoTelegramMessenger:masterfrom
estevecastells:fix/allow-airplay-audio-routing
Open

Fix: allow AirPlay audio routing during media playback#2109
estevecastells wants to merge 1 commit intoTelegramMessenger:masterfrom
estevecastells:fix/allow-airplay-audio-routing

Conversation

@estevecastells
Copy link
Copy Markdown

Summary

  • Add .allowAirPlay to audio session category options for .play and .playWithPossiblePortOverride session types, consistent with existing .allowBluetoothA2DP routing options
  • Explicitly set allowsExternalPlayback = true on AVPlayer instances in PlatformVideoContent and SystemVideoContent to document external playback intent

Motivation

The audio session configuration currently includes .allowBluetoothA2DP for wireless audio routing but omits .allowAirPlay, which prevents proper AirPlay audio routing during media playback. This is an inconsistency in the wireless audio routing configuration.

Changes

  • ManagedAudioSession.swift: Add .allowAirPlay option for .play and .playWithPossiblePortOverride session types
  • PlatformVideoContent.swift: Explicitly enable allowsExternalPlayback on AVPlayer
  • SystemVideoContent.swift: Explicitly enable allowsExternalPlayback on AVPlayer

Test plan

  • Verify media playback works normally without AirPlay devices present
  • Verify AirPlay audio routing is available during media playback when AirPlay devices are on the network
  • Verify no regression in Bluetooth A2DP audio routing
  • Verify PiP functionality is unaffected

The audio session category options include .allowBluetoothA2DP for
certain playback types but omit .allowAirPlay, preventing proper
AirPlay audio routing during media playback. This adds .allowAirPlay
to the .play and .playWithPossiblePortOverride session types for
consistency with other wireless audio routing options.

Also explicitly sets allowsExternalPlayback = true on AVPlayer
instances in PlatformVideoContent and SystemVideoContent to document
external playback intent and prevent potential regressions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant