flutter_zoom_sdk_advanced 0.2.2
flutter_zoom_sdk_advanced: ^0.2.2 copied to clipboard
A Flutter plugin for Zoom Meeting SDK with support for joining meetings, email login, meeting controls, and real-time meeting events.
flutter_zoom_sdk_advanced #
A Flutter plugin for Zoom Meeting SDK with JWT-based authentication, meeting join, meeting controls, breakout rooms, and real-time meeting events.
Features #
- Initialize Zoom SDK with JWT token (no secrets in app)
- Join meetings as participant with optional ZAK token for identity
- Meeting controls: mute audio, stop video, switch camera
- Breakout room management: create, assign, start, stop, broadcast
- Real-time meeting state events via stream
- Check SDK state:
isMeetingConnected()
Prerequisites #
- Go to the Zoom Marketplace and sign in
- Click Develop → Build App → select Meeting SDK as app type
- Copy your SDK Key and SDK Secret from App Credentials
- Your backend generates a JWT token from these credentials
Note: The JWT token is generated on your backend server. The SDK Key is a public identifier, but the SDK Secret must never be in the app.
JWT Token Format #
Your backend generates the JWT with this payload, signed with SDK Secret using HS256:
{
"appKey": "YOUR_SDK_KEY",
"iat": 1776320490,
"exp": 1776406890,
"tokenExp": 1776406890
}
Installation #
Add to your pubspec.yaml:
dependencies:
flutter_zoom_sdk_advanced: ^0.0.1
iOS Setup #
1. Podfile - Add the ZoomSDK pod source at the top of your ios/Podfile:
source 'https://github.com/zoom-us-community/zoom-sdk-pods.git'
source 'https://cdn.cocoapods.org/'
2. Info.plist - Add camera and microphone usage descriptions to ios/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>This app requires camera access for Zoom video meetings.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access for Zoom audio in meetings.</string>
3. Minimum iOS version: 16.0
Android Setup #
The plugin includes all required permissions in its AndroidManifest.xml. However, you must request runtime permissions for camera and microphone in your app code (Android 6.0+).
Add permission_handler to your app:
dependencies:
permission_handler: ^11.3.1
import 'package:permission_handler/permission_handler.dart';
await Permission.camera.request();
await Permission.microphone.request();
Minimum Android SDK: 24
Manual SDK Installation #
By default, the Zoom SDK is downloaded automatically (Maven Central for Android, CocoaPods for iOS). Use manual installation only if you need a specific SDK version, work behind a firewall, or want offline builds.
Where to download the SDK: Zoom Marketplace → your Meeting SDK app → Download tab
Android - Manual Setup #
1. Download the Android Meeting SDK .zip from the Zoom Marketplace
2. Extract and find these files:
mobilertc.aar— main Zoom Meeting SDK (required)commonlib.aar— shared library (included in some versions)
3. Place the files in the plugin's android/libs/ folder:
android/
├── libs/ ← CREATE this folder
│ ├── mobilertc.aar ← paste here
│ └── commonlib.aar ← paste here (if included)
├── src/main/kotlin/.../FlutterZoomSdkAdvancedPlugin.kt
└── build.gradle ← EDIT this file (line 52)
4. Edit android/build.gradle at line 52:
// REMOVE this line:
implementation("us.zoom.meetingsdk:zoomsdk:6.4.10")
// ADD these lines instead:
implementation(files("libs/mobilertc.aar"))
implementation(files("libs/commonlib.aar"))
iOS - Manual Setup #
1. Download the iOS Meeting SDK .zip from the Zoom Marketplace
2. Extract and find these files:
MobileRTC.xcframework— main Zoom framework (required)MobileRTCResources.bundle— icons, strings, UI resources (required)MobileRTCScreenShare.xcframework— screen share extension (optional)zoomcml.xcframework— ML features (optional)
3. Place the files in the plugin's ios/Frameworks/ folder:
ios/
├── Frameworks/ ← CREATE this folder
│ ├── MobileRTC.xcframework/ ← paste here
│ └── MobileRTCResources.bundle/ ← paste here
├── Classes/
│ └── FlutterZoomSdkAdvancedPlugin.swift
└── flutter_zoom_sdk_advanced.podspec ← EDIT this file (line 20)
4. Edit ios/flutter_zoom_sdk_advanced.podspec at line 20:
# REMOVE this line:
s.dependency 'ZoomSDK', '6.4.10.25465'
# ADD these lines instead:
s.vendored_frameworks = 'Frameworks/MobileRTC.xcframework'
s.resource_bundles = { 'MobileRTCResources' => ['Frameworks/MobileRTCResources.bundle'] }
5. Edit your app's ios/Podfile — remove the ZoomSDK pod source (line 2):
# REMOVE this line (no longer needed with manual install):
source 'https://github.com/zoom-us-community/zoom-sdk-pods.git'
Usage #
Initialize SDK #
final zoom = FlutterZoomSdkAdvanced();
// JWT token from your backend
final result = await zoom.initZoom(ZoomOptions(
jwtToken: 'eyJ...', // Generated by your backend
));
Join Meeting #
final result = await zoom.joinMeeting(ZoomMeetingOptions(
meetingId: '123456789',
meetingPassword: 'password',
displayName: 'John Doe',
joinToken: 'abc...', // Optional: for external user breakout room identity
zakToken: 'eyJ...', // Optional: for Zoom org user breakout room identity
));
Meeting Controls #
await zoom.muteAudio(true); // Mute
await zoom.muteAudio(false); // Unmute
await zoom.muteVideo(true); // Stop video
await zoom.muteVideo(false); // Start video
await zoom.switchCamera(); // Switch front/back camera
await zoom.leaveMeeting(); // Leave meeting
Breakout Rooms #
This plugin supports pre-assigned breakout rooms where participants are automatically placed in their assigned rooms when the host opens them. The host manages rooms from the web platform — the Flutter app only needs to join with the correct token.
How Pre-Assigned Breakout Rooms Work #
1. BACKEND creates meeting with pre-assigned rooms (Zoom REST API)
2. BACKEND gets identity token for each participant
3. FLUTTER APP joins meeting with the token
4. HOST opens breakout rooms (from web)
5. Participant is auto-placed in their assigned room
Three Join Modes #
| User Type | Token | Breakout Assignment | Zoom Account Needed? |
|---|---|---|---|
| Guest | None | No auto-assignment | No |
| External user | joinToken |
Auto-assigned by email | No |
| Zoom org member | zakToken |
Auto-assigned by email | Yes |
Guest (No Breakout Assignment) #
await zoom.joinMeeting(ZoomMeetingOptions(
meetingId: '123456789',
meetingPassword: 'abc123',
displayName: 'Guest User',
));
External User with joinToken (Recommended for Most Apps) #
Users don't need a Zoom account. Your backend registers their email and gets a joinToken.
Backend flow:
1. Create meeting with registration + pre-assigned rooms
POST /v2/users/{hostId}/meetings
{
"settings": {
"approval_type": 0,
"breakout_room": {
"enable": true,
"rooms": [
{ "name": "Team A", "participants": ["alice@gmail.com"] },
{ "name": "Team B", "participants": ["bob@yahoo.com"] }
]
}
}
}
2. Register participant by email
POST /v2/meetings/{meetingId}/registrants
{ "email": "alice@gmail.com", "first_name": "Alice" }
→ Response includes join_url with ?tk=JOIN_TOKEN
3. Extract joinToken from join_url, send to Flutter app
Flutter app:
await zoom.joinMeeting(ZoomMeetingOptions(
meetingId: '123456789',
meetingPassword: 'abc123',
displayName: 'Alice',
joinToken: joinTokenFromBackend, // Zoom identifies alice@gmail.com
));
// Host opens breakout rooms → Alice auto-placed in "Team A"
Zoom Org Member with zakToken #
For users who are members of your Zoom organization (have Zoom licenses).
Backend flow:
GET /v2/users/alice@company.com/token?type=zak
→ { "token": "eyJ..." }
Flutter app:
await zoom.joinMeeting(ZoomMeetingOptions(
meetingId: '123456789',
meetingPassword: 'abc123',
displayName: 'Alice',
zakToken: zakTokenFromBackend, // Zoom identifies alice@company.com
));
Breakout Room SDK Methods (Host/Admin Use) #
These methods are available in the plugin for programmatic breakout room control:
await zoom.createBreakoutRoom('Team A');
await zoom.removeBreakoutRoom(boId);
await zoom.assignUserToBreakoutRoom(userId, boId);
await zoom.startBreakoutRooms();
await zoom.stopBreakoutRooms();
await zoom.broadcastMessageToBreakoutRooms('5 minutes remaining!');
final result = await zoom.getBreakoutRoomList();
await zoom.joinBreakoutRoom(boId);
await zoom.leaveBreakoutRoom();
Listen to Meeting Events #
zoom.onMeetingStateChanged().listen((event) {
final status = event['status']; // e.g., MEETING_STATUS_INMEETING
print('Meeting status: $status');
});
Check State #
final meetingResult = await zoom.isMeetingConnected();
final connected = meetingResult['connected']; // true/false
API Reference #
| Method | Description |
|---|---|
initZoom(ZoomOptions) |
Initialize SDK with JWT token |
joinMeeting(ZoomMeetingOptions) |
Join meeting as participant |
meetingStatus() |
Get current meeting status |
leaveMeeting({endForAll}) |
Leave or end meeting |
muteAudio(bool) |
Mute/unmute microphone |
muteVideo(bool) |
Start/stop camera |
switchCamera() |
Switch front/back camera |
isMeetingConnected() |
Check if in active meeting |
onMeetingStateChanged() |
Stream of meeting state events |
createBreakoutRoom(name) |
Create a breakout room |
removeBreakoutRoom(boId) |
Remove a breakout room |
assignUserToBreakoutRoom(userId, boId) |
Assign user to a room |
startBreakoutRooms() |
Open all breakout rooms |
stopBreakoutRooms() |
Close all breakout rooms |
broadcastMessageToBreakoutRooms(msg) |
Broadcast to all rooms |
getBreakoutRoomList() |
Get list of rooms |
joinBreakoutRoom(boId) |
Attendee joins a room |
leaveBreakoutRoom() |
Attendee leaves room |
ZoomMeetingOptions #
| Parameter | Type | Default | Description |
|---|---|---|---|
meetingId |
String | required | Meeting number |
meetingPassword |
String | required | Meeting password |
displayName |
String | required | Display name in meeting |
zakToken |
String? | null | ZAK token for Zoom org users (breakout rooms) |
joinToken |
String? | null | Registration token for external users (breakout rooms) |
disableAudio |
bool | false | Join with audio muted |
disableVideo |
bool | false | Join with video off |
disableShare |
bool | false | Disable screen sharing |
disableDrive |
bool | false | Disable driving mode |
noDisconnectAudio |
bool | false | Keep audio connected on leave |
noRecord |
bool | false | Disable recording |