All Products
Search
Document Center

ApsaraVideo VOD:Integration preparation

Last Updated:Sep 10, 2026

This document outlines the integration steps and prerequisites for AliPlayerWidget, helping you get started with the component quickly.

Prerequisites

Development environment

To use AliPlayerWidget, make sure your development environment meets the following requirements:

  • Flutter SDK

    • The minimum required version is 2.10.0. The recommended version is 3.22.2.

    • Run flutter doctor and resolve any reported issues.

  • JDK 11

    Note

    To set JDK 11, go to Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JDK and select 11. If version 11 is not available, upgrade your Android Studio.

  • Android development environment

    • Install the latest version of Android Studio.

    • Configure the Android SDK. The minimum supported API level is 21 (Android 5.0).

    • Gradle version 7.0 or later is required.

  • iOS development environment

    • Install the latest version of Xcode.

    • Configure CocoaPods. The recommended version is 1.13.0.

    • The minimum supported iOS version is 10.0.

Permissions

  • Permissions

    • Enable network permissions in Android and iOS so the player can load online video resources.

  • License

    • Make sure you have the license certificate and License Key for the player SDK. For more information, see Manage Licenses.

    • Note: Without a valid license configuration, the player will not work and may throw an authorization exception.

For more details on initialization, see the aliplayer_widget_example sample project.

Add dependencies

Typically, you only need to add aliplayer_widget. aliplayer_widget already depends on flutter_aliplayer. If you need to use the underlying API directly (such as for MediaLoader pre-loading), you can also explicitly declare flutter_aliplayer as a dependency.

SDK version

aliplayer_widget uses the standalone player SDK by default.

Scenario

Recommended version

Description

Playback only

Standard player SDK (Recommended)

Use the standard version number of flutter_aliplayer.

Push streaming + playback

interactivelive special edition

This is recommended only when you also integrate push streaming capabilities, such as flutter_livepush_plugin, and require consistency with its underlying AliVCSDK.

Important

Unless necessary, do not use the interactivelive special edition. If your project only requires playback capabilities, pin the version to a full version number of the standard player SDK. This prevents you from unnecessarily introducing the all-in-one SDK, reducing dependency complexity and avoiding potential SDK conflicts.

You can add the dependencies by using one of the following methods:

Method 1: Use the command line

In your project's root directory, run the following commands:

# Required
flutter pub add aliplayer_widget

# Optional: Add only if you need to use the underlying flutter_aliplayer API directly
flutter pub add flutter_aliplayer

Method 2: Add manually

In your pubspec.yaml file, add the following lines under the dependencies section:

dependencies:
  # Required
  aliplayer_widget: <latest_version>

  # Optional: Add only if you need to use the underlying flutter_aliplayer API directly
  flutter_aliplayer: <latest_version>

Fetch dependencies and build

After adding the dependencies, fetch the packages and build your project:

  1. Fetch the dependency packages (if you added them manually).

    flutter pub get
  2. Additional steps for iOS:

    cd ios
    pod install
    cd ..
  3. Build your project.

    Build an Android APK:

    flutter build apk

    Build an iOS app:

    flutter build ios

    Build a universal app:

    flutter build

After completing these steps, you are ready to build video playback features with AliPlayerWidget. For details, see Quick Start.