Skip to content

Latest commit

 

History

History
224 lines (202 loc) · 4.25 KB

configuration.md

File metadata and controls

224 lines (202 loc) · 4.25 KB

Configuration

Configuration parameters are provided upon instantiation of the provider instance.

OVP

var config = {
  // Configuration here
};
var provider = new playchi.providers.ovp.Provider(config);

Cloud TV

var config = {
  // Configuration here
};
var provider = new playchi.providers.ott.Provider(config);

Configuration Structure

{
  partnerId: number,
  logger?: LoggerType, // optional
  ts: string, // optional
  uiConfId: number, // optional
  env: ProviderEnvConfigObject, // optional
  networkRetryParameters: ProviderNetworkRetryParameters, // optional
  filterOptions: ProviderFilterOptionsObject, // optional
  ignoreServerConfig: boolean, // optional
  loadThumbnailWithTs: boolean // optional
}

config.log

Type: Object

config.log.level

Type: string
Default: "ERROR"
Description: Defines the provider log level.

Possible values: "DEBUG", "INFO", "TIME", "WARN", "ERROR", "OFF"

config.log.handler

Type: function
Description: Defines the log handler function by default will write to console.

config.partnerId

Type: number
Default: -
Description: Defines the customer's partner ID.

config.ts

Type: string
Default: ''
Description: Defines the customer's unique TS.

config.uiConfId

Type: number
Default: -
Description: Defines the customer's UI config ID.

config.env

Type: ProviderEnvConfigObject
{
 serviceUrl: string,
 cdnUrl: string,
 useApiCaptions: boolean,
 replaceHostOnlyManifestUrls: boolean // optional
}
Default:

OVP

{
 serviceUrl: "//www.tasvirchi.com/api_v3",
 cdnUrl: "//cdnapisec.tasvirchi.com",
 useApiCaptions: true,
 replaceHostOnlyManifestUrls: false
}

Cloud TV

{
 serviceUrl: "//api-preprod.ott.tasvirchi.com/v4_6/api_v3",
 cdnUrl: "//api-preprod.ott.tasvirchi.com/v4_7"
}
Description: Defines the server environment to run against.

config.env.useApiCaptions

Type: boolean
Default: true
Description: Show captions on platforms that don't support inband captions (for example: playing using Flash). This flag is for the OVP provider, and can be turned off by setting its value to false.

config.env.replaceHostOnlyManifestUrls

Type: boolean
Default: false
Description: Defines whether to replace host only for play manifest URLs or to replace also for captions and poster URLs. This flag is for OVP provider, and can be turned on by setting its value to true.

config.networkRetryParameters

Type: ProviderNetworkRetryParameters
{
 async?: boolean,
 timeout?: number,
 maxAttempts?: number
}

config.networkRetryParameters.async

Type: boolean
Default: true
Description: Defines whether or not to perform the request operation asynchronously.

config.networkRetryParameters.timeout

Type: number
Default: 0 - This means it will use the browser default timeout.
Description: Defines the timeout for provider requests in milliseconds.

config.networkRetryParameters.maxAttempts

Type: number
Default: 4
Description: Defines the number of attemps the provider should try make a request before the request fails.

config.filterOptions

Type: ProviderFilterOptionsObject
{
  redirectFromEntryId: boolean;
}
Default:
{
  redirectFromEntryId: true;
}
Description: Defines whether after a livestream ends there should be a redirect to the VOD entry or not.

config.ignoreServerConfig

Type: boolean
Description: Instructs the player to ignore the server configuration.

config.loadThumbnailWithTs

Type: boolean
Default: false
Description: Defines whether to add TS to OVP thumbnail API request or not.>