SDK Integration
Last Updated:2021-09-15
Development Environment
- Xcode 9.2
- Version IOS 8.0 or above
Cocoapods Rapid Integration
Cocoapods access is very simple. Please see Cocoapods Access Way.
If you use Cocoapods for access, you can skip [Manual Integration](#Manual integration).
Manual Integration
-
Download the latest Player IOS SDK and decompress;
Baidu-Cloud-Player-<Type>-<Version> |------frameworks | |-------BDCloudMediaUtils.framework | |-------BDCloudMediaPlayer.framework | |-------BDCloudMediaDownloader.framework | |-------BDCloudMediaSprite.framework | |-------BDCloudMediaSource.framework | |-------BDCloudVRRender.framework | |-------BDCloudMediaAdaptive.framework | |------vendor | |-------libffmpeg.a | |-------libcrypto.a | |-------libssl.a | |------VideoPlayer |-------VideoPlayer.xcodeproj |-------VideoPlayer
-
Add BDCloudMediaUtils.framework and BDCloudMediaPlayer.framework to the project.
- If you need to use HLS offline download feature, you shall add BDCloudMediaDownloader.framework to the project;
- If you use thumbnail display feature, add BDCloudMediaSprite.framework to the project;
- If you use online video acceleration feature, add BDCloudMediaSource.framework to the project;
- If you use VR rendering feature, add BDCloudVRRender.framework to the project;
- If you need to use self-adaptive code rate switchover feature, add BDCloudMediaAdaptive.framework to the project;
-
Add libcrypto.a
,
libssl.aand
libffmpeg.ainto
Link Binary With Librariesof
Build Phases`; - Add
libz.tbd
andlibbz2.tbd
to theLink Binary With Libraries
ofBuild Phases
; -
Set appropriate
Framework Search Paths
to ensure that the link can be found:- BDCloudMediaUtils.framework
- BDCloudMediaPlayer.framework
- BDCloudMediaDownloader.framework
- BDCloudMediaSprite.framework
- BDCloudMediaSource.framework
- BDCloudVRRender.framework
- BDCloudMediaAdaptive.framework
-
Set appropriate
Library Search Paths
; when linking, ensure to find:- libcrypto.a
- libssl.a
- libffmpeg.a
-
Add authentication file dependencies;
- The authentication document is:playerxxxxxxxxxxxxx.license
- Application path of authentication document: Apply for Authentication Document