Skip to content
This repository was archived by the owner on Jan 18, 2020. It is now read-only.

Commit b8c0a9f

Browse files
Implement CallKit "setMuted" callback (#197)
* Add missing CallKit callback of muting * Remove unnecessary call state checking
1 parent b666dbd commit b8c0a9f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ObjcVoiceQuickstart/ViewController.m

+11-1
Original file line numberDiff line numberDiff line change
@@ -600,14 +600,24 @@ - (void)provider:(CXProvider *)provider performEndCallAction:(CXEndCallAction *)
600600

601601
- (void)provider:(CXProvider *)provider performSetHeldCallAction:(CXSetHeldCallAction *)action {
602602
TVOCall *call = self.activeCalls[action.callUUID.UUIDString];
603-
if (call && call.state == TVOCallStateConnected) {
603+
if (call) {
604604
[call setOnHold:action.isOnHold];
605605
[action fulfill];
606606
} else {
607607
[action fail];
608608
}
609609
}
610610

611+
- (void)provider:(CXProvider *)provider performSetMutedCallAction:(CXSetMutedCallAction *)action {
612+
TVOCall *call = self.activeCalls[action.callUUID.UUIDString];
613+
if (call) {
614+
[call setMuted:action.isMuted];
615+
[action fulfill];
616+
} else {
617+
[action fail];
618+
}
619+
}
620+
611621
#pragma mark - CallKit Actions
612622
- (void)performStartCallActionWithUUID:(NSUUID *)uuid handle:(NSString *)handle {
613623
if (uuid == nil || handle == nil) {

0 commit comments

Comments
 (0)