This topic describes how to integrate ApsaraVideo Player SDK for Windows in a quick manner.

Prerequisites

  • Visual Studio is installed. We recommend that you install Visual Studio 2017. To obtain the installation package of Visual Studio 2017, download vs_Community.exe.
  • The Qt plug-in is installed. We recommend that you install Qt 5.12.9. To obtain the installation package of Qt 5.12.9, download qt-opensource-windows-x86-5.12.9.exe.
  • ApsaraVideo Player SDK for Windows is downloaded. We recommend that you download the latest version. For more information about the download link, see SDK download.

Procedure

  1. Decompress ApsaraVideo Player SDK for Windows.
    Folder Description
    sdk Stores the SDK files.
    doc Stores the help documentation, including .js and .html files.
    demo Stores the demo of the SDK.
  2. Compile the demo.
    1. In the demo/src/AliyunPlayerTest/windows.cmake file, replace the path in set(QTDIR C:/Qt/Qt5.12.9/5.12.9/msvc2017) with the path of the Qt plug-in.
    2. Run the demo/src/AliyunPlayerTest/build_win.bat file.
    3. Double-click the QAliyunPlayerTest.sln file generated in the demo/src/AliyunPlayerTest/build folder and compile the file.
    4. Copy the demo/src/AliyunPlayerTest/AliyunPlayerTest/mui folder to your project directory.
  3. Integrate the SDK.

    Copy the sdk_headers and bin folders in the sdk folder to your project directory and set dependencies for your project. In this example, the third_party\aliplayer destination directory of your project is used.

    1. Copy the sdk\sdk_headers folder to the third_party\aliplayer directory.
    2. Copy the sdk\bin\AliPlayer.lib file to the third_party\aliplayer\lib directory.
    3. Configure the add-on package in the third_party\aliplayer\sdk_headers directory of your project.
    4. Compile the project.

      After the compilation, copy all folders and .dll files in the sdk\bin folder to the directory of the .exe file.