CallPermissions class

Utility to request microphone/camera permissions before starting a call.

On Android 6+ and iOS, Permission.microphone and Permission.camera are runtime permissions that must be granted before WebRTC can access the hardware. Without this, the Calls SDK throws SecurityError: Permission denied when creating audio/video tracks.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

requestForCallType({required bool isVideoCall}) Future<bool>
Request the appropriate permissions for a call type. isVideoCall — if true, requests both microphone and camera.
requestMicrophone() Future<bool>
Request microphone permission (audio calls). Returns true if granted or already granted.
requestMicrophoneAndCamera() Future<bool>
Request microphone + camera permissions (video calls). Returns true if both are granted.