MediaDevicesController class

Server-safe media devices controller.

Browser APIs are only available from browser builds. These stubs keep server rendering and tests from touching navigator.

Constructors

MediaDevicesController()
Creates a media controller.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isCameraSupported bool
Whether camera requests are available in this runtime.
no setter
isMicrophoneSupported bool
Whether microphone requests are available in this runtime.
no setter
isScreenShareSupported bool
Whether screen-share requests are available in this runtime.
no setter
isSupported bool
Whether media device APIs are available in this runtime.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

devices() Future<List<FlintMediaDevice>>
Lists known media devices.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestCamera({String? deviceId}) Future<MediaStreamResult>
Requests access to a camera.
requestCameraAndMicrophone({String? cameraDeviceId, String? microphoneDeviceId}) Future<MediaStreamResult>
Requests camera and microphone access with a single browser prompt.
requestMicrophone({String? deviceId}) Future<MediaStreamResult>
Requests access to a microphone.
requestScreenShare({bool audio = false}) Future<MediaStreamResult>
Requests browser screen sharing.
stop(MediaStreamResult result) → void
Stops tracks in a granted media result.
toString() String
A string representation of this object.
inherited

Operators

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