The ApsaraVideo MediaBox SDK demo showcases best practices for the end-to-end ApsaraVideo workflow, demonstrating playback, short video, and stream ingest. You can scan the QR code to install and try the demo on your phone, or download the source code to build and run it locally.
-
The built-in resource download service is a temporary service set up by Alibaba Cloud. Its availability and stability are not guaranteed. This service is for demonstration purposes only and must not be used in a commercial production environment.
-
If you plan to use the application for commercial purposes, you must modify it to use your own resource download server. Alibaba Cloud does not provide any functionality related to this resource download address and does not offer support for its implementation.
Try the pre-built demo app
-
Real-time conversational AI scenario: Enables efficient audio and video interaction between AI and users.
-
Live streaming scenario: Use cases include e-commerce live streaming, corporate training, co-streaming, and more.
-
Interactive entertainment & calling scenario: Use cases include voice chat rooms, online karaoke rooms, 1-on-1 calls, group calls, and more.
-
VOD scenario: Use cases include mini-dramas, feed-based playback, immersive playback, short video creation, and more.
Download and install
Scan the QR code below to download and install the ApsaraVideo MediaBox SDK demo:

Run the demo source code
Android
Development environment
|
Item |
Description |
|
Android Studio |
Download from the official Android Studio website. |
|
Gradle |
We recommend Gradle 7.0.2 or later with plugin 4.1.2. |
|
Gradle JDK |
We recommend Gradle JDK 11. To configure this, go to Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JDK and select 11. If 11 is not available in the dropdown list, upgrade your Android Studio. |
Runtime environment
Requires a physical device running Android 4.3 or later. Simulators are not supported for debugging.
Run the demo
-
Clone the demo source code from GitHub and follow the instructions in the latest README file.
-
Open the demo project in Android Studio.
-
For security reasons, license authorization on Alibaba Cloud requires an MD5 signature. Use one of the following methods to obtain it:
-
Search for
signingConfigsand configure your signing information.signingConfigs { debug { //TODO: Set your signing information. The following is an example. storeFile file("$rootDir/xxx") storePassword "xxx" keyAlias "xxx" keyPassword "xxx" } release { //TODO: Set your signing information. The following is an example. storeFile file("$rootDir/xxx") storePassword "xxx" keyAlias "xxx" keyPassword "xxx" } }Method 1: Call the
getSingInfo(Context context)method inAUIFoundation/AVUtils/src/main/java/com/aliyun/aio/utils/SignatureUtils.javato get the signature.Method 2: Download a signing tool to obtain the signature.
-
-
Apply for a license for the SDK module you need to test. For more information, see Manage licenses. Obtain the license key and license file.
-
Place the license file in the
AIOApp/src/main/assetsdirectory. -
Open AIOApp/src/main/AndroidManifest.xml. Find
com.aliyun.alivc_license.licensekeyandcom.aliyun.alivc_license.licensefileand change their values to your license key and license file, respectively. For details, see Integrate a license.
-
-
Compile and run.
Connect a physical Android device, and then click Run > Run 'app' to compile and run the project.
iOS
Development environment
|
Item |
Description |
|
macOS |
macOS High Sierra 10.13 or later. |
|
Xcode |
We recommend Xcode 13 or later. The instructions in this guide are for Xcode. |
|
CocoaPods |
We recommend CocoaPods 1.10 or later. |
Runtime environment
Requires a physical device running iOS 9.0 or later. Simulators are not supported for debugging.
Run the demo
-
Clone the demo source code from GitHub and follow the instructions in the latest README file.
-
In the AlivcAIODemo directory, run
pod installto install the dependencies.NoteIf the installation fails, run
pod install --repo-update. -
Open the AlivcAIODemo.xcworkspace project in Xcode.
-
Apply for a license for the SDK module you need to test. For more information, see Manage licenses. Obtain the license key and license file.
-
Rename the downloaded license file to
license.crtand copy it to the AlivcAIODemo directory. -
Open
AlivcAIODemo/Info.plistand set the value ofAlivcLicenseKeyto your license key. Alternatively, in the Xcode project's Info tab, find Custom iOS Target Properties and set the value ofAlivcLicenseKeyto your license key.
-
-
Compile and run.