diff --git a/Sources/OTT/KalturaOTTPlayer.swift b/Sources/OTT/KalturaOTTPlayer.swift index f40be58..4b6fdd5 100644 --- a/Sources/OTT/KalturaOTTPlayer.swift +++ b/Sources/OTT/KalturaOTTPlayer.swift @@ -187,3 +187,25 @@ import PlayKitKava } } } + +// MARK: - Bypass Config Fetching + +extension KalturaOTTPlayer { + + /** + Call this function in case the BE environment has not been set up yet with the config data. + + This function needs to be called before the `setup` function. + + * Parameters: + * partnerId: The OTT Partner ID. + * ovpPartnerId: The OVP Partner ID. + * analyticsUrl: The Analytics Url used for Kava. + * ovpServiceUrl: The OVP Service Url. + * uiConfId: The UI Conf ID. + */ + @objc public static func bypassConfigFetching(partnerId: Int64, ovpPartnerId: Int64, analyticsUrl: String, ovpServiceUrl: String, uiConfId: Int64) { + + KPOTTDMSConfigModel.shared.addPartnerConfig(partnerId: partnerId, ovpPartnerId: ovpPartnerId, analyticsUrl: analyticsUrl, ovpServiceUrl: ovpServiceUrl, uiConfId: uiConfId) + } +} diff --git a/Sources/OVP/KalturaOVPPlayer.swift b/Sources/OVP/KalturaOVPPlayer.swift index e0c0ad1..61dd016 100644 --- a/Sources/OVP/KalturaOVPPlayer.swift +++ b/Sources/OVP/KalturaOVPPlayer.swift @@ -162,3 +162,23 @@ import PlayKitProviders } } } + +// MARK: - Bypass Config Fetching + +extension KalturaOVPPlayer { + + /** + Call this function in case the BE environment has not been set up yet with the config data. + + This function needs to be called before the `setup` function. + + * Parameters: + * partnerId: The OVP Partner ID. + * analyticsUrl: The Analytics Url used for Kava. + * analyticsPersistentSessionId: Whether to set a persistent session id. + */ + @objc public static func bypassConfigFetching(partnerId: Int64, analyticsUrl: String, analyticsPersistentSessionId: Bool) { + + KPOVPConfigModel.shared.addPartnerConfig(partnerId: partnerId, analyticsUrl: analyticsUrl, analyticsPersistentSessionId: analyticsPersistentSessionId) + } +}