Helper class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
enumerateDevices (String type )
→ Future <List <MediaDeviceInfo > >
openCamera (Map <String , dynamic > mediaConstraints )
→ Future <MediaStream >
To select a a specific camera, you need to set constraints
eg.
var constraints = {
'audio': true,
'video': {
'deviceId': Helper.cameras0
.deviceId,
}
};
selectAudioInput (String deviceId )
→ Future <void >
Set audio input device for Flutter native
Note: The usual practice in flutter web is to use deviceId as the
getUserMedia
parameter to get a new audio track and replace it with the
audio track in the original rtpsender.
selectAudioOutput (String deviceId )
→ Future <void >
Used to select a specific audio output device.
setMicrophoneMute (bool mute , MediaStreamTrack track )
→ void
setSpeakerphoneOn (bool enable )
→ Future <void >
Set microphone mute/unmute for Flutter native.
for iOS/Android only
setSpeakerphoneOnButPreferBluetooth ()
→ Future <void >
Enable speakerphone, but use bluetooth if audio output device available
for iOS/Android only
setVolume (double volume , MediaStreamTrack track )
→ Future <void >
switchCamera (MediaStreamTrack track , [String ? deviceId , MediaStream ? stream ])
→ Future <bool >
For web implementation, make sure to pass the target deviceId