Hello everyone,
We would like to implement a feature inside our apps that allow users to download a specific video quality for a source. While we could figure it out on Android, we are facing some challenges with the Bitmovin Player iOS SDK.
According to the documentation, we should be able to achieve this by setting the minimumBitrate value inside the DownloadConfig():
The lowest media bitrate greater than or equal to this value in bps will be selected for download. If no suitable media bitrate is found or if set to nil, the highest media bitrate will be selected.
What we tried to achieve here is to set the minimumBitrate to 1, which should force to download the lowest video quality from our HLS manifest.
func download(sourceConfig: SourceConfig) {
let downloadConfig = DownloadConfig()
downloadConfig.minimumBitrate = 1 // bit per second
offlineContentManager?.download(downloadConfig: downloadConfig)
}
However, as a user point-of-view, we noticed 2 issues:
- The download duration remains the same, whatever we set the minimumBitrate to 1 or not
- The video quality within the player seems to always be the highest one
We wanted to validate our assertion programmatically, unfortunately it seems the availableVideoQualities list is empty when playing a source offline.
func onReady(_ event: ReadyEvent, player: Player) {
self.player.availableVideoQualities.forEach { VideoQuality in
print("\(VideoQuality.width) x \(VideoQuality.height)")
}
}
Are we missing something in the download configuration or does anyone find a way to make downloadConfig.minimumBitrate work as expected?
Thank you in advance for your time!