Skip to main content

Using video calls with the Banuba SDK

In our example, AgoraRTC SDK is used for video streaming. But integration can be done based on any video streaming library. You can read more about Agora here.

Example of using video calling with the Banuba SDK



How To Run

  1. Get the client token for Banuba SDK. Please fill in our form on banuba.com website, or contact us via info@banuba.com.
  2. Open the the project.
  3. Download and import the Agora SDK package from Unity Asset Store with Unity Package Manager. If it is not available, contact Agora Support
  4. Download and import the BanubaSDK-import.unitypackage
  5. Visit agora.io to sign up and get a token, as well as an app and channel ID.
  6. Find the Assets/Resources/BanubaClientToken.txt and past your client token here.
  7. Open the scene VideoCallDemo/demo/MainScene.scene.
  8. Find the the VideoCanvas object in the scene and set AppID, Token, and your channel name in the properties of the DemoVideoCall script.

image

  1. Run the project in the Editor.

How It Works

  1. Initialize AgoraSDK in Start method with methods below:
Assets/VideoCallDemo/demo/DemoVideoCall.cs
loading...
  1. Initialize BanubaSDK. The MainScene.scene contains BanubaSDKManager reference from BanubaSDK-import.unitypackage

  2. Render Camera and any AR Effect with the BNB.RenderToTexture.cs to the RenderTexture

image

  1. Send Video Frames in Update method
Assets/VideoCallDemo/demo/DemoVideoCall.cs
loading...