This topic describes how to quickly integrate the ApsaraVideo Player SDK for Windows.
Prerequisites
-
Visual Studio is installed. We recommend that you use Visual Studio 2017. You can download it from vs_Community.exe.
-
Qt is installed. We recommend that you use Qt 5.12.9. You can download it from qt-opensource-windows-x86-5.12.9.exe.
-
CMake is installed. We recommend that you use version 3.15 or later. You can download it from the CMake website.
-
The ApsaraVideo Player SDK for Windows is downloaded. We recommend that you use the latest version. For the download link, see SDK download.
Procedure
-
Extract the ApsaraVideo Player SDK for Windows package.
The extracted SDK package has the following directory structure:
Directory
Description
sdk
Contains the SDK files.
doc
Contains documentation, including JavaScript and HTML files.
demo
Contains the SDK demo.
NoteThe SDK demo can be compiled on a 32-bit Windows operating system and is compatible with 64-bit systems.
-
Optional: Compile the demo.
-
In demo/src/AliyunPlayerTest/windows.cmake, modify
set(QTDIR C:/Qt/Qt5.12.9/5.12.9/msvc2017)to your Qt path. -
Run demo/src/AliyunPlayerTest/build_win.bat.
-
Open the generated QAliyunPlayerTest.sln file from the demo/src/AliyunPlayerTest/build directory. Select the x86 architecture and build the project.
-
Copy the demo/src/AliyunPlayerTest/AliyunPlayerTest/mui directory to your project directory.
-
-
Integrate the SDK.
Copy the sdk_headers and bin directories from the sdk directory to your project directory. Then, configure the dependency directories in the project properties. The following example assumes that the files are copied to the third_party\aliplayer directory in your project:
-
Copy the sdk\sdk_headers directory to the third_party\aliplayer directory.
-
Copy the sdk\bin\AliPlayer.lib file to the third_party\aliplayer\lib directory.
-
In the project properties, set Additional Include Directories to third_party\aliplayer\sdk_headers.
-
Build the project.
After a successful build, copy all subdirectories and .dll files from the sdk\bin directory to the directory that contains the project's executable (.exe) file.
-
References
If you encounter a playback error while you integrate or use ApsaraVideo Player SDK for Windows, see Troubleshoot playback errors. If the issue persists, contact technical support.