diff --git a/docs/configuration.md b/docs/configuration.md index 0a961306..347710bf 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -99,7 +99,8 @@ var provider = new playkit.providers.ott.Provider(config); > serviceUrl: string, > cdnUrl: string, > useApiCaptions: boolean, -> replaceHostOnlyManifestUrls: boolean // optional +> replaceHostOnlyManifestUrls: boolean, // optional +> overrideServiceUrl: string //optional > } > ``` > @@ -112,7 +113,8 @@ var provider = new playkit.providers.ott.Provider(config); > serviceUrl: "//www.kaltura.com/api_v3", > cdnUrl: "//cdnapisec.kaltura.com", > useApiCaptions: true, -> replaceHostOnlyManifestUrls: false +> replaceHostOnlyManifestUrls: false, +> overrideServiceUrl : null > } > ``` > diff --git a/src/k-provider/ovp/config.ts b/src/k-provider/ovp/config.ts index 521d02db..92be92d7 100644 --- a/src/k-provider/ovp/config.ts +++ b/src/k-provider/ovp/config.ts @@ -15,6 +15,9 @@ const defaultConfig: any = { export default class OVPConfiguration { public static set(clientConfig?: ProviderEnvConfigObject): void { + if(clientConfig?.overrideServiceUrl) { + clientConfig.serviceUrl = clientConfig.overrideServiceUrl; + } if (clientConfig) { Object.assign(defaultConfig, clientConfig); } diff --git a/src/types/env-config.ts b/src/types/env-config.ts index 8df9ef34..7740b9bc 100644 --- a/src/types/env-config.ts +++ b/src/types/env-config.ts @@ -4,4 +4,5 @@ export type ProviderEnvConfigObject = { analyticsServiceUrl?: string; useApiCaptions?: boolean; replaceHostOnlyManifestUrls?: boolean; + overrideServiceUrl?: string; };