AgoraIO-Community / AgoraAdvancedDemo

Advanced guides for Agora Unity SDK for voice and video. http://agora.io
MIT License
7 stars 5 forks source link

Agora Unity Video SDK Demos

This project contains sample code to demonstrate advanced features provided by the Agora Video SDK.

Note March 8th, 2021 - this repo has been merged into Agora Unity QuickStart, please get the latest update there

Feature Note

1. App Screen Share This demo shows how to share the screen (or rather "current app window") by recording the current camera view and push as an external video frame. Applicable to mobile and desktop platforms.
2. Desktop Screen Share This demo shows how to share the desktop/window of the current running OS. Applicable to desktop platforms only (Windows/MacOS). Note SDK calls for Windows are still under improvement. Sharing specific window is not working.
3. Transcoding The demo shows the configuration to publish live streaming video to known CDNs, including Youtube, Facebook and Twitch.
4. Simple 1 to 1 video call Allow communication or live streaming mode for 1 to 1 call

With this sample app, you can:

Developer Environment Requirements

Quick Start

This section shows you how to prepare, build, and run the sample application.

Obtain an App ID

To build and run the sample application, get an App ID:

  1. Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.

  2. Navigate in Agora Console on the left to Projects > More > Create > Create New Project.

  3. Save the App ID from the Dashboard for later use.

Run the Application

  1. First clone this repository

  2. From Asset Store window in the Unity Editor, download and import the Agora Video SDK

  3. [Mac only] Obtain the Mac ScreenShare library plugin here

  4. [Mac only] import the downloaded plugin from Asset->Import Package->Custom Package

  5. From Project window, open Asset/AgoraEngine/Demo+/SceneHome2.scene

  6. Next go into your Hierarchy window and select GameController, in the Inspector add your App ID to to the AppID Input field

Note

The library from Step 3/4 is non-official. You may build your own Mac library in case this doesn't work for you. Source code gist can be found here.

Test in Editor

  1. Go to File > Builds > Platform and select either Windows or Mac depending on the device you are working on.

  2. [Mac] make sure you fill in Camera and Microphone usage description

  3. Press the Unity Play button to run the example scene

Deploy to Windows, Mac, iOS, Android

  1. Deploy to Mac, Android, and Windows by simply changing the Platform in the File > Build Settings, then switch to your prefered platform

  2. [Mac or iOS] make sure you fill in Camera and Microphone usage description

  3. Hit Build and Run

Resources

License

The MIT License (MIT).