NativePeerConnectionFactory class

Per-call peer connection factory.

Wraps a native NativePeerConnectionFactory (Android / iOS / macOS) so each call owns an isolated AudioDeviceModule.

All methods route to the underlying factory by sending its factoryId over the method channel.

Properties

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

Methods

createLocalMediaStream(String label) → Future<MediaStream>
Creates an empty local media stream backed by this factory.
createPeerConnection(Map<String, dynamic> configuration, [Map<String, dynamic> constraints = const {}]) → Future<RTCPeerConnection>
Builds a peer connection that lives inside this factory.
dispose() → Future<void>
Disposes the underlying native factory.
getDisplayMedia(Map<String, dynamic> mediaConstraints) → Future<MediaStream>
Captures the screen against this factory.
getRtpReceiverCapabilities(String kind) → Future<RTCRtpCapabilities>
getRtpSenderCapabilities(String kind) → Future<RTCRtpCapabilities>
getUserMedia(Map<String, dynamic> mediaConstraints) → Future<MediaStream>
Captures user media against this factory.
isMicrophoneMuted() → Future<bool>
Reads back the audio-device-module microphone mute state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestCapturePermission({bool fullScreenOnly = false}) → Future<bool>
Requests Android screen-capture permission. The granted projection data lives on this factory's GetUserMediaImpl, so the subsequent getDisplayMedia call must be issued through this same instance.
resumeAudio() → Future<void>
Resumes a previously suspendAudio'd factory.
setMicrophoneMuted(bool muted) → Future<void>
Mutes/unmutes mic at the ADM level (iOS/macOS only), allowing detection of "speaking while muted."
startLocalRecording() → Future<void>
stopLocalRecording() → Future<void>
suspendAudio() → Future<void>
Suspends this factory's audio capture + playback. Use when another factory needs exclusive access to mic/speaker resources (multicall scenario). Native impl
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

isAdmMicrophoneMuteSupported → bool
Whether ADM-level microphone mute is available on the current platform.
no setter

Static Methods

create({Map<String, dynamic>? options}) → Future<NativePeerConnectionFactory>
Builds a fresh per-call factory. Initializes the WebRTC plugin if it hasn't been initialized yet.