VoxaTransport class abstract

Media-transport abstraction the engine talks to.

Deliberately free of any media-engine types: the engine and event translator are written and tested against this interface, and exactly one adapter behind it touches the media engine's own API. That boundary is what makes the engine swappable and the translator testable without a network.

Constructors

VoxaTransport()

Properties

events → Stream<VoxaTransportEvent>
Room events, in arrival order.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isCameraPublished → bool
no setter
isMicrophonePublished → bool
Whether a microphone / camera track is published and unmuted right now. What the engine asked for and what is going out can differ after a reconnect; these are how it finds out.
no setter
isRecovering → bool
Whether the session has been lost and the media engine is trying to get it back by itself. It says nothing while it does, and it can be at it for minutes: the engine reads this when the app comes back to the front, which is when a fresh join gets there sooner.
no setter
remoteIdentities → List<String>
Identities of remote participants currently in the room.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokenExpiresAt → DateTime?
Expiry of the app-level (Agora) token used to join, when known — populated by the gateway exchange; null in raw-JWT dev mode.
no setter

Methods

audioLevels() → Map<String?, double>
Instantaneous audio levels in 0.0–1.0; key null = local participant, otherwise the remote identity. Polled by the engine's volume-indication timer.
audioStats() → Map<String?, VoxaAudioStats>
Audio send/receive statistics, keyed by identity; key null = local.
connect({required String url, required String token, String? channelId, String? identity, bool watch = false}) → Future<void>
Connect to the media server. Completes when the room is joined; throws VoxaTransportException on failure.
connectionQualities() → Map<String?, VoxaConnectionQuality>
Connection quality per participant; key null = local. Polled by the engine's stats timer for onNetworkQuality.
disconnect() → Future<void>
dispose() → Future<void>
Release underlying resources. The transport is unusable afterwards.
localVideoTrackId() → String?
Platform id of the local camera track, as the native media stack knows it — the key face detection uses to find the track it must hook. Null when no camera is running, and for transports with no platform side at all.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renewToken(String token) → Future<DateTime?>
Validate a renewed app-level token and store it for future reconnect exchanges. Returns the new expiry when known. The engine's Agora renewToken maps here.
sendData(List<int> data, {required bool reliable, required String topic}) → Future<void>
Sends a data packet to every other participant in the room.
setAdaptiveStream(bool enabled) → Future<void>
Subscriber-side automatic layer selection.
setAudioEncoding({required int maxBitrateBps, required bool dtx}) → Future<void>
Publish-side audio encoding, behind Agora's setAudioProfile / setAudioScenario.
setCameraEnabled(bool enabled) → Future<void>
setCameraPosition({required bool front}) → Future<void>
true = front camera, false = back camera.
setMicrophoneEnabled(bool enabled) → Future<void>
setRemoteAudioEnabled({required String identity, required bool enabled}) → Future<void>
setRemoteAudioGain(double gain) → Future<void>
Playback gain applied to every remote, behind Agora's adjustPlaybackSignalVolume — current participants and any that join later, which is Agora's documented scope.
setRemoteAudioGainFor({required String identity, required double gain}) → Future<void>
Playback gain for one remote, behind Agora's adjustUserPlaybackSignalVolume. Multiplies with setRemoteAudioGain.
setRemoteVideoEnabled({required String identity, required bool enabled}) → Future<void>
setRemoteVideoQuality({required String identity, required bool high}) → Future<void>
Subscription layer selection for a remote's video (Agora setRemoteVideoStreamType: high=true → high stream).
setScreenShareEnabled(bool enabled) → Future<void>
Screen-share publishing on/off (Agora start/stopScreenCapture).
setSimulcastEnabled(bool enabled) → Future<void>
Publish-side simulcast (Agora dual-stream). Must be set before connect to take effect (Agora's documented usage too).
setSpeakerphoneOn(bool on) → Future<void>
setVideoEncoderConfig({int? width, int? height, int? frameRate, int? bitrateKbps}) → Future<void>
The camera picture the app configured: its size, frame rate and bitrate.
startLocalPreview() → Future<void>
Pre-connect local camera preview (Agora startPreview before join). It is kept running through the connect: the first setCameraEnabled after the join publishes it as it is, and stops it when the camera is not going out.
stopLocalPreview() → Future<void>
toString() → String
A string representation of this object.
inherited
videoTrackFor(String? identity) → Object?
The renderable video track for identity, or the local camera track when identity is null. Returns null when no track is available. Typed Object to keep this interface media-engine agnostic; the view layer casts to the concrete track type.

Operators

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