From c3f25ea0c1579c683b81b5d3c4000e7318fbe7da Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Thu, 17 Sep 2020 13:25:31 +0300 Subject: [PATCH 1/8] feat(FEC-10015): support smart scrubber preview and timeline marker --- flow-typed/types/ui-component.js | 2 +- src/common/ui-wrapper.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/flow-typed/types/ui-component.js b/flow-typed/types/ui-component.js index db31c0bba..ad7212365 100644 --- a/flow-typed/types/ui-component.js +++ b/flow-typed/types/ui-component.js @@ -2,7 +2,7 @@ declare type KPUIComponent = { label: string, presets: Array, - container: string, + area: string, get: Function, props: {}, beforeComponent?: string, diff --git a/src/common/ui-wrapper.js b/src/common/ui-wrapper.js index a1f8e249e..2e54b380e 100644 --- a/src/common/ui-wrapper.js +++ b/src/common/ui-wrapper.js @@ -62,6 +62,10 @@ class UIWrapper { return this._uiManager.addComponent(component); } + get managers(): Object { + return this._uiManager.managers; + } + _resetErrorState(): void { this.setConfig({hasError: false}, 'engine'); } From 12666daa0de8728d1d9dade59a663ff3ee330e5b Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Tue, 27 Oct 2020 14:53:59 +0200 Subject: [PATCH 2/8] make props optional --- flow-typed/types/ui-component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow-typed/types/ui-component.js b/flow-typed/types/ui-component.js index ad7212365..7d341f544 100644 --- a/flow-typed/types/ui-component.js +++ b/flow-typed/types/ui-component.js @@ -4,7 +4,7 @@ declare type KPUIComponent = { presets: Array, area: string, get: Function, - props: {}, + props?: {}, beforeComponent?: string, afterComponent?: string, replaceComponent?: string From c1ae9d988aebd968148b03c5cc819ade5dee71dc Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Wed, 28 Oct 2020 12:33:33 +0200 Subject: [PATCH 3/8] expose the manager api's --- src/common/ui-wrapper.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/common/ui-wrapper.js b/src/common/ui-wrapper.js index d3944749c..6bad8b5b1 100644 --- a/src/common/ui-wrapper.js +++ b/src/common/ui-wrapper.js @@ -61,8 +61,31 @@ class UIWrapper { return this._uiManager.addComponent(component); } - get managers(): Object { - return this._uiManager.managers; + /** + * @param {string} name - the manager name + * @param {Object} manager - the manager object + * @returns {void} + */ + registerManager(name: string, manager: Object): void { + this._uiManager.registerManager(name, manager); + } + + /** + * + * @param {string} name - the manager name + * @returns {Object} - the manager object + */ + getManager(name: string): Object | void { + return this._uiManager.getManager(name); + } + + /** + * + * @param {string} name - the manager name + * @returns {boolean} - if the manager exist + */ + hasManager(name: string): boolean { + return this._uiManager.hasManager(name); } _resetErrorState(): void { From 71b5aabc339afdb89801cdbc9548e7b2c0dcd088 Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Thu, 10 Dec 2020 21:07:45 +0200 Subject: [PATCH 4/8] add cue point handling --- docs/advertisement-layout-management.md | 53 + docs/api.md | 2253 +++++++++++++--------- docs/configuration.md | 22 + flow-typed/types/advertising.js | 8 +- src/common/controllers/ads-controller.js | 8 + 5 files changed, 1482 insertions(+), 862 deletions(-) diff --git a/docs/advertisement-layout-management.md b/docs/advertisement-layout-management.md index 6bd6960d3..820598d0b 100644 --- a/docs/advertisement-layout-management.md +++ b/docs/advertisement-layout-management.md @@ -14,6 +14,7 @@ Ad break can be set as pre, mid and post rolls and each ad break can contain a s - [Play Ads After Time](#play-ads-after-time) - [Events](#events) - [Play Ad Now](#play-ad-now) +- [Seekbar Cue Points](#seekbar-cue-points) ### Single Ad @@ -300,3 +301,55 @@ kalturaPlayer.ads.playAdNow( }, ]); ``` + +### Seekbar Cue Points + +To display cue points on the seekbar to indicates the ad break positions use the following config: +```ecmascript 6 +const config = { + ... + plugins: { + ima: {} + }, + advertising: { + showAdBreakCuePoint: true, + adBreaks: [{ + position: 60, + ads: [{ + url: [MID_ROLL_VAST_URL] + }] + } + ] + } + ... +} +``` + +To customize the cue points style use `adBreakCuePointStyle` option. for example: +```ecmascript 6 +const config = { + ... + plugins: { + ima: {} + }, + advertising: { + showAdBreakCuePoint: true, + adBreakCuePointStyle: { + marker: { + width: 10, + color: 'rgb(255, 0, 0)' + } + }, + adBreaks: [{ + position: 60, + ads: [{ + url: [MID_ROLL_VAST_URL] + }] + } + ] + } + ... +} +``` + +All style options are listed [here](https://github.com/kaltura/playkit-js-timeline/blob/main/docs/types.md#cuepointoptionsobject). diff --git a/docs/api.md b/docs/api.md index f023f42f5..fd1eac1d9 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2,576 +2,596 @@ ### Table of Contents -- [KPAdObject][1] - - [Properties][2] -- [KPAdPod][3] -- [KPAdBreakObject][4] - - [Properties][5] -- [KPAdvertisingConfigObject][6] - - [Properties][7] -- [KalturaPlayers][8] -- [KPPlaylistOptions][9] - - [Properties][10] -- [KPPlaylistCountdownOptions][11] - - [Properties][12] -- [KPPlaylistConfigObject][13] - - [Properties][14] -- [KPPlaylistObject][15] - - [Properties][16] -- [KPPlaylistItemConfigObject][17] - - [Properties][18] -- [KPPluginsConfigObject][19] -- [AdBreak][20] - - [Parameters][21] - - [type][22] - - [position][23] - - [numAds][24] -- [Ad][25] - - [Parameters][26] - - [id][27] - - [system][28] - - [contentType][29] - - [url][30] - - [title][31] - - [position][32] - - [duration][33] - - [clickThroughUrl][34] - - [posterUrl][35] - - [skipOffset][36] - - [linear][37] - - [width][38] - - [height][39] - - [bitrate][40] - - [bumper][41] - - [skippable][42] -- [BaseRemotePlayer][43] - - [Parameters][44] - - [loadMedia][45] - - [Parameters][46] - - [setMedia][47] - - [Parameters][48] - - [getMediaInfo][49] - - [getMediaConfig][50] - - [configure][51] - - [Parameters][52] - - [ready][53] - - [load][54] - - [play][55] - - [pause][56] - - [reset][57] - - [destroy][58] - - [isLive][59] - - [Examples][60] - - [isDvr][61] - - [Examples][62] - - [seekToLiveEdge][63] - - [getStartTimeOfDvrWindow][64] - - [Examples][65] - - [getTracks][66] - - [Parameters][67] - - [Examples][68] - - [getActiveTracks][69] - - [Examples][70] - - [selectTrack][71] - - [Parameters][72] - - [hideTextTrack][73] - - [enableAdaptiveBitrate][74] - - [isAdaptiveBitrateEnabled][75] - - [Examples][76] - - [setTextDisplaySettings][77] - - [Parameters][78] - - [startCasting][79] - - [stopCasting][80] - - [isCasting][81] - - [Examples][82] - - [isCastAvailable][83] - - [Examples][84] - - [getCastSession][85] - - [Examples][86] - - [isVr][87] - - [Examples][88] - - [toggleVrStereoMode][89] - - [isInVrStereoMode][90] - - [Examples][91] - - [ads][92] - - [Examples][93] - - [textStyle][94] - - [Parameters][95] - - [textStyle][96] - - [Examples][97] - - [buffered][98] - - [Examples][99] - - [currentTime][100] - - [Parameters][101] - - [currentTime][102] - - [Examples][103] - - [duration][104] - - [Examples][105] - - [volume][106] - - [Parameters][107] - - [volume][108] - - [Examples][109] - - [paused][110] - - [Examples][111] - - [ended][112] - - [Examples][113] - - [seeking][114] - - [Examples][115] - - [muted][116] - - [Parameters][117] - - [muted][118] - - [Examples][119] - - [src][120] - - [Examples][121] - - [poster][122] - - [Examples][123] - - [playbackRate][124] - - [Parameters][125] - - [playbackRate][126] - - [Examples][127] - - [engineType][128] - - [Examples][129] - - [streamType][130] - - [Examples][131] - - [type][132] - - [Examples][133] - - [config][134] - - [defaultConfig][135] - - [Examples][136] - - [Type][137] - - [Examples][138] - - [isSupported][139] - - [Examples][140] -- [CastEventType][141] - - [Examples][142] -- [PlayerSnapshot][143] - - [Parameters][144] - - [textStyle][145] - - [advertising][146] - - [config][147] -- [RemoteControl][148] - - [Parameters][149] - - [getPlayerSnapshot][150] - - [getUIWrapper][151] - - [onRemoteDeviceDisconnected][152] - - [Parameters][153] - - [onRemoteDeviceConnected][154] - - [Parameters][155] - - [onRemoteDeviceAvailable][156] - - [Parameters][157] - - [onRemoteDeviceConnecting][158] - - [onRemoteDeviceDisconnecting][159] - - [onRemoteDeviceConnectFailed][160] -- [RemotePayload][161] - - [Parameters][162] - - [player][163] -- [RemoteConnectedPayload][164] - - [Parameters][165] - - [ui][166] - - [session][167] -- [RemoteDisconnectedPayload][168] - - [Parameters][169] - - [snapshot][170] -- [RemoteAvailablePayload][171] - - [Parameters][172] - - [available][173] -- [RemotePlayerUI][174] - - [playbackUI][175] - - [Parameters][176] - - [idleUI][177] - - [Parameters][178] - - [adsUI][179] - - [Parameters][180] - - [liveUI][181] - - [Parameters][182] - - [errorUI][183] - - [Parameters][184] - - [uis][185] -- [IRemotePlayer][186] - - [textStyle][187] - - [muted][188] - - [playbackRate][189] - - [volume][190] - - [currentTime][191] - - [buffered][192] - - [duration][193] - - [paused][194] - - [ended][195] - - [seeking][196] - - [src][197] - - [poster][198] - - [engineType][199] - - [streamType][200] - - [type][201] - - [ads][202] - - [config][203] - - [addEventListener][204] - - [Parameters][205] - - [removeEventListener][206] - - [Parameters][207] - - [dispatchEvent][208] - - [Parameters][209] - - [loadMedia][210] - - [Parameters][211] - - [setMedia][212] - - [Parameters][213] - - [getMediaInfo][214] - - [getMediaConfig][215] - - [configure][216] - - [Parameters][217] - - [ready][218] - - [load][219] - - [play][220] - - [pause][221] - - [reset][222] - - [destroy][223] - - [isLive][224] - - [isDvr][225] - - [seekToLiveEdge][226] - - [getStartTimeOfDvrWindow][227] - - [getTracks][228] - - [Parameters][229] - - [getActiveTracks][230] - - [selectTrack][231] - - [Parameters][232] - - [hideTextTrack][233] - - [enableAdaptiveBitrate][234] - - [isAdaptiveBitrateEnabled][235] - - [setTextDisplaySettings][236] - - [Parameters][237] - - [startCasting][238] - - [stopCasting][239] - - [isCasting][240] - - [isCastAvailable][241] - - [getCastSession][242] - - [isVr][243] - - [toggleVrStereoMode][244] - - [isInVrStereoMode][245] -- [RemoteSession][246] - - [Parameters][247] - - [deviceFriendlyName][248] - - [id][249] - - [resuming][250] -- [AdsController][251] - - [Parameters][252] - - [allAdsCompleted][253] - - [isAdBreak][254] - - [getAdBreaksLayout][255] - - [getAdBreak][256] - - [getAd][257] - - [skipAd][258] - - [playAdNow][259] - - [Parameters][260] -- [ControllerProvider][261] - - [Parameters][262] - - [getAdsControllers][263] -- [PlaylistEventType][264] - - [Examples][265] -- [PlaylistItem][266] - - [Parameters][267] - - [updateSources][268] - - [Parameters][269] - - [sources][270] - - [config][271] - - [isPlayable][272] -- [PlaylistManager][273] - - [Parameters][274] - - [configure][275] - - [Parameters][276] - - [load][277] - - [Parameters][278] - - [reset][279] - - [playNext][280] - - [playPrev][281] - - [playItem][282] - - [Parameters][283] - - [items][284] - - [next][285] - - [prev][286] - - [id][287] - - [metadata][288] - - [poster][289] - - [countdown][290] - - [options][291] -- [BasePlugin][292] - - [Parameters][293] - - [config][294] - - [name][295] - - [player][296] - - [player][297] - - [eventManager][298] - - [getConfig][299] - - [Parameters][300] - - [updateConfig][301] - - [Parameters][302] - - [loadMedia][303] - - [destroy][304] - - [reset][305] - - [getName][306] - - [dispatchEvent][307] - - [Parameters][308] - - [defaultConfig][309] - - [createPlugin][310] - - [Parameters][311] - - [isValid][312] -- [PluginManager][313] - - [load][314] - - [Parameters][315] - - [loadMedia][316] - - [destroy][317] - - [reset][318] - - [get][319] - - [Parameters][320] - - [getAll][321] - - [register][322] - - [Parameters][323] - - [unRegister][324] - - [Parameters][325] -- [registerPlugin][326] -- [maybeSetStreamPriority][327] - - [Parameters][328] -- [hasYoutubeSource][329] - - [Parameters][330] -- [loadMedia][331] - - [Parameters][332] - - [Examples][333] -- [loadPlaylist][334] - - [Parameters][335] - - [Examples][336] -- [loadPlaylistByEntryList][337] - - [Parameters][338] - - [Examples][339] -- [configure][340] - - [Parameters][341] - - [Examples][342] -- [playlist][343] - - [Examples][344] -- [crossOrigin][345] - - [Parameters][346] -- [crossOrigin][347] -- [getPlayers][348] -- [getPlayer][349] - - [Parameters][350] +- [KPAdObject][1] + - [Properties][2] +- [KPAdPod][3] +- [KPAdBreakObject][4] + - [Properties][5] +- [KPAdvertisingConfigObject][6] + - [Properties][7] +- [KalturaPlayers][8] +- [KPPlaylistOptions][9] + - [Properties][10] +- [KPPlaylistCountdownOptions][11] + - [Properties][12] +- [KPPlaylistConfigObject][13] + - [Properties][14] +- [KPPlaylistObject][15] + - [Properties][16] +- [KPPlaylistItemConfigObject][17] + - [Properties][18] +- [KPPluginsConfigObject][19] +- [AdBreak][20] + - [Parameters][21] + - [type][22] + - [position][23] + - [numAds][24] +- [Ad][25] + - [Parameters][26] + - [id][27] + - [system][28] + - [contentType][29] + - [url][30] + - [title][31] + - [position][32] + - [duration][33] + - [clickThroughUrl][34] + - [posterUrl][35] + - [skipOffset][36] + - [linear][37] + - [width][38] + - [height][39] + - [bitrate][40] + - [bumper][41] + - [skippable][42] +- [BaseRemotePlayer][43] + - [Parameters][44] + - [loadMedia][45] + - [Parameters][46] + - [setMedia][47] + - [Parameters][48] + - [getMediaInfo][49] + - [getMediaConfig][50] + - [configure][51] + - [Parameters][52] + - [ready][53] + - [load][54] + - [play][55] + - [pause][56] + - [reset][57] + - [destroy][58] + - [isLive][59] + - [Examples][60] + - [isDvr][61] + - [Examples][62] + - [seekToLiveEdge][63] + - [getStartTimeOfDvrWindow][64] + - [Examples][65] + - [getTracks][66] + - [Parameters][67] + - [Examples][68] + - [getActiveTracks][69] + - [Examples][70] + - [selectTrack][71] + - [Parameters][72] + - [hideTextTrack][73] + - [enableAdaptiveBitrate][74] + - [isAdaptiveBitrateEnabled][75] + - [Examples][76] + - [setTextDisplaySettings][77] + - [Parameters][78] + - [startCasting][79] + - [stopCasting][80] + - [isCasting][81] + - [Examples][82] + - [isCastAvailable][83] + - [Examples][84] + - [getCastSession][85] + - [Examples][86] + - [isVr][87] + - [Examples][88] + - [toggleVrStereoMode][89] + - [isInVrStereoMode][90] + - [Examples][91] + - [ads][92] + - [Examples][93] + - [textStyle][94] + - [Parameters][95] + - [textStyle][96] + - [Examples][97] + - [buffered][98] + - [Examples][99] + - [currentTime][100] + - [Parameters][101] + - [currentTime][102] + - [Examples][103] + - [duration][104] + - [Examples][105] + - [volume][106] + - [Parameters][107] + - [volume][108] + - [Examples][109] + - [paused][110] + - [Examples][111] + - [ended][112] + - [Examples][113] + - [seeking][114] + - [Examples][115] + - [muted][116] + - [Parameters][117] + - [muted][118] + - [Examples][119] + - [src][120] + - [Examples][121] + - [poster][122] + - [Examples][123] + - [playbackRate][124] + - [Parameters][125] + - [playbackRate][126] + - [Examples][127] + - [engineType][128] + - [Examples][129] + - [streamType][130] + - [Examples][131] + - [type][132] + - [Examples][133] + - [config][134] + - [defaultConfig][135] + - [Examples][136] + - [Type][137] + - [Examples][138] + - [isSupported][139] + - [Examples][140] +- [CastEventType][141] + - [Examples][142] +- [PlayerSnapshot][143] + - [Parameters][144] + - [textStyle][145] + - [advertising][146] + - [config][147] +- [RemoteControl][148] + - [Parameters][149] + - [getPlayerSnapshot][150] + - [getUIWrapper][151] + - [onRemoteDeviceDisconnected][152] + - [Parameters][153] + - [onRemoteDeviceConnected][154] + - [Parameters][155] + - [onRemoteDeviceAvailable][156] + - [Parameters][157] + - [onRemoteDeviceConnecting][158] + - [onRemoteDeviceDisconnecting][159] + - [onRemoteDeviceConnectFailed][160] +- [RemotePayload][161] + - [Parameters][162] + - [player][163] +- [RemoteConnectedPayload][164] + - [Parameters][165] + - [ui][166] + - [session][167] +- [RemoteDisconnectedPayload][168] + - [Parameters][169] + - [snapshot][170] +- [RemoteAvailablePayload][171] + - [Parameters][172] + - [available][173] +- [RemotePlayerUI][174] + - [playbackUI][175] + - [Parameters][176] + - [idleUI][177] + - [Parameters][178] + - [adsUI][179] + - [Parameters][180] + - [liveUI][181] + - [Parameters][182] + - [errorUI][183] + - [Parameters][184] + - [uis][185] +- [IRemotePlayer][186] + - [textStyle][187] + - [muted][188] + - [playbackRate][189] + - [volume][190] + - [currentTime][191] + - [buffered][192] + - [duration][193] + - [paused][194] + - [ended][195] + - [seeking][196] + - [src][197] + - [poster][198] + - [engineType][199] + - [streamType][200] + - [type][201] + - [ads][202] + - [config][203] + - [addEventListener][204] + - [Parameters][205] + - [removeEventListener][206] + - [Parameters][207] + - [dispatchEvent][208] + - [Parameters][209] + - [loadMedia][210] + - [Parameters][211] + - [setMedia][212] + - [Parameters][213] + - [getMediaInfo][214] + - [getMediaConfig][215] + - [configure][216] + - [Parameters][217] + - [ready][218] + - [load][219] + - [play][220] + - [pause][221] + - [reset][222] + - [destroy][223] + - [isLive][224] + - [isDvr][225] + - [seekToLiveEdge][226] + - [getStartTimeOfDvrWindow][227] + - [getTracks][228] + - [Parameters][229] + - [getActiveTracks][230] + - [selectTrack][231] + - [Parameters][232] + - [hideTextTrack][233] + - [enableAdaptiveBitrate][234] + - [isAdaptiveBitrateEnabled][235] + - [setTextDisplaySettings][236] + - [Parameters][237] + - [startCasting][238] + - [stopCasting][239] + - [isCasting][240] + - [isCastAvailable][241] + - [getCastSession][242] + - [isVr][243] + - [toggleVrStereoMode][244] + - [isInVrStereoMode][245] +- [RemoteSession][246] + - [Parameters][247] + - [deviceFriendlyName][248] + - [id][249] + - [resuming][250] +- [AdsController][251] + - [Parameters][252] + - [allAdsCompleted][253] + - [isAdBreak][254] + - [getAdBreaksLayout][255] + - [getAdBreak][256] + - [getAd][257] + - [skipAd][258] + - [playAdNow][259] + - [Parameters][260] +- [ControllerProvider][261] + - [Parameters][262] + - [getAdsControllers][263] +- [PlaylistEventType][264] + - [Examples][265] +- [PlaylistItem][266] + - [Parameters][267] + - [updateSources][268] + - [Parameters][269] + - [sources][270] + - [config][271] + - [isPlayable][272] +- [PlaylistManager][273] + - [Parameters][274] + - [configure][275] + - [Parameters][276] + - [load][277] + - [Parameters][278] + - [reset][279] + - [playNext][280] + - [playPrev][281] + - [playItem][282] + - [Parameters][283] + - [items][284] + - [next][285] + - [prev][286] + - [id][287] + - [metadata][288] + - [poster][289] + - [countdown][290] + - [options][291] +- [BasePlugin][292] + - [Parameters][293] + - [config][294] + - [name][295] + - [player][296] + - [player][297] + - [eventManager][298] + - [getConfig][299] + - [Parameters][300] + - [ready][301] + - [updateConfig][302] + - [Parameters][303] + - [loadMedia][304] + - [destroy][305] + - [reset][306] + - [getName][307] + - [dispatchEvent][308] + - [Parameters][309] + - [defaultConfig][310] + - [createPlugin][311] + - [Parameters][312] + - [isValid][313] +- [PluginManager][314] + - [load][315] + - [Parameters][316] + - [loadMedia][317] + - [destroy][318] + - [reset][319] + - [get][320] + - [Parameters][321] + - [getAll][322] + - [register][323] + - [Parameters][324] + - [unRegister][325] + - [Parameters][326] +- [registerPlugin][327] +- [load][328] + - [Parameters][329] +- [play][330] + - [Parameters][331] +- [constructor][332] +- [get][333] +- [set][334] + - [Parameters][335] +- [reset][336] +- [constructor][337] +- [evaluatePluginsConfig][338] + - [Parameters][339] +- [evaluateUIConfig][340] + - [Parameters][341] +- [maybeSetStreamPriority][342] + - [Parameters][343] +- [hasYoutubeSource][344] + - [Parameters][345] +- [loadMedia][346] + - [Parameters][347] + - [Examples][348] +- [loadPlaylist][349] + - [Parameters][350] + - [Examples][351] +- [loadPlaylistByEntryList][352] + - [Parameters][353] + - [Examples][354] +- [configure][355] + - [Parameters][356] + - [Examples][357] +- [playlist][358] + - [Examples][359] +- [crossOrigin][360] + - [Parameters][361] +- [crossOrigin][362] +- [getDefaultRedirectOptions][363] +- [getDefaultRedirectOptions][364] + - [Parameters][365] +- [getPlayers][366] +- [getPlayer][367] + - [Parameters][368] ## KPAdObject -Type: [Object][351] +Type: [Object][369] ### Properties -- `url` **[Array][352]<[string][353]>** 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). -- `response` **[Array][352]<[string][353]>** 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). -- `bumper` **[boolean][354]** Specifies whether this is a bumper. +- `url` **[Array][370]<[string][371]>** 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). +- `response` **[Array][370]<[string][371]>** 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). +- `bumper` **[boolean][372]** Specifies whether this is a bumper. ## KPAdPod -Type: [Array][352]<[KPAdObject][355]> +Type: [Array][370]<[KPAdObject][373]> ## KPAdBreakObject -Type: [Object][351] +Type: [Object][369] ### Properties -- `position` **[number][356]** The position, in seconds, to show the ad break. -- `percentage` **[number][356]** Alternative parameter to `position`. The position, in percentage of the media length, to show the ad break (optional). -- `every` **[number][356]** Alternative parameter to `position`. Play ad break every X seconds (optional). -- `ads` **[KPAdPod][357]** An array of ads to play (Ad pod). +- `position` **[number][374]** The position, in seconds, to show the ad break. +- `percentage` **[number][374]** Alternative parameter to `position`. The position, in percentage of the media length, to show the ad break (optional). +- `every` **[number][374]** Alternative parameter to `position`. Play ad break every X seconds (optional). +- `ads` **[KPAdPod][375]** An array of ads to play (Ad pod). ## KPAdvertisingConfigObject -Type: [Object][351] +Type: [Object][369] ### Properties -- `adBreaks` **[Array][352]<[KPAdBreakObject][358]>** The ad breaks scheme. -- `playAdsAfterTime` **[number][356]** 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. +- `adBreaks` **[Array][370]<[KPAdBreakObject][376]>** The ad breaks scheme. +- `playAdsAfterTime` **[number][374]?** 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. +- `showAdBreakCuePoint` **[boolean][372]?** Whether to show the ad breaks cue points. +- `adBreakCuePointStyle` **[Object][369]?** Style options for the ad breaks cue points - See the options in [https://github.com/kaltura/playkit-js-timeline/blob/main/docs/types.md#cuepointoptionsobject][377]. ## KalturaPlayers a map of player instances by player ids -Type: [Object][351]<[string][353], KalturaPlayer> +Type: [Object][369]<[string][371], KalturaPlayer> ## KPPlaylistOptions -Type: [Object][351] +Type: [Object][369] ### Properties -- `autoContinue` **[boolean][354]?** Determines whether to continue to the next item automatically. -- `loop` **[boolean][354]?** Determines whether to play the playlist in a loop. When selected, the playlist will play automatically even if autoContinue is set to false. +- `autoContinue` **[boolean][372]?** Determines whether to continue to the next item automatically. +- `loop` **[boolean][372]?** Determines whether to play the playlist in a loop. When selected, the playlist will play automatically even if autoContinue is set to false. ## KPPlaylistCountdownOptions -Type: [Object][351] +Type: [Object][369] ### Properties -- `timeToShow` **[number][356]?** Shows when the countdown is scheduled to appear (by default, this is towards the end). -- `duration` **[number][356]?** Shows for how long the countdown will appear. -- `showing` **[boolean][354]?** Determines whether to show the countdown. +- `timeToShow` **[number][374]?** Shows when the countdown is scheduled to appear (by default, this is towards the end). +- `duration` **[number][374]?** Shows for how long the countdown will appear. +- `showing` **[boolean][372]?** Determines whether to show the countdown. ## KPPlaylistConfigObject -Type: [Object][351] +Type: [Object][369] ### Properties -- `options` **[KPPlaylistOptions][359]** Sets the playlist options. -- `countdown` **[KPPlaylistCountdownOptions][360]** Configures the playlist countdown. -- `items` **[Array][352]<[PlaylistItem][361]>** Lists the available playlist items. +- `options` **[KPPlaylistOptions][378]** Sets the playlist options. +- `countdown` **[KPPlaylistCountdownOptions][379]** Configures the playlist countdown. +- `items` **[Array][370]<[PlaylistItem][380]>** Lists the available playlist items. ## KPPlaylistObject -Type: [Object][351] +Type: [Object][369] ### Properties -- `id` **[string][353]** This is playlist's ID. -- `metadata` **ProviderPlaylistMetadataObject** This is the playlist metadata. -- `options` **[KPPlaylistOptions][359]** These are the playlist options. -- `countdown` **[KPPlaylistCountdownOptions][360]** This is the playlist countdown configuration. -- `items` **[Array][352]<[PlaylistItem][361]>** These are the playlist items. +- `id` **[string][371]** This is playlist's ID. +- `metadata` **ProviderPlaylistMetadataObject** This is the playlist metadata. +- `options` **[KPPlaylistOptions][378]** These are the playlist options. +- `countdown` **[KPPlaylistCountdownOptions][379]** This is the playlist countdown configuration. +- `items` **[Array][370]<[PlaylistItem][380]>** These are the playlist items. ## KPPlaylistItemConfigObject -Type: [Object][351] +Type: [Object][369] ### Properties -- `countdown` **[KPPlaylistCountdownOptions][360]?** Countdown options +- `countdown` **[KPPlaylistCountdownOptions][379]?** Countdown options ## KPPluginsConfigObject -Type: [Object][351] +Type: [Object][369] ## AdBreak ### Parameters -- `options` **PKAdBreakOptions** Ad break data options. +- `options` **PKAdBreakOptions** Ad break data options. ### type -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]** Ad break type - pre/mid/post. +Returns **[string][371]** Ad break type - pre/mid/post. ### position -Type: [number][356]? +Type: [number][374]? -Returns **[string][353]** Ad break position on the playback timeline. +Returns **[string][371]** Ad break position on the playback timeline. ### numAds -Type: [number][356]? +Type: [number][374]? -Returns **[string][353]** The number of ads inside the ad break. +Returns **[string][371]** The number of ads inside the ad break. ## Ad ### Parameters -- `id` **[string][353]** Ad ID. -- `options` **PKAdOptions** Ad data options. +- `id` **[string][371]** Ad ID. +- `options` **PKAdOptions** Ad data options. ### id -Type: [string][353] +Type: [string][371] -Returns **[string][353]** Ad ID. +Returns **[string][371]** Ad ID. ### system -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]?** Ad system. +Returns **[string][371]?** Ad system. ### contentType -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]** Ad content type. +Returns **[string][371]** Ad content type. ### url -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]** Ad URL. +Returns **[string][371]** Ad URL. ### title -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]** Ad title. +Returns **[string][371]** Ad title. ### position -Type: [number][356]? +Type: [number][374]? -Returns **[string][353]** Ad position inside the ad break. +Returns **[string][371]** Ad position inside the ad break. ### duration -Type: [number][356]? +Type: [number][374]? -Returns **[string][353]** Ad duration. +Returns **[string][371]** Ad duration. ### clickThroughUrl -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]** Ad click through URL. +Returns **[string][371]** Ad click through URL. ### posterUrl -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]** Ad poster URL. +Returns **[string][371]** Ad poster URL. ### skipOffset -Type: [number][356]? +Type: [number][374]? -Returns **[string][353]** Ad skip offset. +Returns **[string][371]** Ad skip offset. ### linear -Type: [boolean][354] +Type: [boolean][372] -Returns **[boolean][354]** Whether the ad is linear. +Returns **[boolean][372]** Whether the ad is linear. ### width -Type: [number][356] +Type: [number][374] -Returns **[string][353]** Ad width. +Returns **[string][371]** Ad width. ### height -Type: [number][356] +Type: [number][374] -Returns **[string][353]** Ad height. +Returns **[string][371]** Ad height. ### bitrate -Type: [number][356] +Type: [number][374] -Returns **[string][353]** Ad bitrate. +Returns **[string][371]** Ad bitrate. ### bumper -Type: [boolean][354] +Type: [boolean][372] -Returns **[boolean][354]** Whether the ad is bumper. +Returns **[boolean][372]** Whether the ad is bumper. ### skippable -Type: [boolean][354] +Type: [boolean][372] -Returns **[string][353]** Whether the ad is skippable or not. +Returns **[string][371]** Whether the ad is skippable or not. ## BaseRemotePlayer @@ -583,9 +603,9 @@ Remote players should extend this class and implement the needed API. ### Parameters -- `name` **[string][353]** Remote player name. -- `config` **[Object][351]** Cast configuration. -- `remoteControl` **[RemoteControl][362]** Remote control. +- `name` **[string][371]** Remote player name. +- `config` **[Object][369]** Cast configuration. +- `remoteControl` **[RemoteControl][381]** Remote control. ### loadMedia @@ -593,9 +613,9 @@ Loads a media to the receiver application. #### Parameters -- `mediaInfo` **[Object][351]** The entry media info. +- `mediaInfo` **[Object][369]** The entry media info. -Returns **[Promise][363]<void>** Promise to indicate load succeed or failed. +Returns **[Promise][382]<void>** Promise to indicate load succeed or failed. ### setMedia @@ -603,21 +623,21 @@ Sets a media to the remote player.. #### Parameters -- `mediaConfig` **[Object][351]** Media configuration to set. +- `mediaConfig` **[Object][369]** Media configuration to set. -Returns **void** +Returns **void** ### getMediaInfo Gets the media Info. -Returns **[Object][351]?** The media info. +Returns **[Object][369]?** The media info. ### getMediaConfig Gets the media config. -Returns **[Object][351]?** The media config. +Returns **[Object][369]?** The media config. ### configure @@ -625,105 +645,105 @@ Configure the remote player #### Parameters -- `config` **[Object][351]** Configuration to set. (optional, default `{}`) +- `config` **[Object][369]** Configuration to set. (optional, default `{}`) -Returns **void** +Returns **void** ### ready The remote player readiness. -Returns **[Promise][363]<any>** Promise which resolved when the remote player is ready. +Returns **[Promise][382]<any>** Promise which resolved when the remote player is ready. ### load Load the remote player. -Returns **void** +Returns **void** ### play Play/resume the remote player. -Returns **void** +Returns **void** ### pause Pause the remote player. -Returns **void** +Returns **void** ### reset Reset the remote player. -Returns **void** +Returns **void** ### destroy Destroy the remote player. -Returns **void** +Returns **void** ### isLive #### Examples ```javascript -BaseRemotePlayer.prototype.isLive(); // false +BaseRemotePlayer.prototype.isLive() // false ``` -Returns **[boolean][354]** Whether the current playback is a live playback. +Returns **[boolean][372]** Whether the current playback is a live playback. ### isDvr #### Examples ```javascript -BaseRemotePlayer.prototype.isDvr(); // false +BaseRemotePlayer.prototype.isDvr() // false ``` -Returns **[boolean][354]** Whether the current live playback has DVR window. In case of non-live playback will return false. +Returns **[boolean][372]** Whether the current live playback has DVR window. In case of non-live playback will return false. ### seekToLiveEdge Seeks to the live edge. -Returns **void** +Returns **void** ### getStartTimeOfDvrWindow #### Examples ```javascript -BaseRemotePlayer.prototype.getStartTimeOfDvrWindow(); // 0 +BaseRemotePlayer.prototype.getStartTimeOfDvrWindow() // 0 ``` -Returns **[number][356]** The start time of the DVR window. +Returns **[number][374]** The start time of the DVR window. ### getTracks #### Parameters -- `type` **[string][353]?** Track type. +- `type` **[string][371]?** Track type. #### Examples ```javascript -BaseRemotePlayer.prototype.getTracks(); // [] +BaseRemotePlayer.prototype.getTracks() // [] ``` -Returns **[Array][352]<Track>** The remote player tracks. +Returns **[Array][370]<Track>** The remote player tracks. ### getActiveTracks #### Examples ```javascript -BaseRemotePlayer.prototype.getTracks(); // {audio: undefined, video: undefined, text: undefined} +BaseRemotePlayer.prototype.getTracks() // {audio: undefined, video: undefined, text: undefined} ``` -Returns **[Object][351]** The remote player active tracks. +Returns **[Object][369]** The remote player active tracks. ### selectTrack @@ -731,31 +751,31 @@ Select a certain track to be active. #### Parameters -- `track` **Track** The track to activate. +- `track` **Track** The track to activate. -Returns **void** +Returns **void** ### hideTextTrack Hides the active text track. -Returns **void** +Returns **void** ### enableAdaptiveBitrate Enables automatic adaptive bitrate switching. -Returns **void** +Returns **void** ### isAdaptiveBitrateEnabled #### Examples ```javascript -BaseRemotePlayer.prototype.isAdaptiveBitrateEnabled(); // true +BaseRemotePlayer.prototype.isAdaptiveBitrateEnabled() // true ``` -Returns **[boolean][354]** Whether adaptive bitrate is enabled. +Returns **[boolean][372]** Whether adaptive bitrate is enabled. ### setTextDisplaySettings @@ -763,41 +783,41 @@ Sets the text display settings. #### Parameters -- `settings` **[Object][351]** Text settings. +- `settings` **[Object][369]** Text settings. -Returns **void** +Returns **void** ### startCasting Start casting. -Returns **[Promise][363]<any>** A promise to indicate session is starting, or failed +Returns **[Promise][382]<any>** A promise to indicate session is starting, or failed ### stopCasting Stops the current cast session. -Returns **void** +Returns **void** ### isCasting #### Examples ```javascript -BaseRemotePlayer.prototype.isCasting(); // true +BaseRemotePlayer.prototype.isCasting() // true ``` -Returns **[boolean][354]** Whether casting is currently active. +Returns **[boolean][372]** Whether casting is currently active. ### isCastAvailable #### Examples ```javascript -BaseRemotePlayer.prototype.isCastAvailable(); // true +BaseRemotePlayer.prototype.isCastAvailable() // true ``` -Returns **[boolean][354]** Whether casting is available. +Returns **[boolean][372]** Whether casting is available. ### getCastSession @@ -806,50 +826,50 @@ Gets the current remote session. #### Examples ```javascript -BaseRemotePlayer.prototype.getCastSession(); // new RemoteSession('', '') +BaseRemotePlayer.prototype.getCastSession() // new RemoteSession('', '') ``` -Returns **[RemoteSession][364]** The remote session. +Returns **[RemoteSession][383]** The remote session. ### isVr #### Examples ```javascript -BaseRemotePlayer.prototype.isVr(); // false +BaseRemotePlayer.prototype.isVr() // false ``` -Returns **[boolean][354]** Whether the current media is of VR type (360 content). +Returns **[boolean][372]** Whether the current media is of VR type (360 content). ### toggleVrStereoMode Toggles VR mode on the current content. -Returns **void** +Returns **void** ### isInVrStereoMode #### Examples ```javascript -BaseRemotePlayer.prototype.isInVrStereoMode(); // false +BaseRemotePlayer.prototype.isInVrStereoMode() // false ``` -Returns **[boolean][354]** Whether the current content displayed in VR mode. +Returns **[boolean][372]** Whether the current content displayed in VR mode. ### ads The remote player ads controller. -Type: [Object][351]? +Type: [Object][369]? #### Examples ```javascript -BaseRemotePlayer.prototype.ads; // null +BaseRemotePlayer.prototype.ads // null ``` -Returns **[Object][351]?** +Returns **[Object][369]?** ### textStyle @@ -859,9 +879,9 @@ Type: TextStyle #### Parameters -- `style` **TextStyle** The text style to set. +- `style` **TextStyle** The text style to set. -Returns **void** +Returns **void** ### textStyle @@ -872,7 +892,7 @@ Type: TextStyle #### Examples ```javascript -BaseRemotePlayer.prototype.textStyle; // new TextStyle() +BaseRemotePlayer.prototype.textStyle // new TextStyle() ``` Returns **TextStyle** The current text style. @@ -881,229 +901,229 @@ Returns **TextStyle** The current text style. Gets the first buffered range of the remote player. -Type: [Array][352]<any> +Type: [Array][370]<any> #### Examples ```javascript -BaseRemotePlayer.prototype.buffered; // [] +BaseRemotePlayer.prototype.buffered // [] ``` -Returns **[Array][352]<any>** First buffered range in seconds. +Returns **[Array][370]<any>** First buffered range in seconds. ### currentTime Setter. -Type: [number][356] +Type: [number][374] #### Parameters -- `to` **[number][356]** The number to set in seconds. +- `to` **[number][374]** The number to set in seconds. -Returns **void** +Returns **void** ### currentTime Getter. -Type: [number][356] +Type: [number][374] #### Examples ```javascript -BaseRemotePlayer.prototype.currentTime; // 0 +BaseRemotePlayer.prototype.currentTime // 0 ``` -Returns **[number][356]** The current time in seconds. +Returns **[number][374]** The current time in seconds. ### duration -Type: [number][356] +Type: [number][374] #### Examples ```javascript -BaseRemotePlayer.prototype.duration; // 0 +BaseRemotePlayer.prototype.duration // 0 ``` -Returns **[number][356]** The duration in seconds. +Returns **[number][374]** The duration in seconds. ### volume Setter. -Type: [number][356] +Type: [number][374] #### Parameters -- `vol` **[number][356]** The volume to set in the range of 0-1. +- `vol` **[number][374]** The volume to set in the range of 0-1. -Returns **void** +Returns **void** ### volume Getter. -Type: [number][356] +Type: [number][374] #### Examples ```javascript -BaseRemotePlayer.prototype.volume; // 1 +BaseRemotePlayer.prototype.volume // 1 ``` -Returns **[number][356]** The current volume in the range of 0-1. +Returns **[number][374]** The current volume in the range of 0-1. ### paused -Type: [boolean][354] +Type: [boolean][372] #### Examples ```javascript -BaseRemotePlayer.prototype.paused; // false +BaseRemotePlayer.prototype.paused // false ``` -Returns **[boolean][354]** Whether the cast player is in paused state. +Returns **[boolean][372]** Whether the cast player is in paused state. ### ended -Type: [boolean][354] +Type: [boolean][372] #### Examples ```javascript -BaseRemotePlayer.prototype.ended; // false +BaseRemotePlayer.prototype.ended // false ``` -Returns **[boolean][354]** Whether the cast player is in ended state. +Returns **[boolean][372]** Whether the cast player is in ended state. ### seeking -Type: [boolean][354] +Type: [boolean][372] #### Examples ```javascript -BaseRemotePlayer.prototype.seeking; // false +BaseRemotePlayer.prototype.seeking // false ``` -Returns **[boolean][354]** Whether the cast player is in seeking state. +Returns **[boolean][372]** Whether the cast player is in seeking state. ### muted Setter. -Type: [boolean][354] +Type: [boolean][372] #### Parameters -- `mute` **[boolean][354]** The mute value to set. +- `mute` **[boolean][372]** The mute value to set. -Returns **void** +Returns **void** ### muted Getter. -Type: [boolean][354] +Type: [boolean][372] #### Examples ```javascript -BaseRemotePlayer.prototype.muted; // false +BaseRemotePlayer.prototype.muted // false ``` -Returns **[boolean][354]** The muted state. +Returns **[boolean][372]** The muted state. ### src -Type: [string][353] +Type: [string][371] #### Examples ```javascript -BaseRemotePlayer.prototype.src; // '' +BaseRemotePlayer.prototype.src // '' ``` -Returns **[string][353]** The current playing source url. +Returns **[string][371]** The current playing source url. ### poster -Type: [string][353] +Type: [string][371] #### Examples ```javascript -BaseRemotePlayer.prototype.poster; // '' +BaseRemotePlayer.prototype.poster // '' ``` -Returns **[string][353]** The current poster url. +Returns **[string][371]** The current poster url. ### playbackRate Setter. -Type: [number][356] +Type: [number][374] #### Parameters -- `rate` **[number][356]** The playback rate to set. +- `rate` **[number][374]** The playback rate to set. -Returns **void** +Returns **void** ### playbackRate -Type: [number][356] +Type: [number][374] #### Examples ```javascript -BaseRemotePlayer.prototype.playbackRate; // 1 +BaseRemotePlayer.prototype.playbackRate // 1 ``` -Returns **[string][353]** The current playback rate. +Returns **[string][371]** The current playback rate. ### engineType -Type: [string][353] +Type: [string][371] #### Examples ```javascript -BaseRemotePlayer.prototype.engineType; // '' +BaseRemotePlayer.prototype.engineType // '' ``` -Returns **[string][353]** The active engine type. +Returns **[string][371]** The active engine type. ### streamType -Type: [string][353] +Type: [string][371] #### Examples ```javascript -BaseRemotePlayer.prototype.streamType; // '' +BaseRemotePlayer.prototype.streamType // '' ``` -Returns **[string][353]** The active stream type. +Returns **[string][371]** The active stream type. ### type -Type: [string][353] +Type: [string][371] #### Examples ```javascript -BaseRemotePlayer.prototype.type; // BaseRemotePlayer.Type +BaseRemotePlayer.prototype.type // BaseRemotePlayer.Type ``` -Returns **[string][353]** The remote player type. +Returns **[string][371]** The remote player type. ### config -Type: [Object][351] +Type: [Object][369] Returns **KPOptionsObject** The runtime remote player config. @@ -1111,24 +1131,24 @@ Returns **KPOptionsObject** The runtime remote player config. Default configuration of the remote player. -Type: [Object][351] +Type: [Object][369] #### Examples ```javascript -BaseRemotePlayer.defaultConfig; // {} +BaseRemotePlayer.defaultConfig // {} ``` ### Type Remote player type. -Type: [string][353] +Type: [string][371] #### Examples ```javascript -BaseRemotePlayer.Type; // 'BaseRemotePlayer' +BaseRemotePlayer.Type // 'BaseRemotePlayer' ``` ### isSupported @@ -1136,14 +1156,14 @@ BaseRemotePlayer.Type; // 'BaseRemotePlayer' #### Examples ```javascript -BaseRemotePlayer.isSupported(); // true +BaseRemotePlayer.isSupported() // true ``` -Returns **[boolean][354]** Whether the remote player is supported in the current environment. +Returns **[boolean][372]** Whether the remote player is supported in the current environment. ## CastEventType -Type: [Object][351] +Type: [Object][369] ### Examples @@ -1167,7 +1187,7 @@ player.addEventListener(KalturaPlayer.cast.CastEventType.CAST_SESSION_STARTED, e ### Parameters -- `player` **KalturaPlayer** The Kaltura player. +- `player` **KalturaPlayer** The Kaltura player. ### textStyle @@ -1175,31 +1195,31 @@ Type: TextStyle ### advertising -Type: [Object][351] +Type: [Object][369] ### config -Type: [Object][351] +Type: [Object][369] ## RemoteControl ### Parameters -- `player` **KalturaPlayer** The Kaltura player. +- `player` **KalturaPlayer** The Kaltura player. ### getPlayerSnapshot Gets the player snapshot. -Type: [Function][365] +Type: [Function][384] -Returns **[PlayerSnapshot][366]** player snapshot. +Returns **[PlayerSnapshot][385]** player snapshot. ### getUIWrapper Gets the UI wrapper. -Type: [Function][365] +Type: [Function][384] Returns **UIWrapper** The UI wrapper. @@ -1207,75 +1227,75 @@ Returns **UIWrapper** The UI wrapper. On remote device disconnected handler. -Type: [Function][365] +Type: [Function][384] #### Parameters -- `payload` **[RemoteDisconnectedPayload][367]** disconnected payload. +- `payload` **[RemoteDisconnectedPayload][386]** disconnected payload. -Returns **void** +Returns **void** ### onRemoteDeviceConnected On remote device connected handler. -Type: [Function][365] +Type: [Function][384] #### Parameters -- `payload` **[RemoteConnectedPayload][368]** connected payload. +- `payload` **[RemoteConnectedPayload][387]** connected payload. -Returns **void** +Returns **void** ### onRemoteDeviceAvailable On remote device available handler. -Type: [Function][365] +Type: [Function][384] #### Parameters -- `payload` **[RemoteAvailablePayload][369]** available payload. +- `payload` **[RemoteAvailablePayload][388]** available payload. -Returns **void** +Returns **void** ### onRemoteDeviceConnecting On remote device connecting handler. -Type: [Function][365] +Type: [Function][384] -Returns **void** +Returns **void** ### onRemoteDeviceDisconnecting On remote device disconnecting handler. -Type: [Function][365] +Type: [Function][384] -Returns **void** +Returns **void** ### onRemoteDeviceConnectFailed On remote device connect failed handler. -Type: [Function][365] +Type: [Function][384] -Returns **void** +Returns **void** ## RemotePayload ### Parameters -- `player` **[BaseRemotePlayer][370]** The active remote player. +- `player` **[BaseRemotePlayer][389]** The active remote player. ### player The active remote player. -Type: [BaseRemotePlayer][370] +Type: [BaseRemotePlayer][389] -Returns **[BaseRemotePlayer][370]** +Returns **[BaseRemotePlayer][389]** ## RemoteConnectedPayload @@ -1283,25 +1303,25 @@ Returns **[BaseRemotePlayer][370]** ### Parameters -- `player` **[BaseRemotePlayer][370]** The active remote player. -- `session` **[RemoteSession][364]** The remote session. -- `ui` **[RemotePlayerUI][371]?** Optional remote player UI preset. +- `player` **[BaseRemotePlayer][389]** The active remote player. +- `session` **[RemoteSession][383]** The remote session. +- `ui` **[RemotePlayerUI][390]?** Optional remote player UI preset. ### ui Remote player UI preset. -Type: [RemotePlayerUI][371]? +Type: [RemotePlayerUI][390]? -Returns **[RemotePlayerUI][371]?** +Returns **[RemotePlayerUI][390]?** ### session Remote session. -Type: [RemoteSession][364] +Type: [RemoteSession][383] -Returns **[RemoteSession][364]?** +Returns **[RemoteSession][383]?** ## RemoteDisconnectedPayload @@ -1309,16 +1329,16 @@ Returns **[RemoteSession][364]?** ### Parameters -- `player` **[BaseRemotePlayer][370]** The active remote player. -- `snapshot` **[PlayerSnapshot][366]** The remote player snapshot. +- `player` **[BaseRemotePlayer][389]** The active remote player. +- `snapshot` **[PlayerSnapshot][385]** The remote player snapshot. ### snapshot Remote player snapshot. -Type: [PlayerSnapshot][366] +Type: [PlayerSnapshot][385] -Returns **[PlayerSnapshot][366]** +Returns **[PlayerSnapshot][385]** ## RemoteAvailablePayload @@ -1326,16 +1346,16 @@ Returns **[PlayerSnapshot][366]** ### Parameters -- `player` **[BaseRemotePlayer][370]** The active remote player. -- `available` **[boolean][354]** Remote player availability. +- `player` **[BaseRemotePlayer][389]** The active remote player. +- `available` **[boolean][372]** Remote player availability. ### available Remote player availability. -Type: [boolean][354] +Type: [boolean][372] -Returns **[boolean][354]** +Returns **[boolean][372]** ## RemotePlayerUI @@ -1345,9 +1365,9 @@ Playback UI of the remote player. #### Parameters -- `props` **[Object][351]** UI creation parameters. +- `props` **[Object][369]** UI creation parameters. -Returns **React\$Element<any>** Component. +Returns **React$Element<any>** Component. ### idleUI @@ -1355,9 +1375,9 @@ Idle UI of the remote player. #### Parameters -- `props` **[Object][351]** UI creation parameters. +- `props` **[Object][369]** UI creation parameters. -Returns **React\$Element<any>** Component. +Returns **React$Element<any>** Component. ### adsUI @@ -1365,9 +1385,9 @@ Idle UI of the remote player. #### Parameters -- `props` **[Object][351]** UI creation parameters. +- `props` **[Object][369]** UI creation parameters. -Returns **React\$Element<any>** Component. +Returns **React$Element<any>** Component. ### liveUI @@ -1375,9 +1395,9 @@ Live UI of the remote player. #### Parameters -- `props` **[Object][351]** UI creation parameters. +- `props` **[Object][369]** UI creation parameters. -Returns **React\$Element<any>** Component. +Returns **React$Element<any>** Component. ### errorUI @@ -1385,17 +1405,17 @@ Error UI of the remote player. #### Parameters -- `props` **[Object][351]** UI creation parameters. +- `props` **[Object][369]** UI creation parameters. -Returns **React\$Element<any>** Component. +Returns **React$Element<any>** Component. ### uis UI presets. -Type: [Array][352]<UIPreset> +Type: [Array][370]<UIPreset> -Returns **[Array][352]<UIPreset>** +Returns **[Array][370]<UIPreset>** ## IRemotePlayer @@ -1405,63 +1425,63 @@ Type: TextStyle ### muted -Type: [boolean][354] +Type: [boolean][372] ### playbackRate -Type: [number][356] +Type: [number][374] ### volume -Type: [number][356] +Type: [number][374] ### currentTime -Type: [number][356] +Type: [number][374] ### buffered -Type: [number][356] +Type: [number][374] ### duration -Type: [number][356] +Type: [number][374] ### paused -Type: [boolean][354] +Type: [boolean][372] ### ended -Type: [boolean][354] +Type: [boolean][372] ### seeking -Type: [boolean][354] +Type: [boolean][372] ### src -Type: [string][353] +Type: [string][371] ### poster -Type: [string][353] +Type: [string][371] ### engineType -Type: [string][353] +Type: [string][371] ### streamType -Type: [string][353] +Type: [string][371] ### type -Type: [string][353] +Type: [string][371] ### ads -Type: [Object][351] +Type: [Object][369] ### config @@ -1471,238 +1491,238 @@ Type: KPOptionsObject #### Parameters -- `type` **[string][353]** -- `listener` **[Function][365]** +- `type` **[string][371]** +- `listener` **[Function][384]** -Returns **void** +Returns **void** ### removeEventListener #### Parameters -- `type` **[string][353]** -- `listener` **[Function][365]** +- `type` **[string][371]** +- `listener` **[Function][384]** -Returns **void** +Returns **void** ### dispatchEvent #### Parameters -- `event` **FakeEvent** +- `event` **FakeEvent** -Returns **void** +Returns **void** ### loadMedia #### Parameters -- `mediaInfo` **[Object][351]** +- `mediaInfo` **[Object][369]** -Returns **[Promise][363]<any>** +Returns **[Promise][382]<any>** ### setMedia #### Parameters -- `mediaConfig` **[Object][351]** +- `mediaConfig` **[Object][369]** -Returns **void** +Returns **void** ### getMediaInfo -Returns **[Object][351]** +Returns **[Object][369]** ### getMediaConfig -Returns **[Object][351]** +Returns **[Object][369]** ### configure #### Parameters -- `config` **[Object][351]** +- `config` **[Object][369]** -Returns **void** +Returns **void** ### ready -Returns **[Promise][363]<any>** +Returns **[Promise][382]<any>** ### load -Returns **void** +Returns **void** ### play -Returns **void** +Returns **void** ### pause -Returns **void** +Returns **void** ### reset -Returns **void** +Returns **void** ### destroy -Returns **void** +Returns **void** ### isLive -Returns **[boolean][354]** +Returns **[boolean][372]** ### isDvr -Returns **[boolean][354]** +Returns **[boolean][372]** ### seekToLiveEdge -Returns **void** +Returns **void** ### getStartTimeOfDvrWindow -Returns **[number][356]** +Returns **[number][374]** ### getTracks #### Parameters -- `type` **[string][353]?** +- `type` **[string][371]?** -Returns **[Array][352]<Track>** +Returns **[Array][370]<Track>** ### getActiveTracks -Returns **[Object][351]** +Returns **[Object][369]** ### selectTrack #### Parameters -- `track` **Track** +- `track` **Track** -Returns **void** +Returns **void** ### hideTextTrack -Returns **void** +Returns **void** ### enableAdaptiveBitrate -Returns **void** +Returns **void** ### isAdaptiveBitrateEnabled -Returns **[boolean][354]** +Returns **[boolean][372]** ### setTextDisplaySettings #### Parameters -- `settings` **[Object][351]** +- `settings` **[Object][369]** -Returns **void** +Returns **void** ### startCasting -Returns **void** +Returns **void** ### stopCasting -Returns **void** +Returns **void** ### isCasting -Returns **[boolean][354]** +Returns **[boolean][372]** ### isCastAvailable -Returns **[boolean][354]** +Returns **[boolean][372]** ### getCastSession -Returns **[RemoteSession][364]** +Returns **[RemoteSession][383]** ### isVr -Returns **[boolean][354]** +Returns **[boolean][372]** ### toggleVrStereoMode -Returns **void** +Returns **void** ### isInVrStereoMode -Returns **[boolean][354]** +Returns **[boolean][372]** ## RemoteSession ### Parameters -- `id` **[string][353]** Session ID. -- `friendlyName` **[string][353]** Receiver friendly name. -- `resuming` **[boolean][354]?** Whether the session is resuming. +- `id` **[string][371]** Session ID. +- `friendlyName` **[string][371]** Receiver friendly name. +- `resuming` **[boolean][372]?** Whether the session is resuming. ### deviceFriendlyName Receiver friendly name. -Type: [string][353] +Type: [string][371] -Returns **[string][353]** +Returns **[string][371]** ### id Session ID. -Type: [string][353] +Type: [string][371] -Returns **[string][353]** +Returns **[string][371]** ### resuming Whether the session is resuming. -Type: [boolean][354]? +Type: [boolean][372]? -Returns **[boolean][354]?** +Returns **[boolean][372]?** ## AdsController ### Parameters -- `player` **Player** The player. -- `adsPluginController` **IAdsController** The controller of the current ads plugin instance. +- `player` **Player** The player. +- `adsPluginController` **IAdsController** The controller of the current ads plugin instance. ### allAdsCompleted -Type: [boolean][354] +Type: [boolean][372] -Returns **[boolean][354]** Whether all ads completed. +Returns **[boolean][372]** Whether all ads completed. ### isAdBreak -Returns **[boolean][354]** Whether we're in an ad break. +Returns **[boolean][372]** Whether we're in an ad break. ### getAdBreaksLayout -Returns **[Array][352]<([number][356] \| [string][353])>** The ad breaks layout (cue points). +Returns **[Array][370]<([number][374] \| [string][371])>** The ad breaks layout (cue points). ### getAdBreak -Returns **[AdBreak][372]?** Gets the current ad break data. +Returns **[AdBreak][391]?** Gets the current ad break data. ### getAd -Returns **[Ad][373]?** Gets the current ad data. +Returns **[Ad][392]?** Gets the current ad data. ### skipAd Skip on an ad. -Returns **void** +Returns **void** ### playAdNow @@ -1710,9 +1730,9 @@ Play an ad on demand. #### Parameters -- `adPod` **[KPAdPod][357]** The ad pod play. +- `adPod` **[KPAdPod][375]** The ad pod play. -Returns **void** +Returns **void** ## ControllerProvider @@ -1720,17 +1740,17 @@ Controller provider ### Parameters -- `pluginManager` **[PluginManager][374]** the plugin manager +- `pluginManager` **[PluginManager][393]** the plugin manager ### getAdsControllers Get the ads controller of the all ads plugins. -Returns **[Array][352]<IAdsPluginController>** the ads controllers. +Returns **[Array][370]<IAdsPluginController>** the ads controllers. ## PlaylistEventType -Type: [Object][351] +Type: [Object][369] ### Examples @@ -1752,8 +1772,8 @@ player.addEventListener(KalturaPlayer.playlist.PlaylistEventType.PLAYLIST_LOADED ### Parameters -- `sources` **ProviderMediaConfigSourcesObject?** The item sources -- `config` **[KPPlaylistItemConfigObject][375]?** The item config +- `sources` **ProviderMediaConfigSourcesObject?** The item sources +- `config` **[KPPlaylistItemConfigObject][394]?** The item config ### updateSources @@ -1761,9 +1781,9 @@ Update the playlist item sources #### Parameters -- `sourcesObject` **ProviderMediaConfigSourcesObject** The sources +- `sourcesObject` **ProviderMediaConfigSourcesObject** The sources -Returns **void** +Returns **void** ### sources @@ -1771,26 +1791,26 @@ Playlist item sources Type: ProviderMediaConfigSourcesObject? -Returns **ProviderMediaConfigSourcesObject?** +Returns **ProviderMediaConfigSourcesObject?** ### config Playlist item config -Type: [KPPlaylistItemConfigObject][375]? +Type: [KPPlaylistItemConfigObject][394]? -Returns **[KPPlaylistItemConfigObject][375]?** +Returns **[KPPlaylistItemConfigObject][394]?** ### isPlayable -Returns **[boolean][354]** = Whether the playlist item has sources to play +Returns **[boolean][372]** = Whether the playlist item has sources to play ## PlaylistManager ### Parameters -- `player` **KalturaPlayer** The player instance -- `options` **KPOptionsObject** The player config object +- `player` **KalturaPlayer** The player instance +- `options` **KPOptionsObject** The player config object ### configure @@ -1798,10 +1818,10 @@ Config the playlist #### Parameters -- `config` **[KPPlaylistObject][376]?** The playlist config -- `entryList` **ProviderEntryListObject?** Entry list +- `config` **[KPPlaylistObject][395]?** The playlist config +- `entryList` **ProviderEntryListObject?** Entry list -Returns **void** +Returns **void** ### load @@ -1809,29 +1829,29 @@ Load a playlist #### Parameters -- `playlistData` **[KPPlaylistObject][376]** The playlist data -- `playlistConfig` **[KPPlaylistConfigObject][377]?** The playlist config -- `entryList` **ProviderEntryListObject?** Entry list +- `playlistData` **[KPPlaylistObject][395]** The playlist data +- `playlistConfig` **[KPPlaylistConfigObject][396]?** The playlist config +- `entryList` **ProviderEntryListObject?** Entry list -Returns **void** +Returns **void** ### reset Reset the playlist -Returns **void** +Returns **void** ### playNext Play the next item -Returns **void** +Returns **void** ### playPrev Play the previous item -Returns **void** +Returns **void** ### playItem @@ -1839,41 +1859,41 @@ Play a specific item #### Parameters -- `index` **[number][356]** The index of the item to play +- `index` **[number][374]** The index of the item to play -Returns **void** +Returns **void** ### items Playlist items -Type: [Array][352]<[PlaylistItem][361]> +Type: [Array][370]<[PlaylistItem][380]> -Returns **[Array][352]<[PlaylistItem][361]>** +Returns **[Array][370]<[PlaylistItem][380]>** ### next Next item -Type: [PlaylistItem][361]? +Type: [PlaylistItem][380]? -Returns **[PlaylistItem][361]?** +Returns **[PlaylistItem][380]?** ### prev Previous item -Type: [PlaylistItem][361]? +Type: [PlaylistItem][380]? -Returns **[PlaylistItem][361]?** +Returns **[PlaylistItem][380]?** ### id Playlist id -Type: [string][353] +Type: [string][371] -Returns **[string][353]** +Returns **[string][371]** ### metadata @@ -1881,31 +1901,31 @@ Playlist metadata Type: ProviderPlaylistMetadataObject -Returns **ProviderPlaylistMetadataObject** +Returns **ProviderPlaylistMetadataObject** ### poster Playlist poster -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]?** +Returns **[string][371]?** ### countdown Playlist countdown -Type: [KPPlaylistCountdownOptions][360] +Type: [KPPlaylistCountdownOptions][379] -Returns **[KPPlaylistCountdownOptions][360]** +Returns **[KPPlaylistCountdownOptions][379]** ### options Playlist options -Type: [KPPlaylistOptions][359] +Type: [KPPlaylistOptions][378] -Returns **[KPPlaylistOptions][359]** +Returns **[KPPlaylistOptions][378]** ## BasePlugin @@ -1915,33 +1935,33 @@ Other plugins should extend this class. ### Parameters -- `name` **[string][353]** The plugin name -- `player` **[Object][351]** The player reference -- `config` **[Object][351]** The plugin configuration +- `name` **[string][371]** The plugin name +- `player` **[Object][369]** The player reference +- `config` **[Object][369]** The plugin configuration ### config The runtime configuration of the plugin. -Type: [Object][351] +Type: [Object][369] ### name The name of the plugin. -Type: [string][353] +Type: [string][371] ### player The logger of the plugin. -Type: [Object][351] +Type: [Object][369] ### player Reference to the actual player. -Type: [Object][351] +Type: [Object][369] ### eventManager @@ -1955,46 +1975,54 @@ Getter for the configuration of the plugin. #### Parameters -- `attr` **[string][353]** The key in the plugin configuration (optional). +- `attr` **[string][371]** The key in the plugin configuration (optional). Returns **any** If attribute is provided, returns its value. Else, Returns the config of the plugin. +### ready + +Getter for the ready promise of the plugin. + +Type: [Promise][382]<any> + +Returns **[Promise][382]<any>** returns a resolved promise unless the plugin overrides this ready getter. + ### updateConfig Updates the config of the plugin. #### Parameters -- `update` **[Object][351]** The updated configuration. +- `update` **[Object][369]** The updated configuration. -Returns **void** +Returns **void** ### loadMedia Runs the loadMedia logic of the plugin. plugin must implement this method. -Returns **void** +Returns **void** ### destroy Runs the destroy logic of the plugin. plugin must implement this method. -Returns **void** +Returns **void** ### reset Runs the reset logic of the plugin. plugin must implement this method. -Returns **void** +Returns **void** ### getName Getter for the plugin's name. -Returns **[string][353]** The name of the plugin. +Returns **[string][371]** The name of the plugin. ### dispatchEvent @@ -2002,17 +2030,17 @@ Dispatch an event via the plugin. #### Parameters -- `name` **[string][353]** The event name. -- `payload` **any** The event payload. +- `name` **[string][371]** The event name. +- `payload` **any** The event payload. -Returns **void** +Returns **void** ### defaultConfig The default configuration of the plugin. Inherited plugins should override this property. -Type: [Object][351] +Type: [Object][369] ### createPlugin @@ -2020,18 +2048,18 @@ Factory method to create the actual plugin. #### Parameters -- `name` **[string][353]** The plugin name -- `player` **[Object][351]** The player reference -- `config` **[Object][351]** The plugin configuration (optional, default `{}`) +- `name` **[string][371]** The plugin name +- `player` **[Object][369]** The player reference +- `config` **[Object][369]** The plugin configuration (optional, default `{}`) -Returns **[BasePlugin][378]** New runtime plugin instance +Returns **[BasePlugin][397]** New runtime plugin instance ### isValid Returns under what conditions the plugin is valid. Plugin must implement this method. -Returns **[boolean][354]** Whether the plugin is valid and can be initiated. Default implementation is true +Returns **[boolean][372]** Whether the plugin is valid and can be initiated. Default implementation is true ## PluginManager @@ -2043,29 +2071,29 @@ Creates and store new instance of the plugin in case isValid() of the plugin ret #### Parameters -- `name` **[string][353]** The plugin name -- `player` **[Object][351]** The player reference -- `config` **[Object][351]** The plugin configuration (optional, default `{}`) +- `name` **[string][371]** The plugin name +- `player` **[Object][369]** The player reference +- `config` **[Object][369]** The plugin configuration (optional, default `{}`) -Returns **[boolean][354]** Whether the plugin load was successful +Returns **[boolean][372]** Whether the plugin load was successful ### loadMedia Iterates over all the plugins and calls loadMedia(). -Returns **void** +Returns **void** ### destroy Iterates over all the plugins and calls destroy(). -Returns **void** +Returns **void** ### reset Iterates over all the plugins and calls reset() method of the plugin's impl. -Returns **void** +Returns **void** ### get @@ -2073,15 +2101,15 @@ Returns the plugin's instance. #### Parameters -- `name` **[string][353]** The plugin name. +- `name` **[string][371]** The plugin name. -Returns **[BasePlugin][378]** The plugin instance. +Returns **[BasePlugin][397]** The plugin instance. ### getAll Returns all plugins. -Returns **[Object][351]** All plugins. +Returns **[Object][369]** All plugins. ### register @@ -2090,10 +2118,10 @@ Maps: plugin name -> plugin class. #### Parameters -- `name` **[string][353]** The plugin name -- `handler` **[Function][365]** The plugin class +- `name` **[string][371]** The plugin name +- `handler` **[Function][384]** The plugin class -Returns **[boolean][354]** If the registration request succeeded +Returns **[boolean][372]** If the registration request succeeded ### unRegister @@ -2101,15 +2129,84 @@ Removes the plugin from the registry. #### Parameters -- `name` **[string][353]** The plugin name +- `name` **[string][371]** The plugin name -Returns **void** +Returns **void** ## registerPlugin Export the register method. -Type: [function][365] +Type: [function][384] + +## load + +Load middleware handler. + +### Parameters + +- `next` **[Function][384]** The load handler in the middleware chain. + +Returns **void** + +## play + +Play middleware handler. + +### Parameters + +- `next` **[Function][384]** The play handler in the middleware chain. + +Returns **void** + +## constructor + +constructor + +## get + +return the token store object + +Returns **(any | any)** token store object + +## set + +recalculate the token store data, if new config with token is passed then add it to the data store, and if +an existing token needs to be removed then remove it + +### Parameters + +- `pluginsConfig` **dataStoreType?** the new config object + +Returns **void** + +## reset + +reset the config store to its initial state + +Returns **void** + +## constructor + +constructor + +## evaluatePluginsConfig + +### Parameters + +- `options` **[KPPluginsConfigObject][398]** plugins options +- `config` **KPOptionsObject** player config + +Returns **void** + +## evaluateUIConfig + +### Parameters + +- `options` **KPUIOptionsObject** UI options +- `config` **KPOptionsObject** player config + +Returns **void** ## maybeSetStreamPriority @@ -2117,10 +2214,10 @@ set stream priority according to playerConfig ### Parameters -- `player` **Player** player -- `playerConfig` **PartialKPOptionsObject** player config +- `player` **Player** player +- `playerConfig` **PartialKPOptionsObject** player config -Returns **void** +Returns **void** ## hasYoutubeSource @@ -2128,9 +2225,9 @@ returns true if sources contain youtube video source ### Parameters -- `sources` **PKSourcesConfigObject** thr sources object +- `sources` **PKSourcesConfigObject** thr sources object -Returns **[boolean][354]** true if sources contain youtube source +Returns **[boolean][372]** true if sources contain youtube source ## loadMedia @@ -2138,8 +2235,8 @@ Loads a media. ### Parameters -- `mediaInfo` **ProviderMediaInfoObject** The media info. -- `mediaOptions` **KPLoadMediaOptions?** The media options. +- `mediaInfo` **ProviderMediaInfoObject** The media info. +- `mediaOptions` **KPLoadMediaOptions?** The media options. ### Examples @@ -2147,7 +2244,7 @@ Loads a media. kalturaPlayer.loadMedia({entryId: 'entry123'}, {startTime: 5, poster: 'my/poster/url'}); ``` -Returns **[Promise][363]<any>** Promise which resolves when the media is loaded, or rejected if error occurs. +Returns **[Promise][382]<any>** Promise which resolves when the media is loaded, or rejected if error occurs. ## loadPlaylist @@ -2155,8 +2252,8 @@ Loads a playlist by id. ### Parameters -- `playlistInfo` **ProviderPlaylistInfoObject** The playlist info. -- `playlistConfig` **[KPPlaylistConfigObject][377]?** The playlist config. +- `playlistInfo` **ProviderPlaylistInfoObject** The playlist info. +- `playlistConfig` **[KPPlaylistConfigObject][396]?** The playlist config. ### Examples @@ -2164,7 +2261,7 @@ Loads a playlist by id. kalturaPlayer.loadPlaylist({playlistId: '123456'}, {options: {autoContinue: false}}); ``` -Returns **[Promise][363]<ProviderPlaylistObject>** The playlist data from the provider. +Returns **[Promise][382]<ProviderPlaylistObject>** The playlist data from the provider. ## loadPlaylistByEntryList @@ -2172,8 +2269,8 @@ Loads a playlist by entry list. ### Parameters -- `entryList` **ProviderEntryListObject** The playlist info. -- `playlistConfig` **[KPPlaylistConfigObject][377]?** The playlist config. +- `entryList` **ProviderEntryListObject** The playlist info. +- `playlistConfig` **[KPPlaylistConfigObject][396]?** The playlist config. ### Examples @@ -2181,7 +2278,7 @@ Loads a playlist by entry list. kalturaPlayer.loadPlaylistByEntryList({entries: [{entryId: '01234'}, {entryId: '56789'}]}, {options: {autoContinue: false}}); ``` -Returns **[Promise][363]<ProviderPlaylistObject>** The playlist data from the provider. +Returns **[Promise][382]<ProviderPlaylistObject>** The playlist data from the provider. ## configure @@ -2189,7 +2286,7 @@ Config the player. ### Parameters -- `config` **[Object][351]** The player config. (optional, default `{}`) +- `config` **[Object][369]** The player config. (optional, default `{}`) ### Examples @@ -2197,13 +2294,13 @@ Config the player. kalturaPlayer.configure({playback: {autoplay: true}}); ``` -Returns **void** +Returns **void** ## playlist The playlist controller. -Type: [PlaylistManager][379] +Type: [PlaylistManager][399] ### Examples @@ -2211,35 +2308,52 @@ Type: [PlaylistManager][379] KalturaPlayer.playlist.playNext(); ``` -Returns **[PlaylistManager][379]** +Returns **[PlaylistManager][399]** ## crossOrigin Set crossOrigin attribute. -Type: [string][353]? +Type: [string][371]? ### Parameters -- `crossOrigin` **[string][353]?** 'anonymous', 'use-credentials' or null to remove attribute - anonymous: CORS requests for this element will not have the credentials flag set. - use-credentials: CORS requests for this element will have the credentials flag set; this means the request will provide credentials. +- `crossOrigin` **[string][371]?** 'anonymous', 'use-credentials' or null to remove attribute + anonymous: CORS requests for this element will not have the credentials flag set. + use-credentials: CORS requests for this element will have the credentials flag set; this means the request will provide credentials. -Returns **void** +Returns **void** ## crossOrigin Get crossOrigin attribute. -Type: [string][353]? +Type: [string][371]? -Returns **[string][353]?** 'anonymous' or 'use-credentials' +Returns **[string][371]?** 'anonymous' or 'use-credentials' + +## getDefaultRedirectOptions + +get the default config for forcing external stream redirect. + +Returns **[Object][369]** config object + +## getDefaultRedirectOptions + +get the default config for forcing external stream redirect. + +### Parameters + +- `playerOptions` **KPOptionsObject** The player config. +- `mediaOptions` **KPOptionsObject** The media config. (optional, default `{}`) + +Returns **[Object][369]** config object ## getPlayers get all instantiated players -Returns **[KalturaPlayers][380]** map of player ids and their respective instantiated player +Returns **[KalturaPlayers][400]** map of player ids and their respective instantiated player ## getPlayer @@ -2247,387 +2361,806 @@ get a player instance by id ### Parameters -- `id` **[string][353]** the player ID +- `id` **[string][371]** the player ID Returns **(KalturaPlayer | null)** the player if found by the supplied ID or null if key doesn't exist [1]: #kpadobject + [2]: #properties + [3]: #kpadpod + [4]: #kpadbreakobject + [5]: #properties-1 + [6]: #kpadvertisingconfigobject + [7]: #properties-2 + [8]: #kalturaplayers + [9]: #kpplaylistoptions + [10]: #properties-3 + [11]: #kpplaylistcountdownoptions + [12]: #properties-4 + [13]: #kpplaylistconfigobject + [14]: #properties-5 + [15]: #kpplaylistobject + [16]: #properties-6 + [17]: #kpplaylistitemconfigobject + [18]: #properties-7 + [19]: #kppluginsconfigobject + [20]: #adbreak + [21]: #parameters + [22]: #type + [23]: #position + [24]: #numads + [25]: #ad + [26]: #parameters-1 + [27]: #id + [28]: #system + [29]: #contenttype + [30]: #url + [31]: #title + [32]: #position-1 + [33]: #duration + [34]: #clickthroughurl + [35]: #posterurl + [36]: #skipoffset + [37]: #linear + [38]: #width + [39]: #height + [40]: #bitrate + [41]: #bumper + [42]: #skippable + [43]: #baseremoteplayer + [44]: #parameters-2 + [45]: #loadmedia + [46]: #parameters-3 + [47]: #setmedia + [48]: #parameters-4 + [49]: #getmediainfo + [50]: #getmediaconfig + [51]: #configure + [52]: #parameters-5 + [53]: #ready + [54]: #load + [55]: #play + [56]: #pause + [57]: #reset + [58]: #destroy + [59]: #islive + [60]: #examples + [61]: #isdvr + [62]: #examples-1 + [63]: #seektoliveedge + [64]: #getstarttimeofdvrwindow + [65]: #examples-2 + [66]: #gettracks + [67]: #parameters-6 + [68]: #examples-3 + [69]: #getactivetracks + [70]: #examples-4 + [71]: #selecttrack + [72]: #parameters-7 + [73]: #hidetexttrack + [74]: #enableadaptivebitrate + [75]: #isadaptivebitrateenabled + [76]: #examples-5 + [77]: #settextdisplaysettings + [78]: #parameters-8 + [79]: #startcasting + [80]: #stopcasting + [81]: #iscasting + [82]: #examples-6 + [83]: #iscastavailable + [84]: #examples-7 + [85]: #getcastsession + [86]: #examples-8 + [87]: #isvr + [88]: #examples-9 + [89]: #togglevrstereomode + [90]: #isinvrstereomode + [91]: #examples-10 + [92]: #ads + [93]: #examples-11 + [94]: #textstyle + [95]: #parameters-9 + [96]: #textstyle-1 + [97]: #examples-12 + [98]: #buffered + [99]: #examples-13 + [100]: #currenttime + [101]: #parameters-10 + [102]: #currenttime-1 + [103]: #examples-14 + [104]: #duration-1 + [105]: #examples-15 + [106]: #volume + [107]: #parameters-11 + [108]: #volume-1 + [109]: #examples-16 + [110]: #paused + [111]: #examples-17 + [112]: #ended + [113]: #examples-18 + [114]: #seeking + [115]: #examples-19 + [116]: #muted + [117]: #parameters-12 + [118]: #muted-1 + [119]: #examples-20 + [120]: #src + [121]: #examples-21 + [122]: #poster + [123]: #examples-22 + [124]: #playbackrate + [125]: #parameters-13 + [126]: #playbackrate-1 + [127]: #examples-23 + [128]: #enginetype + [129]: #examples-24 + [130]: #streamtype + [131]: #examples-25 + [132]: #type-1 + [133]: #examples-26 + [134]: #config + [135]: #defaultconfig + [136]: #examples-27 + [137]: #type-2 + [138]: #examples-28 + [139]: #issupported + [140]: #examples-29 + [141]: #casteventtype + [142]: #examples-30 + [143]: #playersnapshot + [144]: #parameters-14 + [145]: #textstyle-2 + [146]: #advertising + [147]: #config-1 + [148]: #remotecontrol + [149]: #parameters-15 + [150]: #getplayersnapshot + [151]: #getuiwrapper + [152]: #onremotedevicedisconnected + [153]: #parameters-16 + [154]: #onremotedeviceconnected + [155]: #parameters-17 + [156]: #onremotedeviceavailable + [157]: #parameters-18 + [158]: #onremotedeviceconnecting + [159]: #onremotedevicedisconnecting + [160]: #onremotedeviceconnectfailed + [161]: #remotepayload + [162]: #parameters-19 + [163]: #player + [164]: #remoteconnectedpayload + [165]: #parameters-20 + [166]: #ui + [167]: #session + [168]: #remotedisconnectedpayload + [169]: #parameters-21 + [170]: #snapshot + [171]: #remoteavailablepayload + [172]: #parameters-22 + [173]: #available + [174]: #remoteplayerui + [175]: #playbackui + [176]: #parameters-23 + [177]: #idleui + [178]: #parameters-24 + [179]: #adsui + [180]: #parameters-25 + [181]: #liveui + [182]: #parameters-26 + [183]: #errorui + [184]: #parameters-27 + [185]: #uis + [186]: #iremoteplayer + [187]: #textstyle-3 + [188]: #muted-2 + [189]: #playbackrate-2 + [190]: #volume-2 + [191]: #currenttime-2 + [192]: #buffered-1 + [193]: #duration-2 + [194]: #paused-1 + [195]: #ended-1 + [196]: #seeking-1 + [197]: #src-1 + [198]: #poster-1 + [199]: #enginetype-1 + [200]: #streamtype-1 + [201]: #type-3 + [202]: #ads-1 + [203]: #config-2 + [204]: #addeventlistener + [205]: #parameters-28 + [206]: #removeeventlistener + [207]: #parameters-29 + [208]: #dispatchevent + [209]: #parameters-30 + [210]: #loadmedia-1 + [211]: #parameters-31 + [212]: #setmedia-1 + [213]: #parameters-32 + [214]: #getmediainfo-1 + [215]: #getmediaconfig-1 + [216]: #configure-1 + [217]: #parameters-33 + [218]: #ready-1 + [219]: #load-1 + [220]: #play-1 + [221]: #pause-1 + [222]: #reset-1 + [223]: #destroy-1 + [224]: #islive-1 + [225]: #isdvr-1 + [226]: #seektoliveedge-1 + [227]: #getstarttimeofdvrwindow-1 + [228]: #gettracks-1 + [229]: #parameters-34 + [230]: #getactivetracks-1 + [231]: #selecttrack-1 + [232]: #parameters-35 + [233]: #hidetexttrack-1 + [234]: #enableadaptivebitrate-1 + [235]: #isadaptivebitrateenabled-1 + [236]: #settextdisplaysettings-1 + [237]: #parameters-36 + [238]: #startcasting-1 + [239]: #stopcasting-1 + [240]: #iscasting-1 + [241]: #iscastavailable-1 + [242]: #getcastsession-1 + [243]: #isvr-1 + [244]: #togglevrstereomode-1 + [245]: #isinvrstereomode-1 + [246]: #remotesession + [247]: #parameters-37 + [248]: #devicefriendlyname + [249]: #id-1 + [250]: #resuming + [251]: #adscontroller + [252]: #parameters-38 + [253]: #alladscompleted + [254]: #isadbreak + [255]: #getadbreakslayout + [256]: #getadbreak + [257]: #getad + [258]: #skipad + [259]: #playadnow + [260]: #parameters-39 + [261]: #controllerprovider + [262]: #parameters-40 + [263]: #getadscontrollers + [264]: #playlisteventtype + [265]: #examples-31 + [266]: #playlistitem + [267]: #parameters-41 + [268]: #updatesources + [269]: #parameters-42 + [270]: #sources + [271]: #config-3 + [272]: #isplayable + [273]: #playlistmanager + [274]: #parameters-43 + [275]: #configure-2 + [276]: #parameters-44 + [277]: #load-2 + [278]: #parameters-45 + [279]: #reset-2 + [280]: #playnext + [281]: #playprev + [282]: #playitem + [283]: #parameters-46 + [284]: #items + [285]: #next + [286]: #prev + [287]: #id-2 + [288]: #metadata + [289]: #poster-2 + [290]: #countdown + [291]: #options + [292]: #baseplugin + [293]: #parameters-47 + [294]: #config-4 + [295]: #name + [296]: #player-1 + [297]: #player-2 + [298]: #eventmanager + [299]: #getconfig + [300]: #parameters-48 -[301]: #updateconfig -[302]: #parameters-49 -[303]: #loadmedia-2 -[304]: #destroy-2 -[305]: #reset-3 -[306]: #getname -[307]: #dispatchevent-1 -[308]: #parameters-50 -[309]: #defaultconfig-1 -[310]: #createplugin -[311]: #parameters-51 -[312]: #isvalid -[313]: #pluginmanager -[314]: #load-3 -[315]: #parameters-52 -[316]: #loadmedia-3 -[317]: #destroy-3 -[318]: #reset-4 -[319]: #get -[320]: #parameters-53 -[321]: #getall -[322]: #register -[323]: #parameters-54 -[324]: #unregister -[325]: #parameters-55 -[326]: #registerplugin -[327]: #maybesetstreampriority -[328]: #parameters-56 -[329]: #hasyoutubesource -[330]: #parameters-57 -[331]: #loadmedia-4 -[332]: #parameters-58 -[333]: #examples-32 -[334]: #loadplaylist -[335]: #parameters-59 -[336]: #examples-33 -[337]: #loadplaylistbyentrylist -[338]: #parameters-60 -[339]: #examples-34 -[340]: #configure-3 -[341]: #parameters-61 -[342]: #examples-35 -[343]: #playlist -[344]: #examples-36 -[345]: #crossorigin -[346]: #parameters-62 -[347]: #crossorigin-1 -[348]: #getplayers -[349]: #getplayer -[350]: #parameters-63 -[351]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object -[352]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array -[353]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String -[354]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean -[355]: #kpadobject -[356]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number -[357]: #kpadpod -[358]: #kpadbreakobject -[359]: #kpplaylistoptions -[360]: #kpplaylistcountdownoptions -[361]: #playlistitem -[362]: #remotecontrol -[363]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise -[364]: #remotesession -[365]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function -[366]: #playersnapshot -[367]: #remotedisconnectedpayload -[368]: #remoteconnectedpayload -[369]: #remoteavailablepayload -[370]: #baseremoteplayer -[371]: #remoteplayerui -[372]: #adbreak -[373]: #ad -[374]: #pluginmanager -[375]: #kpplaylistitemconfigobject -[376]: #kpplaylistobject -[377]: #kpplaylistconfigobject -[378]: #baseplugin -[379]: #playlistmanager -[380]: #kalturaplayers + +[301]: #ready-2 + +[302]: #updateconfig + +[303]: #parameters-49 + +[304]: #loadmedia-2 + +[305]: #destroy-2 + +[306]: #reset-3 + +[307]: #getname + +[308]: #dispatchevent-1 + +[309]: #parameters-50 + +[310]: #defaultconfig-1 + +[311]: #createplugin + +[312]: #parameters-51 + +[313]: #isvalid + +[314]: #pluginmanager + +[315]: #load-3 + +[316]: #parameters-52 + +[317]: #loadmedia-3 + +[318]: #destroy-3 + +[319]: #reset-4 + +[320]: #get + +[321]: #parameters-53 + +[322]: #getall + +[323]: #register + +[324]: #parameters-54 + +[325]: #unregister + +[326]: #parameters-55 + +[327]: #registerplugin + +[328]: #load-4 + +[329]: #parameters-56 + +[330]: #play-2 + +[331]: #parameters-57 + +[332]: #constructor + +[333]: #get-1 + +[334]: #set + +[335]: #parameters-58 + +[336]: #reset-5 + +[337]: #constructor-1 + +[338]: #evaluatepluginsconfig + +[339]: #parameters-59 + +[340]: #evaluateuiconfig + +[341]: #parameters-60 + +[342]: #maybesetstreampriority + +[343]: #parameters-61 + +[344]: #hasyoutubesource + +[345]: #parameters-62 + +[346]: #loadmedia-4 + +[347]: #parameters-63 + +[348]: #examples-32 + +[349]: #loadplaylist + +[350]: #parameters-64 + +[351]: #examples-33 + +[352]: #loadplaylistbyentrylist + +[353]: #parameters-65 + +[354]: #examples-34 + +[355]: #configure-3 + +[356]: #parameters-66 + +[357]: #examples-35 + +[358]: #playlist + +[359]: #examples-36 + +[360]: #crossorigin + +[361]: #parameters-67 + +[362]: #crossorigin-1 + +[363]: #getdefaultredirectoptions + +[364]: #getdefaultredirectoptions-1 + +[365]: #parameters-68 + +[366]: #getplayers + +[367]: #getplayer + +[368]: #parameters-69 + +[369]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object + +[370]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array + +[371]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String + +[372]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean + +[373]: #kpadobject + +[374]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number + +[375]: #kpadpod + +[376]: #kpadbreakobject + +[377]: https://github.com/kaltura/playkit-js-timeline/blob/main/docs/types.md#cuepointoptionsobject + +[378]: #kpplaylistoptions + +[379]: #kpplaylistcountdownoptions + +[380]: #playlistitem + +[381]: #remotecontrol + +[382]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise + +[383]: #remotesession + +[384]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function + +[385]: #playersnapshot + +[386]: #remotedisconnectedpayload + +[387]: #remoteconnectedpayload + +[388]: #remoteavailablepayload + +[389]: #baseremoteplayer + +[390]: #remoteplayerui + +[391]: #adbreak + +[392]: #ad + +[393]: #pluginmanager + +[394]: #kpplaylistitemconfigobject + +[395]: #kpplaylistobject + +[396]: #kpplaylistconfigobject + +[397]: #baseplugin + +[398]: #kppluginsconfigobject + +[399]: #playlistmanager + +[400]: #kalturaplayers diff --git a/docs/configuration.md b/docs/configuration.md index d6c90c809..2da8f27a8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -150,6 +150,8 @@ The configuration uses the following structure: > ```js > { > playAdsAfterTime?: number, +> showAdBreakCuePoint?: booleab, +> adBreakCuePointStyle?: Object, > adBreaks: Array > } > ``` @@ -169,6 +171,26 @@ The configuration uses the following structure: > > ##### Description: 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. > > > > ## +> > +> > ### config.advertising.showAdBreakCuePoint +> > +> > ##### Type: `boolean` +> > +> > ##### Default: `false` +> > +> > ##### Description: Whether to show the ad breaks cue points. +> > +> > ## +> > +> > ### config.advertising.adBreakCuePointStyle +> > +> > ##### Type: `Object` +> > +> > ##### Default: `null` +> > +> > ##### Description: Style options for the ad breaks cue points. +> > +> > ## > > > > ### config.advertising.adBreaks > > diff --git a/flow-typed/types/advertising.js b/flow-typed/types/advertising.js index 42b8e4dbe..305f6e4b6 100644 --- a/flow-typed/types/advertising.js +++ b/flow-typed/types/advertising.js @@ -37,10 +37,14 @@ declare type KPAdBreakObject = _KPAdBreakObject; /** * @typedef {Object} KPAdvertisingConfigObject * @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 {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 in https://github.com/kaltura/playkit-js-timeline/blob/main/docs/types.md#cuepointoptionsobject. */ type _KPAdvertisingConfigObject = { adBreaks: Array, - playAdsAfterTime?: number + playAdsAfterTime?: number, + showAdBreakCuePoint?: boolean, + adBreakCuePointStyle?: Object }; declare type KPAdvertisingConfigObject = _KPAdvertisingConfigObject; diff --git a/src/common/controllers/ads-controller.js b/src/common/controllers/ads-controller.js index 31126f61b..cc28698d9 100644 --- a/src/common/controllers/ads-controller.js +++ b/src/common/controllers/ads-controller.js @@ -203,6 +203,14 @@ class AdsController extends FakeEventTarget implements IAdsController { ); AdsController._logger.debug(AdEventType.AD_MANIFEST_LOADED, adBreaksPosition); this._player.dispatchEvent(new FakeEvent(AdEventType.AD_MANIFEST_LOADED, {adBreaksPosition})); + if (this._player.ui.hasManager('timeline') && this._player.config.advertising.showAdBreakCuePoint) { + adBreaksPosition.forEach(position => { + this._player.ui.getManager('timeline').addCuePoint({ + time: position !== -1 ? position : Infinity, + ...this._player.config.advertising.adBreakCuePointStyle + }); + }); + } } _handleConfiguredPreroll(): void { From 2b31bd64356d57c8c3970013d82439c1ae1f6dbc Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Thu, 10 Dec 2020 21:10:23 +0200 Subject: [PATCH 5/8] js --- docs/advertisement-layout-management.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/advertisement-layout-management.md b/docs/advertisement-layout-management.md index 820598d0b..8dd1f563f 100644 --- a/docs/advertisement-layout-management.md +++ b/docs/advertisement-layout-management.md @@ -20,7 +20,7 @@ Ad break can be set as pre, mid and post rolls and each ad break can contain a s Here's a simple scheme sample which contains 4 ad breaks: 1 pre-roll, 2 mid-rolls and 1 post-roll: -```ecmascript 6 +```js const config = { ... plugins: { @@ -66,7 +66,7 @@ An ad break may contain a list of ads, also referred to as ad pod. Ad pod sample: -```ecmascript 6 +```js const config = { ... plugins: { @@ -109,7 +109,7 @@ An application may want to set a fallback vast url, so in case the primary ad re This mechanism called _Waterfalling_, is configurable easily using the ad layout config. Here's a sample of a mid-roll with waterfalling: -```ecmascript 6 +```js const config = { ... plugins: { @@ -159,7 +159,7 @@ Each ad in the `ads` list gets the following options: All the options above work together, that means the application may use and mix them in the same `advertising` object. Here's a sample: -```ecmascript 6 +```js const config = { ... plugins: { @@ -209,7 +209,7 @@ const kalturaPlayer = KalturaPlayer.setup(config); An application may want to configure the player to play ads only from a specific time. This can be achieved by `playAdsAfterTime` parameter. For example: -```ecmascript 6 +```js const config = { ... plugins: { @@ -242,7 +242,7 @@ In this sample, the player will skip the pre-roll, and will play the mid-roll on This option can be used also when `playback.startTime` is set, which by default causes the player to skip the ads scheduled before the start time. Although, An application may want to force the player to play these ads. This can be achieved also by `playAdsAfterTime` parameter. For example: -```ecmascript 6 +```js const config = { ... playback: { @@ -282,7 +282,7 @@ In addition to the current [ad events](./ads.md#ad-events) (`adbreakstart, adbre All the above features are supported not only by `advertising` config, but also by `playAdNow` api which gets an ad pod as a parameter. The app may call it whenever it wants to play an ad pod. -```ecmascript 6 +```js const config = { ... plugins: { @@ -305,7 +305,7 @@ kalturaPlayer.ads.playAdNow( ### Seekbar Cue Points To display cue points on the seekbar to indicates the ad break positions use the following config: -```ecmascript 6 +```js const config = { ... plugins: { @@ -326,7 +326,7 @@ const config = { ``` To customize the cue points style use `adBreakCuePointStyle` option. for example: -```ecmascript 6 +```js const config = { ... plugins: { From 085763e79a817f9631d4d858fb27ca53075e9040 Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Thu, 10 Dec 2020 21:12:03 +0200 Subject: [PATCH 6/8] showAdBreakCuePoint --- docs/advertisement-layout-management.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/advertisement-layout-management.md b/docs/advertisement-layout-management.md index 8dd1f563f..f6b8e4e5b 100644 --- a/docs/advertisement-layout-management.md +++ b/docs/advertisement-layout-management.md @@ -304,7 +304,7 @@ kalturaPlayer.ads.playAdNow( ### Seekbar Cue Points -To display cue points on the seekbar to indicates the ad break positions use the following config: +To display cue points on the seekbar to indicates the ad break positions use `showAdBreakCuePoint` option, as following: ```js const config = { ... From 99b321a36718279ab214b9ef0a556ad802a103ff Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Thu, 10 Dec 2020 21:20:58 +0200 Subject: [PATCH 7/8] use link --- docs/api.md | 4 ++-- flow-typed/types/advertising.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api.md b/docs/api.md index fd1eac1d9..92845f45e 100644 --- a/docs/api.md +++ b/docs/api.md @@ -405,7 +405,7 @@ Type: [Object][369] - `adBreaks` **[Array][370]<[KPAdBreakObject][376]>** The ad breaks scheme. - `playAdsAfterTime` **[number][374]?** 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. - `showAdBreakCuePoint` **[boolean][372]?** Whether to show the ad breaks cue points. -- `adBreakCuePointStyle` **[Object][369]?** Style options for the ad breaks cue points - See the options in [https://github.com/kaltura/playkit-js-timeline/blob/main/docs/types.md#cuepointoptionsobject][377]. +- `adBreakCuePointStyle` **[Object][369]?** Style options for the ad breaks cue points - See the options [Here][377]. ## KalturaPlayers @@ -413,7 +413,7 @@ a map of player instances by player ids Type: [Object][369]<[string][371], KalturaPlayer> -## KPPlaylistOptions +## KPPlaylistOptions Type: [Object][369] diff --git a/flow-typed/types/advertising.js b/flow-typed/types/advertising.js index 305f6e4b6..0e43efb9c 100644 --- a/flow-typed/types/advertising.js +++ b/flow-typed/types/advertising.js @@ -39,7 +39,7 @@ declare type KPAdBreakObject = _KPAdBreakObject; * @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 in https://github.com/kaltura/playkit-js-timeline/blob/main/docs/types.md#cuepointoptionsobject. + * @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}. */ type _KPAdvertisingConfigObject = { adBreaks: Array, From cb8b8268bd1e963ef82fd8754a8e6d3009b7071b Mon Sep 17 00:00:00 2001 From: "yair.ansbacher" Date: Thu, 10 Dec 2020 22:17:30 +0200 Subject: [PATCH 8/8] fix flow --- src/common/controllers/ads-controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/controllers/ads-controller.js b/src/common/controllers/ads-controller.js index cc28698d9..a12751b5d 100644 --- a/src/common/controllers/ads-controller.js +++ b/src/common/controllers/ads-controller.js @@ -205,6 +205,7 @@ class AdsController extends FakeEventTarget implements IAdsController { this._player.dispatchEvent(new FakeEvent(AdEventType.AD_MANIFEST_LOADED, {adBreaksPosition})); if (this._player.ui.hasManager('timeline') && this._player.config.advertising.showAdBreakCuePoint) { adBreaksPosition.forEach(position => { + // $FlowFixMe this._player.ui.getManager('timeline').addCuePoint({ time: position !== -1 ? position : Infinity, ...this._player.config.advertising.adBreakCuePointStyle