Yes, the OfflineContentManager replaced the old OfflineManager APIs, but from a conceptual perspective, everything stayed the same.
Previously, every method of the OfflineManager required to pass in a SourceConfig (SourceItem in v2). This SourceConfig acted more as an identifier than being needed. Therefore we made the switch (also to align with our Android SDK) to the OfflineContentManager, which can be obtained via the OfflineManager and can be used to ‘manage’ the offline content for a given Source (SourceConfig) without the need going through the OfflineManager with the correct SourceConfig all the time anymore.
Hi David @davidsteinacher ,
I’m also wondering GoogleCasting will be in V3.
Cause I’m curious the v3 in demo just one row code
{
// Initialize ChromeCast support for this application
BitmovinCastManager.initializeCasting()
}
And this is my old version code below,
{
// Add Google Cast
config.remoteControlConfiguration.prepareSource = { [weak self]
(type: BMPRemoteControlType, sourceItem: SourceItem?) in
switch type {
case .cast:
guard let googleCastStreamUrl = self?.video?.dashURL else {
return nil
}
// Create DASHSource as a DASH stream is used for casting
let dashSource = DASHSource(url: googleCastStreamUrl)
let castSource = SourceItem(dashSource: dashSource)
castSource.itemTitle = sourceItem?.itemTitle
castSource.itemDescription = sourceItem?.itemDescription
let widevineConfig = WidevineConfiguration(license: licenseUrl)
if needDRM == true{
widevineConfig.licenseRequestHeaders = ["X-Custom-Data": "token_type=upfront&token_value=\(self?.video?.kks_playback_token ?? "")"]
}
castSource.add(drmConfiguration: widevineConfig)
return castSource
@unknown default:
return nil
}
}
Please refer to the AdvancedCastingSample where exactly this use-case is showcased in lines 74 to 95. The main difference is the Source initialization which changed from SourceItem(dashSource: dashSource) to SourceConfig(url: dashSource, type: .dash).