Skip to content

Commit

Permalink
FEC-10688 Added a function to bypass the config fetching, in case the…
Browse files Browse the repository at this point in the history
… environment is not ready. (#25)
  • Loading branch information
x-NR-x authored Feb 22, 2021
1 parent f30e513 commit 728917f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Sources/OTT/KalturaOTTPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
20 changes: 20 additions & 0 deletions Sources/OVP/KalturaOVPPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 728917f

Please sign in to comment.