Skip to content

Conversation

@fkwp
Copy link

@fkwp fkwp commented Aug 27, 2025

With the next iteration of Apple OSes the Speaker Selection API is supported (https://developer.apple.com/documentation/safari-release-notes/safari-26-release-notes#WebRTC)

This PR adds support for it by:

  • adding a isSafariSpeakerSelectionSupported helper function
  • using that helper function in supportsSetSinkId

fixes #1568 at least for macOS.
In contrast to https://webrtc.github.io/samples/src/content/devices/input-output/ this PR does not (yet) fix the issue on iOS26

@changeset-bot
Copy link

changeset-bot bot commented Aug 27, 2025

⚠️ No Changeset found

Latest commit: cba9b74

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Aug 27, 2025

CLA assistant check
All committers have signed the CLA.

@fkwp fkwp changed the title Add Safari speaker selection supported Add Safari speaker selection support Aug 27, 2025
Copy link
Contributor

@lukasIO lukasIO left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

I believe the speaker selection API comes with some more caveats (explicit user permission must be granted for output selection if no microphone is acquired yet).

I haven't tested this, but probably needs its own selection path via MediaDevices.selectAudioOutput ?

return (
(browser?.name === 'Safari' && compareVersions(browser.version, '26') >= 0) ||
(browser?.os === 'iOS' && !!browser?.osVersion && compareVersions(browser.osVersion, '26') >= 0) ||
(browser?.os === 'macOS' && !!browser?.osVersion && compareVersions(browser.osVersion, '26') >= 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

this check is not connected to checking against Safari, I believe?

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.

Add support for iOS26 Speaker Selection API

3 participants