Get started

Follow the steps below to integrate the Video SDK into your Flutter app.

Import SDK

Add flutter_zoom_videosdk in the project's pubspec.yaml to install the Video SDK.

flutter_zoom_videosdk: ^1.12.10

Run the following command to install dependencies.

flutter pub get

Update Android manifest

Add the following to your Android app's Androidmanifest.xml to allow permissions of the App (see the sample app for an example of this):

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Foreground permissions

Starting with Android 14, Google requires developers to specify appropriate foreground service types in their apps. The Video SDK uses these foreground service permissions.

PermissionDescription
FOREGROUND_SERVICE_MICROPHONEAllow the capability to receive audio when the app is put in the background.
FOREGROUND_SERVICE_MEDIA_PLAYBACKAllow the capability to share audio while screen sharing.
FOREGROUND_SERVICE_MEDIA_PROJECTIONAllow the capability to project the screen while screen sharing.
FOREGROUND_SERVICE_CONNECTED_DEVICEAllow the capability to use Bluetooth device as the audio source.
FOREGROUND_SERVICE_PHONE_CALLAllow the capability to use Bluetooth device for the session call.

Add iOS permissions and validation

The SDK requires these permissions in iOS (at least camera and microphone). Use the Flutter Permission_handler tool to handle permissions. See the sample app for an example of this.

You can also set Validate Workspace in the Project > Build settings to "Yes" to help debug any potential errors.

You must also follow Apple's requirement to provide a privacy manifest and signatures when creating an iOS app.

Get the SDK instance

To use the Flutter Zoom Video SDK, import package:flutter_zoom_videosdk.

import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart';

Create a ZoomVideoSdk instance.

var zoom = ZoomVideoSdk();

This context wrapper is required for the screens and components within the application that make use of the Video SDK for Flutter. The values passed into the config property are used throughout your application and are required to initialize the Video SDK for Android or iOS wrapped by the Video SDK for Flutter.

Initialize the Sdk before using any of the features.

InitConfig initConfig = InitConfig(
    domain: "zoom.us",
    enableLog: true,
);
zoom.initSdk(initConfig);

Table of ZoomVideoSdk InitConfig properties

The table below lists the most used InitConfig properties.

PropertyDescription
appGroupIdThis is a unique value for iOS that ties your app's ScreenShare target and your app's main target.See Set up App Groups in the Video SDK for iOS screen sharing guide for details on how to set up this reverse domain order value.You do not need to set this value for the Android platform. If you don't plan to implement screen sharing in video sessions, this value is optional.
domainSet this value to zoom.us as instructed in the Video SDK guides to Initialize the SDK for iOS and Initialize the SDK for Android.
enableLogSet to true to enable debugging if you wish to do so.When you are getting started, we recommend setting this property to true; otherwise, explicitly set it to false so other developers will know why logging is disabled.

For more details on init properties, see the ZoomVideoSDKInitParams class for Android or the ZoomVideoSDKInitParams class for iOS.

Example configuration

You can see an example of this in the lib/main.dart file in the example application. See the sample app walkthrough folder structure for where to find this file.

Event Listener

Once the SDK is successfully initialized, you will be able to call the SDK functions. You will also be able to set up a listener to listen for events such as when a user joins a session or leaves a session.

To listen for callback events, get the EventEmitter from eventListener on the Zoom Video SDK instance:

import 'package:flutter_zoom_videosdk/native/zoom_videosdk_event_listener.dart';
import 'package:events_emitter/events_emitter.dart';
var eventListener = ZoomVideoSdkEventListener();
eventListener.addEventListener();
EventEmitter emitter = eventListener.eventEmitter;
final sessionJoinListener =
    eventListener.addListener(EventType.onSessionJoin, (data) async {
        data = data as Map;
        isInSession.value = true;
        zoom.session
            .getSessionName()
            .then((value) => sessionName.value = value!);
        sessionPassword.value = await zoom.session.getSessionPassword() ?? "";
        ZoomVideoSdkUser mySelf =
            ZoomVideoSdkUser.fromJson(jsonDecode(data['sessionUser']));
        List<ZoomVideoSdkUser>? remoteUsers = await zoom.session.getRemoteUsers();
        var muted = await mySelf.audioStatus?.isMuted();
        var videoOn = await mySelf.videoStatus?.isOn();
        var speakerOn = await zoom.audioHelper.getSpeakerStatus();
        fullScreenUser.value = mySelf;
        remoteUsers?.insert(0, mySelf);
        users.value = remoteUsers!;
        isMuted.value = muted!;
        isSpeakerOn.value = speakerOn;
        isVideoOn.value = videoOn!;
        users.value = remoteUsers;
    });

See the SDK reference for all the supported event types.

Add features

You can set up event listeners for asynchronous events in the Video SDK session (such as users joining or leaving), set up or exit a video session, implement a chat screen, and more. See the rest of this documentation for details on how to add these features to your app.