Skip to content

Add macOS AirPlay Selector - #1723

Open
obiwantoby wants to merge 3 commits into
finamp-app:redesignfrom
obiwantoby:feature/macos-airplay
Open

Add macOS AirPlay Selector#1723
obiwantoby wants to merge 3 commits into
finamp-app:redesignfrom
obiwantoby:feature/macos-airplay

Conversation

@obiwantoby

Copy link
Copy Markdown

Summary
The AirPlay route picker only worked on iOS because flutter_to_airplay has no macOS implementation, so the desktop app showed an “Only iOS is supported” placeholder.

This change adds a native AVRoutePickerView platform view for macOS and a shared Dart wrapper (AirPlayRoutePicker) so the output menu and lyrics screen show a real picker on both platforms. The macOS deployment target is raised to 10.15 for AVRoutePickerView.

Startup queue restore is also bounded with a timeout so a stalled fetch can no longer leave the player stuck on “Restoring queue” forever; on timeout it falls into the existing tap-to-retry state.

Test plan
macOS: Picker lists AirPlay outputs and switches correctly

iOS: Behavior unchanged

Non-Apple platforms: Renders nothing (no placeholder/crash)

Queue restore: Stalled fetch times out and shows tap-to-retry

The AirPlay route picker only rendered on iOS because flutter_to_airplay
ships no macOS implementation, so the desktop app showed an Only iOS is
supported placeholder instead of a working button.

Add a native AVRoutePickerView platform view for macOS and a shared Dart
wrapper so the output menu and lyrics screen show a real picker on both
platforms. The macOS deployment target moves to 10.15 for AVRoutePickerView.
@Komodo5197

Copy link
Copy Markdown
Collaborator

I'm wondering if most of these changes would make more sense as a pull request/fork of flutter_to_airplay instead of directly embedding into finamp.

@obiwantoby

obiwantoby commented Aug 9, 2026

Copy link
Copy Markdown
Author

I'm wondering if most of these changes would make more sense as a pull request/fork of flutter_to_airplay instead of directly embedding into finamp.

Good question, I did think of this, does that look actively maintained, some pull requests are from 2023? If upstream is stale, a PR there sits forever and Finamp can't ship macOS AirPlay.

Perhaps a pragmatic middle path:

  1. Fork MrJai/flutter_to_airplay, add the macOS platform (Swift factory + macos/ dir + macos in the pubspec platforms + register in the plugin).
  2. Open a PR upstream.
  3. In Finamp, point the dependency at the fork via git until/if it merges — then switch to the released version.

It does seem to focus on mobile platforms, but if Finamp is to be a desktop app as well, (which is great) it is an awesome feature.

Let me know on that middle ground, I can attempt a PR there in the meantime, I had already worked on some of that before this.

I quite enjoy it.

image

The macOS AirPlay picker was implemented directly in MainFlutterWindow.swift
because the flutter_to_airplay package was iOS only. That native
AVRoutePickerView view now lives in the package itself, so Finamp can consume
it like any other platform. This points the dependency at the fork that adds
macOS support and removes the embedded factory, leaving the package to register
the airplay_route_picker_view type on both iOS and macOS.

Upstream PR: MrJai/flutter_to_airplay#40
@obiwantoby

obiwantoby commented Aug 9, 2026

Copy link
Copy Markdown
Author

Yeah, thought about it and you're right, it needed doing.

Moved the macOS picker into the package instead of embedding it here. The native AVRoutePickerView now lives in flutter_to_airplay, so this branch just points the dependency at a fork that adds macOS support and deletes the embedded factory from MainFlutterWindow.swift. Net change is about +14 / -109 lines.

Upstream PR: MrJai/flutter_to_airplay#40

Pointed at the fork via a git ref for now since that repo has PRs open since 2023, so this can ship without waiting on a release. Can switch back to the hosted version once it merges.

Comment thread lib/menus/output_menu.dart Outdated
child: Consumer(
builder: (context, ref, child) {
return AirPlayRoutePickerView(
return AirPlayRoutePicker(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we be able to just use AirPlayRoutePickerView instead of building our own widget now?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, done. Both call sites now use the package's AirPlayRoutePickerView directly and I removed the custom wrapper.

Comment thread pubspec.yaml Outdated
flutter_to_airplay:
git:
url: https://github.com/obiwantoby/flutter_to_airplay.git
ref: feat/macos-support

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer using full commit hashes instead of branches for all forks we point at.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, pinned to the full commit hash (2d09182f60fe95529446ee50cc54340827895af9).

Addresses review feedback on the macOS AirPlay PR. Now that flutter_to_airplay
renders the native picker on macOS as well as iOS, the custom AirPlayRoutePicker
wrapper is redundant, so both call sites use the package widget directly and the
wrapper is removed. Also pins the fork dependency to a full commit hash instead
of a branch ref.
@Chaphasilor

Copy link
Copy Markdown
Member

@obiwantoby are you fine with us moving your repo into the finamp-app org when we merge this? Just to keep all forks in one place.

@obiwantoby

Copy link
Copy Markdown
Author

@obiwantoby are you fine with us moving your repo into the finamp-app org when we merge this? Just to keep all forks in one place.

No issue there at all.

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.

3 participants