Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion lib/_internal/twilio_voice_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ class Call extends MethodChannelTwilioCall {
return Future.value(false);
}

/// Not currently implemented for web
/// Toggle mute on/off. Returns true if successful, false otherwise.
@override
Future<bool?> toggleMute(bool isMuted) async {
Logger.logLocalEvent(isMuted ? "Mute" : "Unmute", prefix: "");
Expand All @@ -655,6 +655,16 @@ class Call extends MethodChannelTwilioCall {
return isMuted;
}

/// Is call muted. Returns true if muted, false otherwise.
@override
Future<bool> isMuted() async {
if (_jsCall != null) {
return _jsCall!.isMuted();
} else {
return false;
}
}

/// Not currently implemented for web
/// https://github.com/twilio/twilio-voice.js/issues/32
/// Call holding should be done server-side as suggested by @ryan-rowland here(https://github.com/twilio/twilio-voice.js/issues/32#issuecomment-1016872545)
Expand All @@ -669,6 +679,18 @@ class Call extends MethodChannelTwilioCall {
return Future.value(false);
}

/// Not currently implemented for web
@override
Future<bool> isHolding() {
return Future.value(false);
}

/// Not currently implemented for web
@override
Future<bool> isOnSpeaker() {
return Future.value(false);
}

/// Answers an inbound call. Returns true if successful, false otherwise.
/// See [twilio_js.Call.accept]
@override
Expand Down