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

[WEBRTC-2325] [FIX] Handle CallKit Mute / Unmute buttons #146

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

gbattistel
Copy link
Collaborator

WEBRTC-2325 [FIX] Handle CallKit Mute / Unmute buttons

Features and Improvements:

Add isAudioTrackEnabled property to Peer class

  • Introduces a computed property isAudioTrackEnabled in the Peer class to check if the first audio track is enabled.
  • Supports both PlanB and Unified Plan SDP configurations.
  • Defaults to false if no audio track is available.

Add isMuted property to Call class

  • Adds a new property isMuted to determine the mute state of a call.

Handle mute/unmute actions via CXSetMutedCallAction (Demo App)

  • Implements provider(_:perform:) to handle mute/unmute actions through CallKit's CXSetMutedCallAction.
  • Updates the Call class by integrating muteAudio() and unmuteAudio() methods to manage audio state.
  • Ensures actions are fulfilled after processing for CallKit compliance.

Synchronize mute state across components

Updates the Call mute/unmute state by:

  • Accessing the call’s mute status.
  • Propagating updates to CallKit by executing the corresponding mute/unmute action.

Sync mute button state in CallView on foreground entry

  • Ensures the mute button in the CallView reflects the call's mute state when the app enters the foreground.

…k is enabled

- Introduces a computed property `isAudioTrackEnabled` in `Peer` to determine
  whether the first audio track is enabled.
- Supports both PlanB and Unified Plan configurations.
- Defaults to `false` if no audio track is found.
- Implements `provider(_:perform:)` to handle mute/unmute actions via `CXSetMutedCallAction`.
- Integrates with the `Call` class to mute or unmute the audio using `muteAudio()` and `unmuteAudio()` methods.
- Ensures the action is fulfilled after processing.
…date the Call state in callkit by executing the mute/unmute action
@gbattistel gbattistel merged commit 6b7a4cd into main Jan 6, 2025
1 check passed
@gbattistel gbattistel deleted the fix/WEBRTC-2325-buttons branch January 6, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants