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.
CMake is installed. We recommend that you install CMake V3.15 or later. To download CMake, visit the CMake website.
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
Decompress ApsaraVideo Player SDK for Windows.
Directory
Description
sdk
Contains the SDK files.
doc
Contains the help documentation, including .js and .html files.
demo
Contains the demo of the SDK.
NoteThe demo can be complied on a 32-bit Windows operating system and run on a 64-bit Windows operating system.
Optional: Compile the demo.
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.Run the demo/src/AliyunPlayerTest/build_win.bat file.
Double-click the QAliyunPlayerTest.sln file generated in the demo/src/AliyunPlayerTest/build folder and compile the file in the x86 architecture.
Copy the demo/src/AliyunPlayerTest/AliyunPlayerTest/mui folder to your project directory.
Integrate the SDK.
Copy the sdk_headers and bin subfolders in the sdk folder to your project directory and specify dependencies for your project. In this example, the third_party\aliplayer destination directory of your project is used.
Copy the sdk\sdk_headers folder to the third_party\aliplayer directory.
Copy the sdk\bin\AliPlayer.lib file to the third_party\aliplayer\lib directory.
Configure the add-on package in the third_party\aliplayer\sdk_headers directory of your project.
Compile the project.
After the compilation is complete, copy all folders and .dll files in the sdk\bin folder to the directory of the .exe file.
References
If errors occur when you integrate or use ApsaraVideo Player SDK for Windows, troubleshoot the error based on the methods described in Troubleshoot playback errors. If the issue persists, contact Alibaba Cloud technical support.