Skip to main content
Version: 5.x.x

Run Interactive Live Streaming Project - Flutter

Video SDK provides open-source sample project videosdk-ils-flutter-sdk-example on Github. This document introduces how to run this project.

note

The sample project still uses Flutter SDK v4.0.1. To build an app on v5.0.0, follow the Interactive Live Streaming Quick Start.

Prerequisites​

  • If your target platform is iOS, your development environment must meet the following requirements:
    • Flutter 3.41 or later
    • Dart 3.3.0 or later
    • macOS
    • Xcode (Latest version recommended)
  • If your target platform is Android, your development environment must meet the following requirements:
    • Flutter 3.41 or later
    • Dart 3.3.0 or later
    • macOS or Windows
    • Android Studio (Latest version recommended)
  • If your target platform is iOS, you need an iPhone or iPad, or the iOS Simulator on a Mac with Apple silicon.
  • If your target platform is Android, you need an ARM Android device, or an Android emulator with an arm64-v8a system image. x86 and x86_64 emulators are not supported.
  • Valid Video SDK Account

Generate Token​

To manage secured communication, every participant that connects to a meeting needs an access token. You can easily generate this token by using your apiKey and secret-key, which you can obtain from the VideoSDK Dashboard.

For development purpose, you can generate a temporary token from VideoSDK Dashboard's API section.


tip

The best practice for obtaining a token involves generating it from your backend server which will help in keeping your credentials safe.

Run the Sample Project​

Step 1: Clone the sample project​

Clone the repository to your local environment.

$ git clone https://github.com/videosdk-live/videosdk-ils-flutter-sdk-example

After that change directory to the project folder:

cd videosdk-ils-flutter-sdk-example

Step 2: Install the dependencies​

Install all the Flutter dependencies

flutter clean

flutter pub get

Before you build for Android, pin permission_handler to version 12. The sample does not pin it, and version 13 fails the Android build (see Known Issues).

flutter pub add permission_handler:^12.0.1

Step 3: Modify .env​

Copy .env.example to .env. The app does not build without a .env file.

cp .env.example .env

Open .env in your favorite code editor and add your VideoSDK token to it.

.env
AUTH_TOKEN = "TEMPORARY-TOKEN";

Step 4: Run the Sample App​

Run the Flutter app with

flutter run

Got a Question? Ask us on discord