Skip to content

Commit

Permalink
FEC-14359: add param to override service URL (#256)
Browse files Browse the repository at this point in the history
### Description of the Changes

Please add a detailed description of the change, whether it's an
enhancement or a bugfix.
If the PR is related to an open issue please link to it.

**Issue:**

**Fix:**

#### Resolves FEC-[Please add the ticket reference here]
  • Loading branch information
MosheMaorKaltura authored Jan 30, 2025
1 parent 15ba1bf commit 88b9d7d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
> }
> ```
>
Expand All @@ -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
> }
> ```
>
Expand Down
3 changes: 3 additions & 0 deletions src/k-provider/ovp/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions src/types/env-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export type ProviderEnvConfigObject = {
analyticsServiceUrl?: string;
useApiCaptions?: boolean;
replaceHostOnlyManifestUrls?: boolean;
overrideServiceUrl?: string;
};

0 comments on commit 88b9d7d

Please sign in to comment.