iOS Player -2.0- Launching Bulletin and Regular Subscriber Migration Problem
When designing the new SDK version 2.0, the interface height is the same as the interfaces in SDK version 1.0 and MPMoviePlayerController
to possibly reduce the user migration cost. But there will be more or less some differences. The following are the main alternation points:
- [Naming Change](#Naming Change)
- [Unit Change](#Unit Change)
- [Interface Change](#Interface Change)
- [Notification Change](#Notification Change)
Meanwhile, SDK of new version 2.0 also comes with demo, so as to facilitate the old users to refer for and migration.
Naming Change
In new SDK version 2.0, the class names all start with BDCloud
, the abbreviation of the brand “Baidu AI Cloud”.
In SDK version 1.0, the class names all start with Cyber
.
Unit change
The unit of getting download speed interface downloadSpeed
changes from KBps to Bps.
Interface change
Original interface(1.0) | New interface(2.0) | Description |
---|---|---|
Information related to subtitle | - | The new version SDK doesn’t support subtitle features |
start | - | In the new version SDK, play is used to replace |
setAccessKey: | Class BDCloudMediaPlayerAuth | New version SDK uses class BDCloudMediaPlayerAuth for authentication |
getSupportedResolution | getSupportedBitrates | In the new version SDK, getSupportedResolution feature is combined in the getSupportedBitrates method |
getBitrateIndex | bitrateIndex | - |
selectBitrate: | setBitrateIndex: | - |
getCurrentPlayingUrl | - | Deleted |
snapshot | thumbnailImageAtCurrentTime | - |
dolbyEnabled | - | Deleted |
scalingMode | scalingMode | New version SDK takes out 5:4 4:3 16:9 zoom mode |
videoHeight | - | It has been deleted, and is accessed by naturalSize |
videoWidth | - | It has been deleted, and is accessed by naturalSize |
shouldAutoClearRender | - | Deleted |
shouldPauseCaching | - | Deleted |
infoDuration | - | Deleted |
accurateSeeking | - | Deleted |
accuratePostion | - | Deleted |
cachePauseTimeInSeconds | setCachePauseTime | - |
firstBufferingTimeInSeconds | setFirstBufferingTime | - |
Notification Change
Original notification(1.0) | New notification(2.0) |
---|---|
CyberPlayerStartCachingNotification | The original notifications are divided into two notifications: BDCloudMediaPlayerBufferingStartNotification BDCloudMediaPlayerBufferingEndNotification |
CyberPlayerGotCachePercentNotification | BDCloudMediaPlayerBufferingUpdateNotificationUse BDCloudMediaPlayerBufferingProgressUserInfoKey to get the cache process Use BDCloudMediaPlayerBufferingPositionUserInfoKey to access the buffer position |
CyberPlayerPlaybackErrorNotification | Combine into BDCloudMediaPlayerPlaybackDidFinishNotification Use BDCloudMediaPlayerPlaybackDidFinishReasonUserInfoKey to get the finish reason |
CyberPlayerSeekingDidFinishNotification | BDCloudMediaPlayerPlaybackStateDidChangeNotification playbackStateChange from BDCloudMediaPlayerPlaybackStateSeekingForward or BDCloudMediaPlayerPlaybackStateSeekingBackward to BDCloudMediaPlayerPlaybackStatePlaying |
CyberPlayerGotNetworkBitrateNotification | Regularly get the attribute when playingdownloadSpeed |
CyberPlayerCurrentPositionNotification | Regularly get the attribute when playingcurrentPlaybackTime |
FAQ About Migration
Support multiple instances
- Version 1.0 doesn’t support multi-instance, and the new instance can be created after waiting for releasing the old instance.
- Version 2.0 already supports multi-instance, and the different instances don’t influence each other.
Better decoding performance
- Version 1.0 only uses software decoding; new version supports hardware decoding.
- The decoding mode of Version 2.0 is AUTO by default (hardware decoding in priority and software decoding is automatically transferred when the hardware decoding fails). If you use soft solutions all the time, you can set them through the ‘setVideoDecodeMode’ interface.
Support double-speed playback
New version SDK supports setting play speed rate playbackRate
.
Support to set the watermark
The new version SDK adds support for watermarks, and the customer can set the watermarked images and watermark positions.
Support access to APM
APM SDKSupport data monitoring, sending, backstage report and display capacities. With powerful real-time capability, it can report the stutter, network speed and other information in a timely manner that the user encounters during VoD and live broadcast, so as to facilitate the operator to adjust the strategy and schedule in time.
SDK new version 2.0 doesn’t directly rely on APM SDK
, dynamically check whether the App introduces APM SDK
when operating.
If there is any problem during the process of migration, please contact us
When there is any problem during the process of migration, please submit Ticket or Forum, we will contact you as soon as possible.
The previous Baidu AI Cloud Player, please see iOS SDK 1.0 for the help document.