Releases: kaltura/playkit-android-smartSwitch
v4.22.0
v4.21.1
v4.21.0
Changes from v4.20.1
KalturaPlayer Support
v4.21.0
Features
-
FEC-11898 | Add support in new smart-switch URL request format (#8)
-
FEC-11959 | Rename
smartSwitchUrl
todomainUrl
(#9)
Breaking Change : Now while configuringSmartSwitchConfig
, if you are configuringOptionalParams
HashMap then nowOptionalParams
is the 2nd parameter of theSmartSwitchConfig
constructor.Example:
val smartSwitchConfig = SmartSwitchConfig("Account", optionalParams, "App", "smartSwitchDomain")
Plugin's Version
- implementation 'com.kaltura.playkit:smartswitchplugin:4.21.0'
v4.20.1
v4.19.0
v4.18.0
v4.17.0
v4.16.0
v4.15.0
First Release
Features
- FEC-10993 | SmartSwitch Enablement
This plugin is built upon Kaltura Player.
In case player issue an API call towards the Youbora smart-switch service, which will return an ordered list of CDNs.
The plugin will pick the first one and use the url inside for the playback.
In case of error the original url that was retrieved from the the BE will be used and a non-fatal SMART_SWITCH Error will be fired to the
app
Plugin Config
// SmartSwitch Configuration
val pkPluginConfigs = PKPluginConfigs()
val optionalParams: HashMap<String, String> = HashMap()
optionalParams.put("OPTION_PARAM_KEY_1", "OPTION_PARAM_VALUE_1")
optionalParams.put("OPTION_PARAM_KEY_2", "OPTION_PARAM_VALUE_2")
val smartSwitchConfig = SmartSwitchConfig("YOUR_ACCOUNT_CODE", "YOUR_ORIGIN_CODE", optionalParams)
pkPluginConfigs.setPluginConfig(SmartSwitchPlugin.factory.name, smartSwitchConfig)
playerInitOptions.setPluginConfigs(pkPluginConfigs)
/** * Create SmartSwitch Config object
*
* @param accountCode Mandatory: YOUBORA account code
* @param originCode Mandatory: CDN group configured to select a subset of configured CDNs
* @param optionalParams Optional:
* Ex. ip(String), extraData(Boolean), userAgent(String),
* live(Boolean), nva(Not Valid After timestamp in UTC +1, Integer),
* nvb(Not Valid Before timestamp in UTC +1,Integer), token(String)
* @param smartSwitchUrl Optional: SmartSwitch server url
*
* @return SmartSwitchConfig
*/data class SmartSwitchConfig @JvmOverloads constructor(@NonNull val accountCode: String? = null, @NonNull val originCode: String? = null,
val optionalParams: HashMap<String, String>? = null,
var smartSwitchUrl: String? = null) {
init {
if (smartSwitchUrl.isNullOrEmpty() || !URLUtil.isNetworkUrl(smartSwitchUrl)) {
smartSwitchUrl = "http://cdnbalancer.youbora.com/orderedcdn"
}
}}
Error Listener
player?.addListener(this, SmartSwitchEvent.error) { event ->
Log.i(TAG, "SmartSwitch ERROR " + event.errorMessage)
}
Plugin's Version
- implementation 'com.kaltura.playkit:smartswitchplugin:4.15.0'