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

fix: Improve speaker switching logic for iOS. #692

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

cloudwebrtc
Copy link
Contributor

Refer to swift sdk for improvement. By default, setSpeakerphoneOn(true |false); will switch between Receiver or Speaker. It will still give priority to wired wired/bluetooth headphones if connected.

But you can ignore all wired/bluetooth headphones and force them to output from the speaker through forceSpeakerOutput: true.

@petodavid
Copy link

As I see room.setSpeakerOn is ignored and it does not use the speaker, but by setting the default room options its working, can you confirm this behavior?

    roomOptions: RoomOptions(
      enableVisualizer: true,
      defaultAudioOutputOptions: AudioOutputOptions(speakerOn: true),
    ),

@cloudwebrtc
Copy link
Contributor Author

cloudwebrtc commented Feb 5, 2025

@petodavid , fixed in this PR.

@cloudwebrtc cloudwebrtc merged commit f90275f into main Feb 5, 2025
8 checks passed
@cloudwebrtc cloudwebrtc deleted the fix/improve-speaker-switching-logic-for-ios branch February 5, 2025 02:26
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