Skip to main content
Version: 0.0.x

Run a Sample Project

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

Prerequisites

  • If your target platform is iOS, your development environment must meet the following requirements:
    • Flutter 2.0 or later
    • Dart 2.12.0 or later
    • macOS
    • Xcode (Latest version recommended)
  • If your target platform is Android, your development environment must meet the following requirements:
    • Flutter 2.0 or later
    • Dart 2.12.0 or later
    • macOS or Windows
    • Android Studio (Latest version recommended)
  • If your target platform is iOS, you need a real iOS device.
  • If your target platform is Android, you need an Android simulator or a real Android device.
  • Valid Video SDK Account

Get your API key and Secret key

This guide will help you to generate API key and secret from dashboard.

  • API Key is unique identifier used to authenticate a user calling to Video SDK API.
  • Secret Key cryptography relies on using the same key to encode and then later decode a message. Thus, only those who know the "secret" can read the message.

Step 1. Generate API Key from Dashboard

Go to Video SDK Dashboard, navigate to API Keys. Click on ADD NEW button to generate your own API key and Secret for the project.

Video SDK Home Dashboard

Step 2. Enter your Project Name

Enter your project name as shown below. Project name will help you to organise API keys and secrets for multiple projects and environments.

Video SDK Home Dashboard

Step 3. Use API key / Secret or Token

After submitting your project name, you can follow either of two paths:

  1. Development Env: You can just click on Generate Token and get started with the project setup.
  2. Production Env: For production, please setup authentication server to authenticate and authorize all the users.

Video SDK Home Dashboard

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-rtc-flutter-sdk-example.git

Step 2: Copy the .env.example file to .env file.

Open your favorite code editor and copy .env.example to .env file.

$ cp .env.example .env

Step 3: Modify .env file

Paste earlier generated temporary token here.

.env
AUTH_TOKEN = "TEMPORARY-TOKEN";

Step 4: Install the dependecies

Install all the dependecies to run the project.

flutter pub get

Step 4: Run the sample app

Bingo, it's time to push the launch button.

flutter run