import { KPAdPrebidConfig, KPPrebidConfig } from './prebid-config'; /** * @typedef {Object} KPAdObject * @property {Array} url - List of urls, each one specifies the ad tag url that is requested from the ad server. The player will request the first url, if failed, it will request the second url and so on (aka waterfalling). * @property {Array} response - List of XMLs, each one specifies a VAST 2.0 document to be used as the ads response instead of making a request via an ad tag url. The player will use the first XML, if failed, it will use the second and so on (aka waterfalling). * @property {boolean} bumper - Specifies whether this is a bumper. * @property {KPAdPrebidConfig} prebid - Specifies whether this is a prebid ad and add the relevant config for prebid request. */ export type KPAdObject = { url?: Array; response?: Array; bumper?: boolean; prebid?: KPAdPrebidConfig; }; /** * @typedef {Array} KPAdPod */ export type KPAdPod = Array; /** * @typedef {Object} KPAdBreakObject * @property {number} position - The position, in seconds, to show the ad break. * @property {number} percentage - Alternative parameter to `position`. The position, in percentage of the media length, to show the ad break (optional). * @property {number} every - Alternative parameter to `position`. Play ad break every X seconds (optional). * @property {KPAdPod} ads - An array of ads to play (Ad pod). */ export type KPAdBreakObject = { position: number; percentage?: number; every?: number; ads: KPAdPod; }; /** * @typedef {Object} KPAdvertisingConfigObject * @property {KPPrebidConfig} prebid - The prebid config. * @property {Array} adBreaks - The ad breaks scheme. * @property {number} [playAdsAfterTime] - Only play ad breaks scheduled after this time (in seconds). This setting is strictly after - e.g. setting playAdsAfterTime to 15 will cause the player to ignore an ad break scheduled to play at 15s. * @property {boolean} [showAdBreakCuePoint] - Whether to show the ad breaks cue points. * @property {Object} [adBreakCuePointStyle] - Style options for the ad breaks cue points - See the options {@link https://github.com/kaltura/playkit-js-timeline/blob/main/docs/types.md#cuepointoptionsobject|Here}. */ export type KPAdvertisingConfigObject = { prebid?: KPPrebidConfig; adBreaks: Array; playAdsAfterTime?: number; showAdBreakCuePoint?: boolean; adBreakCuePointStyle?: Object; };