This project contains sample code to demonstrate advanced features provided by the Agora Video SDK.
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:
Unity3d 2017 or above
Real devices (Windows, Android, iOS, and Mac supported)
(Note some feature may require SDK version 3.0.1 and higher.)
This section shows you how to prepare, build, and run the sample application.
To build and run the sample application, get an App ID:
Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.
Navigate in Agora Console on the left to Projects > More > Create > Create New Project.
Save the App ID from the Dashboard for later use.
First clone this repository
From Asset Store window in the Unity Editor, download and import the Agora Video SDK
[Mac only] Obtain the Mac ScreenShare library plugin here
[Mac only] import the downloaded plugin from Asset->Import Package->Custom Package
From Project window, open Asset/AgoraEngine/Demo+/SceneHome2.scene
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.
Go to File > Builds > Platform and select either Windows or Mac depending on the device you are working on.
[Mac] make sure you fill in Camera and Microphone usage description
Press the Unity Play button to run the example scene
Deploy to Mac, Android, and Windows by simply changing the Platform in the File > Build Settings, then switch to your prefered platform
[Mac or iOS] make sure you fill in Camera and Microphone usage description
Hit Build and Run
For potential issues, take a look at our FAQ first
Dive into Agora SDK Samples to see more tutorials, including API demos
Take a look at Agora Use Case for more complicated real use case
Repositories managed by developer communities can be found at Agora Community
The MIT License (MIT).