Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allows switching external playback mode in iOS #1816

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jackwill99
Copy link

@jackwill99 jackwill99 commented Jun 26, 2024

Description

Here are the specific behaviors when streaming to an Apple TV or Mac:

allowsExternalPlayback = true (default, current behavior of the audioplayers package)
226296874-3bf27f85-3eb2-4291-a5f0-4249e1a4ddd4

226296902-6e1e1530-7c0f-4292-9f75-fc869a6ec499
  • Both devices show fullscreen playback controls.
  • On Apple TV, playback can be controlled with the remote, including seeking.
  • Both devices become unusable for other tasks as the player covers the screen.

allowsExternalPlayback = false

226296959-3a74667c-0622-4a46-8b89-68a232bfc2b3

226297191-b11edccd-e629-4c60-b676-27f9a2fa8bd6

  • Apple TV shows a notification briefly when a new media item starts playing.
  • macOS adds playback controls to the menu.

Apple Podcasts and other iOS apps use the allowsExternalPlayback = false setting, suggesting this is the intended behavior for pure audio apps. However, the video-like behavior with allowsExternalPlayback = true may still be useful for some developers as it enables playback controls on the Apple TV, even if this use case is rare.

Therefore, the default value is set to false.

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, refactor:,
    docs:, chore:, test:, ci: etc).
  • I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in [example].

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

@Gustl22
Copy link
Collaborator

Gustl22 commented Oct 24, 2024

Thank you for the contribution, and I'm really sorry, that it took so long to get to a review. The last months had been quite intense for me.
A few questions: So if I understand this correctly, this feature is about playing media on one device, but all other devices from the same ecosystem also allow controlling their playback, right?
Do you expect this feature to also be available on desktop platforms? Is there a similar feature on Android?
If not, then it would be a good candidate to be added to the AudioContext options:
https://github.com/bluefireteam/audioplayers/blob/main/getting_started.md#audio-context

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.

2 participants