Flutter SDK Overview
The EnableX Flutter SDK is designed to integrate EnableX Video Sessions for hybrid mobile applications development, also for building Video Application for Web Browsers. The SDK contains methods to communicate with EnableX Signaling and Media servers and to listen to event-based notifications during a Video Session.
Download Flutter SDK v3.0.3
Released: July 3, 2024Getting Started
To start using the Flutter SDK, perform the following steps:
- Create a Flutter sample project.
- Add Enx flutter SDK as a dependency in the pubspec.yaml file.
Note: For iOS, run this command: flutter build ios --no-codesign.
Device Permissions
The EnableX Flutter SDK requires camera and microphone permissions to start a video call. To define these permissions in iOS, open info.plist and add two new entries with the following keys:
- NSCameraUsageDescription
- NSMicrophoneUsageDescription
Add user-facing strings explaining why your application needs camera and microphone access as the value of these keys.
Note: If the background mode is enabled, and you want the application to still run the voice call when it is switched to this mode, select the application target in Xcode, click Capabilities, enable Background Modes, and select Audio.
iOS Black Screen
The SDK uses PlatformView and relies on Flutter's mechanism for embedding the iOS view. To use this SDK on iOS, you need to opt for embedded view preview by adding a boolean property to the application's Info.plist file, with the io.flutter.embedded_views_preview key set to YES. For more information, see the sample application on GitHub.
Error and Exception Handling
When an SDK method call encounters an issue and fails, a JSON object containing the details of the error is returned through callback. Below is an example of this JSON object:
{"errorCode": Number,"msg": "String","desc": "String"}
The parameters added in this example are described below.
Parameter | Type | Description |
---|---|---|
errorCode | Number | Returns an error code depending on the error encountered. |
msg | String | Returns an error message depending on the error encountered. |
desc | String | Optional. Returns explanation of the error encountered. |
SDK Methods
The SDK provides several methods for implementing different features and functionalities. For more information, see List of SDK Methods.
Media Devices
The SDK provides several methods to access device cameras and microphones that can be used to create media streams to publish into the video rooms. For more information, see Get Media Devices.
Stream Configuration
The SDK supports the following stream configurations:
Room Configuration
The SDK provides several methods for configuring virtual rooms. For more information, see Room Connection.
In-session Communication
The SDK provides several methods for managing in-session communication including chat, file sharing, screen sharing, custom signalling, and annotations. For more information, see In-Session Communication.
Get Room Information
The SDK provides several methods to obtain information about a virtual room such as Room ID, room mode, meta information of the room, if the room is connected, User ID, Client ID and role of connected users, list of connected users, and local stream configuration. For more information, see Get Room Information.
Session Management
The SDK provides several methods for managing different aspects of video sessions including recording a session, live recording with UI, muting or unmuting a room or a participant, forcing room entry restrictions, disconnecting a user from a session, extending, concluding or destroying a session, switching participant roles, pinning or unpinning a user, spotlighting a user, and switching the room mode. For more information, see Session Management.
Floor Access Control in Lecture Mode
Participants can request for floor access in the Lecture mode. The SDK provides different methods to implement floor access. For more information, see Floor Access Control in Lecture Mode.
Live Statistics
The SDK provides several methods to obtain live statistics of local, remote, canvas streaming, and screen sharing during a session. For more information, see Live Statistics.
Utilities
The SDK provides several methods for managing different aspects of video sessions through different utilities. For more information, see Utilities.