VideoSDK class
Entry point to the SDK.
Everything here is static. Create a room with createRoom. Before joining you can ask for access with requestPermissions, list devices with getCameras and getMics, build and preview tracks with createCameraVideoTrack and createMicrophoneAudioTrack, and check the network with runPreCallTest.
Properties
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Static Properties
- sdkVersion → String
-
This package's version, as in
pubspec.yaml.no setter
Static Methods
-
checkBluetoothPermission(
) → Future< bool> - Whether Bluetooth access has been granted, for Bluetooth audio routing.
-
checkPermissions(
{Permissions? permissions}) → Future< Map< String, bool> > - Reports whether camera and microphone access has been granted.
-
createCameraVideoTrack(
{String? cameraId, CustomCameraTrackConfig encoderConfig = CustomCameraTrackConfig.h720p_w1280p, FacingMode facingMode = FacingMode.FRONT, bool multiStream = true, BitrateMode bitrateMode = BitrateMode.BALANCED, EncodingLayer maxLayer = EncodingLayer.MAX_LAYER_3, VideoCodec codec = VideoCodec.VP8}) → Future< CustomStreamTrack> - Creates a camera track before joining, so the user can preview and configure it. Pass the result to createRoom.
-
createMicrophoneAudioTrack(
{String? microphoneId, CustomMicrophoneTrackConfig encoderConfig = CustomMicrophoneTrackConfig.SPEECH_STANDARD, NoiseConfig? noiseConfig}) → Future< CustomStreamTrack> - Creates a microphone track before joining. Pass the result to createRoom.
-
createRoom(
{required String roomId, required String token, String? participantName, bool micEnabled = true, bool camEnabled = true, String? participantId, MaxResolution? maxResolution, FacingMode defaultCamera = FacingMode.FRONT, bool? multiStream, CustomStreamTrack? customCameraTrack, CustomStreamTrack? customMicrophoneTrack, Mode? mode, Map< String, dynamic> ? metaData, String? signalingBaseUrl, PreferredProtocol? preferredProtocol, String? translationLanguage, String? speakingLanguage, bool autoConsume = true, bool codecSwitchEnabled = true, bool enableBatching = true, bool dynaCast = false}) → Room - Creates a room.
- Creates a screen-share track before sharing. Pass the result to Room.enableScreenShare.
-
disableLogForwarding(
) → Future< void> - Stops forwarding log lines and drops the listener. Idempotent.
-
enableLogForwarding(
void listener(String level, String message)) → Future< bool> -
Forwards the SDK's client-facing log lines to
listenerso they appear in the console a Flutter developer actually uses. -
getAppliedVideoEffectsConfig(
) → Future< Map< String, dynamic> ?> -
The video-effects config in force:
{engine, applied, reason, pipeline, framing, lighting, style, filter}.engineiscpu,gpuornone. On the CPU engine,framingalso carriesface(a face is being followed),zoom(the live crop factor),detectorHzandrunning. -
getBuildId(
) → Future< String> - Build stamp of the native engine underneath, as the platform SDK reports it — a commit-level identifier, not a version number.
-
getCameras(
) → Future< List< CameraDeviceInfo> ?> - Every camera the platform reports.
-
getDevices(
) → Future< List< DeviceInfo> ?> - Cameras, microphones and speakers together.
-
getKeyProvider(
) → BaseKeyProvider? -
The key provider set with setKeyProvider, or
nullwhen none is set or after removeKeyProvider. -
getLogLevel(
) → LogLevel - The current log level; LogLevel.INFO until setLogLevel is called.
-
getMics(
) → Future< List< MicrophoneDeviceInfo> ?> - Every microphone and speaker the platform reports. Speakers share this type: Android and iOS route audio as one device.
-
getSelectedAudioDevice(
) → MicrophoneDeviceInfo? -
The audio device in use:
nullbefore join, the device in use from join on. -
getSelectedVideoDevice(
) → CameraDeviceInfo? -
The camera in use:
nullbefore join, the device in use from join on. -
publishFramingSubject(
{required double cx, required double cy, required double width, required double height}) → Future< void> - Publishes the subject box that auto-framing follows.
-
removeKeyProvider(
) → void - Turns end-to-end encryption off and forgets the provider set with setKeyProvider.
-
requestBluetoothPermission(
) → Future< bool> - Asks for Bluetooth access.
-
requestPermissions(
[Permissions? permissions]) → Future< Map< String, bool> > - Asks the user for camera and microphone access.
-
runPreCallTest(
PreCallTestOptions options, {void onStatsChange(PreCallNetworkQuality stats)?}) → Future< PreCallTestResult> -
Tests the camera, the microphone and the network before joining — the
web SDK's
runPreCallTest. Needs no room; it must run before createRoom, which afterwards refuses a new test withERROR_PRECALL_AFTER_INIT. -
setKeyProvider(
BaseKeyProvider provider) → void - Installs the key provider used for end-to-end encryption. Turn E2EE off with removeKeyProvider.
-
setLogLevel(
[LogLevel? level = LogLevel.INFO]) → void - Sets how much the SDK logs. Defaults to LogLevel.INFO.
-
setParticipantKey(
String participantId, String? key) → Future< void> -
Sets
participantId's encryption key, applied at once; anullkeyremoves it. A shared key on the provider wins over this one. -
setScreenFlash(
bool enabled) → Future< void> - Turns the screen flash on or off for front-camera captures.
-
setVideoEffects(
VideoEffectsConfig config) → Future< Map< String, dynamic> ?> -
Applies
configto the outgoing camera video, before or after join. -
stopPreCallTest(
) → Future< void> -
Stops the running pre-call test, if any. Its runPreCallTest still
completes, with
aborted: true.