@flowplayer/player 3.34.3 → 3.35.0-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/flowplayer.css +1 -1
- package/package/core/events.d.ts +710 -0
- package/package/core/events.js +403 -0
- package/package/core.js +1 -0
- package/package/default.js +1 -0
- package/package/embed.js +7 -0
- package/package/flowplayer.css +1 -0
- package/package/index.d.ts +2238 -0
- package/package/plugins/ads.d.ts +4468 -0
- package/package/plugins/ads.js +7 -0
- package/package/plugins/airplay.d.ts +2152 -0
- package/package/plugins/airplay.js +1 -0
- package/package/plugins/analytics.d.ts +2146 -0
- package/package/plugins/analytics.js +1 -0
- package/package/plugins/asel.d.ts +2293 -0
- package/package/plugins/asel.js +1 -0
- package/package/plugins/audio.d.ts +2146 -0
- package/package/plugins/audio.js +1 -0
- package/package/plugins/chapters.d.ts +2155 -0
- package/package/plugins/chapters.js +1 -0
- package/package/plugins/chromecast.d.ts +2221 -0
- package/package/plugins/chromecast.js +1 -0
- package/package/plugins/comscore.d.ts +2146 -0
- package/package/plugins/comscore.js +1 -0
- package/package/plugins/consent.d.ts +2194 -0
- package/package/plugins/consent.js +1 -0
- package/package/plugins/context-menu.d.ts +2160 -0
- package/package/plugins/context-menu.js +1 -0
- package/package/plugins/cuepoints.d.ts +2270 -0
- package/package/plugins/cuepoints.js +1 -0
- package/package/plugins/dash.d.ts +2302 -0
- package/package/plugins/dash.js +2 -0
- package/package/plugins/drm.d.ts +2271 -0
- package/package/plugins/drm.js +1 -0
- package/package/plugins/endscreen.d.ts +2165 -0
- package/package/plugins/endscreen.js +1 -0
- package/package/plugins/fas.d.ts +2200 -0
- package/package/plugins/fas.js +1 -0
- package/package/plugins/float-on-scroll.d.ts +2234 -0
- package/package/plugins/float-on-scroll.js +1 -0
- package/package/plugins/ga4.d.ts +2146 -0
- package/package/plugins/ga4.js +1 -0
- package/package/plugins/gemius.d.ts +2171 -0
- package/package/plugins/gemius.js +1 -0
- package/package/plugins/google-analytics.d.ts +2146 -0
- package/package/plugins/google-analytics.js +1 -0
- package/package/plugins/hls.d.ts +2271 -0
- package/package/plugins/hls.js +1 -0
- package/package/plugins/id3.d.ts +2212 -0
- package/package/plugins/id3.js +1 -0
- package/package/plugins/iframe.d.ts +2147 -0
- package/package/plugins/iframe.js +1 -0
- package/package/plugins/keyboard.d.ts +2146 -0
- package/package/plugins/keyboard.js +1 -0
- package/package/plugins/media-session.d.ts +2146 -0
- package/package/plugins/media-session.js +1 -0
- package/package/plugins/message.d.ts +2205 -0
- package/package/plugins/message.js +1 -0
- package/package/plugins/ovp.d.ts +2208 -0
- package/package/plugins/ovp.js +1 -0
- package/package/plugins/playlist.d.ts +2465 -0
- package/package/plugins/playlist.js +1 -0
- package/package/plugins/preview.d.ts +2236 -0
- package/package/plugins/preview.js +1 -0
- package/package/plugins/qsel.d.ts +2236 -0
- package/package/plugins/qsel.js +1 -0
- package/package/plugins/qul.d.ts +2161 -0
- package/package/plugins/qul.js +1 -0
- package/package/plugins/rts.d.ts +2551 -0
- package/package/plugins/rts.js +25 -0
- package/package/plugins/share.d.ts +2181 -0
- package/package/plugins/share.js +1 -0
- package/package/plugins/speed.d.ts +2173 -0
- package/package/plugins/speed.js +1 -0
- package/package/plugins/ssai.d.ts +2502 -0
- package/package/plugins/ssai.js +7 -0
- package/package/plugins/subtitles.d.ts +2287 -0
- package/package/plugins/subtitles.js +1 -0
- package/package/plugins/thumbnails.d.ts +2164 -0
- package/package/plugins/thumbnails.js +1 -0
- package/package/plugins/tizen.d.ts +2152 -0
- package/package/plugins/tizen.js +1 -0
- package/package/plugins/vtsel.d.ts +2250 -0
- package/package/plugins/vtsel.js +1 -0
- package/package/plugins/webos.d.ts +2152 -0
- package/package/plugins/webos.js +1 -0
- package/package/util/loader.d.ts +2163 -0
- package/package/util/loader.js +63 -0
- package/package.json +2364 -1
- package/plugins/ads.js +1 -1
- package/plugins/analytics.js +1 -1
- package/plugins/ovp.js +1 -1
- package/plugins/rts.js +1 -1
- package/plugins/ssai.js +1 -1
|
@@ -0,0 +1,4468 @@
|
|
|
1
|
+
import type { Get } from 'type-fest';
|
|
2
|
+
import type { Level } from 'hls.js';
|
|
3
|
+
import type { Paths } from 'type-fest';
|
|
4
|
+
import type { Representation } from 'dashjs';
|
|
5
|
+
import type { Translation } from '@flowplayer/translations';
|
|
6
|
+
import type { TupleToUnion } from 'type-fest';
|
|
7
|
+
|
|
8
|
+
declare const AD_ATTRIBUTION: number;
|
|
9
|
+
|
|
10
|
+
/* Excluded from this release type: AD_BLOCKED */
|
|
11
|
+
|
|
12
|
+
declare const AD_BREAK_COMPLETED = "ad-break-completed";
|
|
13
|
+
|
|
14
|
+
declare const AD_CHOICES: number;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* When a single ad has finished
|
|
18
|
+
*/
|
|
19
|
+
declare const AD_COMPLETED = "ad-completed";
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: AD_ERROR */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: AD_FULLSCREEN */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: AD_INIT */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: AD_MIDROLL_FINISHED */
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* When the ad is muted
|
|
31
|
+
*/
|
|
32
|
+
declare const AD_MUTED = "ad-muted";
|
|
33
|
+
|
|
34
|
+
declare const AD_PAUSE_CONTENT = "ad-pause-content";
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* When the ad has been paused
|
|
38
|
+
*/
|
|
39
|
+
declare const AD_PAUSED = "ad-paused";
|
|
40
|
+
|
|
41
|
+
declare const AD_PLAY_REQUESTED = "ad-play-requested";
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Ad request was successfull but ad fails to play
|
|
45
|
+
*/
|
|
46
|
+
declare const AD_PLAYBACK_ERROR = "ad-playback-error";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* When all ads for a specific timeslot have been shown
|
|
50
|
+
*/
|
|
51
|
+
declare const AD_POSTROLL_FINISHED = "ad-postroll-finished";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Fires when both content and (possible) postroll are finished. Also fires when no postroll is configured.
|
|
55
|
+
*/
|
|
56
|
+
declare const AD_PREROLL_FINSIHED = "ad-preroll-finished";
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Fires when the ad progresses
|
|
60
|
+
*/
|
|
61
|
+
declare const AD_PROGRESS = "ad-progress";
|
|
62
|
+
|
|
63
|
+
declare const AD_REQUEST_COMPLETED = "ad-request-completed";
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Ad was requested but the ad request fails
|
|
67
|
+
*/
|
|
68
|
+
declare const AD_REQUEST_ERROR = "ad-request-error";
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Fires when an ad request has been made
|
|
72
|
+
*/
|
|
73
|
+
declare const AD_REQUESTED = "ad-requested";
|
|
74
|
+
|
|
75
|
+
/* Excluded from this release type: AD_RESIZE */
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* When the ad resumes
|
|
79
|
+
*/
|
|
80
|
+
declare const AD_RESUMED = "ad-resumed";
|
|
81
|
+
|
|
82
|
+
/* Excluded from this release type: AD_SET_UI_FLAGS */
|
|
83
|
+
|
|
84
|
+
/* Excluded from this release type: AD_SHOW_FIRST_FRAME */
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* When the skip button has been clicked
|
|
88
|
+
*/
|
|
89
|
+
declare const AD_SKIPPED = "ad-skipped";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Ad was received and starts to show
|
|
93
|
+
*/
|
|
94
|
+
declare const AD_STARTED = "ad-started";
|
|
95
|
+
|
|
96
|
+
declare const AD_TEARDOWN = "ad-teardown";
|
|
97
|
+
|
|
98
|
+
declare const AD_TIMEOUT = "ad-timeout";
|
|
99
|
+
|
|
100
|
+
declare const AD_VIDEOTAG_ATTACHED = "ad-videotag-attached";
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Volume has been changed during ad playback
|
|
104
|
+
*/
|
|
105
|
+
declare const AD_VOLUME_CHANGED = "ad-volume-changed";
|
|
106
|
+
|
|
107
|
+
/* Excluded from this release type: AD_WAITING */
|
|
108
|
+
|
|
109
|
+
declare interface Adapter {
|
|
110
|
+
initialize(opts: AdapterOpts): void;
|
|
111
|
+
getOpts(): AdapterOpts;
|
|
112
|
+
reset(): void;
|
|
113
|
+
destroy(): void;
|
|
114
|
+
destroyManager(): void;
|
|
115
|
+
stop(): void;
|
|
116
|
+
initAd(adTag: string, timeout?: number): Promise<void>;
|
|
117
|
+
playAd(): Promise<void>;
|
|
118
|
+
pause(): void;
|
|
119
|
+
resume(): void;
|
|
120
|
+
volume(level?: number): number | undefined;
|
|
121
|
+
contentComplete(): Promise<void>;
|
|
122
|
+
onResize(_obj: ResizeInfo): void;
|
|
123
|
+
isUiDisabled(): boolean;
|
|
124
|
+
onAdRequestEnd(): void;
|
|
125
|
+
isAdPod(): boolean;
|
|
126
|
+
canDismissNonLinear(): boolean;
|
|
127
|
+
setAdBreakTime: (time: number) => void;
|
|
128
|
+
getAdBreakTime: () => number;
|
|
129
|
+
init(opts: AdapterOpts): Promise<void>;
|
|
130
|
+
isReady(): boolean;
|
|
131
|
+
setVideoTag(tag: Player): void;
|
|
132
|
+
isPaused(): boolean;
|
|
133
|
+
isCustomPlaybackEnabled(): boolean;
|
|
134
|
+
isAttemptingPrerollOnIOS(): boolean;
|
|
135
|
+
setAttemptingPrerollOnIOS(preroll_on_ios: boolean): void;
|
|
136
|
+
isLinearAd(): boolean;
|
|
137
|
+
getVideoTag(): Player | undefined;
|
|
138
|
+
getDimensions(): Partial<{
|
|
139
|
+
width: number;
|
|
140
|
+
height: number;
|
|
141
|
+
linear: boolean;
|
|
142
|
+
}>;
|
|
143
|
+
getAdInfo(): AdInfo | undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare const ADAPTER_INIT_FAILED = "ad-adapter-init-failed";
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
export declare type AdapterInitFailedEventDetail = AdBasicInfo;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
export declare type AdapterOpts = Partial<ControllerConfig>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @public
|
|
160
|
+
* Basic info about current ad and it's config
|
|
161
|
+
*/
|
|
162
|
+
export declare type AdBasicInfo = AdapterOpts & TimeBasedAd & {
|
|
163
|
+
ad_type?: AdType;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
export declare type AdBreakCompletedEventDetail = AdBasicInfo;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
export declare type AdCompletedEventDetail = AdBasicInfo & AdDetail;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @public
|
|
178
|
+
* Detailed info about current ad
|
|
179
|
+
*/
|
|
180
|
+
export declare type AdDetail = {
|
|
181
|
+
ad: {
|
|
182
|
+
duration: number;
|
|
183
|
+
width: number;
|
|
184
|
+
height: number;
|
|
185
|
+
position: number | undefined;
|
|
186
|
+
totals: number | undefined;
|
|
187
|
+
};
|
|
188
|
+
volume: number;
|
|
189
|
+
vast_ad_id: string;
|
|
190
|
+
linear: boolean;
|
|
191
|
+
mime_type: string;
|
|
192
|
+
/* Excluded from this release type: ima_event */
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
198
|
+
export declare type AdError = {
|
|
199
|
+
vast_error_type: google.ima.AdError.Type;
|
|
200
|
+
reason: string;
|
|
201
|
+
vast_error: google.ima.AdError.ErrorCode;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @public
|
|
206
|
+
* Represents ad events.
|
|
207
|
+
*/
|
|
208
|
+
declare type AdEvents = typeof events_2;
|
|
209
|
+
|
|
210
|
+
declare type AdEventsDetailMap = {
|
|
211
|
+
/* Excluded from this release type: "ad-initialized" */
|
|
212
|
+
[AD_PLAYBACK_ERROR]: AdPlaybackErrorEventDetail;
|
|
213
|
+
[AD_TEARDOWN]: AdTearDownEventDetail;
|
|
214
|
+
[AD_VIDEOTAG_ATTACHED]: AdVideoTagAttachedEventDetail;
|
|
215
|
+
[AD_REQUEST_ERROR]: AdRequestErrorEventDetail;
|
|
216
|
+
[AD_REQUESTED]: AdRequestedEventDetail;
|
|
217
|
+
[AD_REQUEST_COMPLETED]: AdRequestCompletedEventDetail;
|
|
218
|
+
[AD_PAUSE_CONTENT]: AdPauseContentEventDetail;
|
|
219
|
+
[AD_STARTED]: AdStartedEventDetail;
|
|
220
|
+
[AD_COMPLETED]: AdCompletedEventDetail;
|
|
221
|
+
[AD_PAUSED]: AdPausedEventDetail;
|
|
222
|
+
[AD_RESUMED]: AdResumedEventDetail;
|
|
223
|
+
[AD_PROGRESS]: AdProgressEventDetail;
|
|
224
|
+
[AD_SKIPPED]: AdSkippedEventDetail;
|
|
225
|
+
[AD_MUTED]: AdMutedEventDetail;
|
|
226
|
+
[AD_VOLUME_CHANGED]: AdVolumeChangedEventDetail;
|
|
227
|
+
[AD_TIMEOUT]: AdTimeoutEventDetail;
|
|
228
|
+
[AD_BREAK_COMPLETED]: AdBreakCompletedEventDetail;
|
|
229
|
+
[AD_POSTROLL_FINISHED]: AdPostrollFinishedEventDetail;
|
|
230
|
+
[AD_PREROLL_FINSIHED]: AdPrerollFinishedEventDetail;
|
|
231
|
+
/* Excluded from this release type: "vpaid-init" */
|
|
232
|
+
[IMA_ADAPTER_INIT]: ImaAdapterInitEventDetail;
|
|
233
|
+
[IMA_BEFORE_ADS_REQUEST]: ImaBeforeAdsRequestEventDetail;
|
|
234
|
+
[IMA_ADS_RENDERING_SETTINGS]: ImaAdsRenderingSettingsEventDetail;
|
|
235
|
+
[ADAPTER_INIT_FAILED]: AdapterInitFailedEventDetail;
|
|
236
|
+
[AD_PLAY_REQUESTED]: AdPlayRequestedEventDetail;
|
|
237
|
+
[RELOAD_AD_REQUESTED]: ReloadAdRequestedEventDetail;
|
|
238
|
+
[REQUEST_AD_PAUSE]: RequestAdPauseEventDetail;
|
|
239
|
+
[REQUEST_AD_PLAY]: RequestAdPlayEventDetail;
|
|
240
|
+
[REQUEST_AD_MUTE_UNMUTE]: RequestAdMuteUnmuteEventDetail;
|
|
241
|
+
[PBJS_AVAILABLE]: PBJSAvailebleEventDetail;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
declare type AdInfo = {
|
|
245
|
+
duration: number;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
/* Excluded from this release type: AdInitEventDetail */
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @public
|
|
252
|
+
*/
|
|
253
|
+
export declare type AdMutedEventDetail = AdBasicInfo;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
258
|
+
export declare type AdPauseContentEventDetail = AdBasicInfo & AdDetail;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
export declare type AdPausedEventDetail = AdBasicInfo;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @public
|
|
267
|
+
*/
|
|
268
|
+
export declare type AdPlaybackErrorEventDetail = google.ima.AdErrorEvent;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* @public
|
|
272
|
+
*/
|
|
273
|
+
export declare type AdPlayRequestedEventDetail = AdBasicInfo;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @public
|
|
277
|
+
*/
|
|
278
|
+
export declare type AdPostrollFinishedEventDetail = AdBasicInfo;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @public
|
|
282
|
+
*/
|
|
283
|
+
export declare type AdPrerollFinishedEventDetail = AdBasicInfo;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
export declare type AdProgressDetail = {
|
|
289
|
+
remaining: number;
|
|
290
|
+
duration: number;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @public
|
|
295
|
+
*/
|
|
296
|
+
export declare type AdProgressEventDetail = AdBasicInfo & AdProgressDetail;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @public
|
|
300
|
+
*/
|
|
301
|
+
export declare type AdRequestCompletedEventDetail = AdBasicInfo & {
|
|
302
|
+
request_load_time: number;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @public
|
|
307
|
+
*/
|
|
308
|
+
export declare type AdRequestedEventDetail = AdBasicInfo | AdTag;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @public
|
|
312
|
+
*/
|
|
313
|
+
export declare type AdRequestErrorEventDetail = AdError;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @public
|
|
317
|
+
*/
|
|
318
|
+
export declare type AdResumedEventDetail = AdBasicInfo;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @public
|
|
322
|
+
* The Advertising plugin allows you to seamlessly integrate various ads into your video content, including pre-roll, mid-roll, and post-roll ads. These ads can be served from different ad networks or custom ad servers.
|
|
323
|
+
* See {@link https://developer.wowza.com/docs/wowza-flowplayer/plugins/advertising/|Official Documentation}
|
|
324
|
+
*/
|
|
325
|
+
declare const Ads: PluginCtor<NoInfer<AdsConfig>, NoInfer<AdsPlayer>> & NoInfer<AdsAPI>;
|
|
326
|
+
export default Ads;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @public
|
|
330
|
+
*/
|
|
331
|
+
export declare type AdsAPI = {
|
|
332
|
+
/**
|
|
333
|
+
* UI bit flags to be used in `ads.ui` configuration option
|
|
334
|
+
*/
|
|
335
|
+
ui: AdsUI;
|
|
336
|
+
/**
|
|
337
|
+
* Event names in Ads Plugins
|
|
338
|
+
*/
|
|
339
|
+
events: AdEvents;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* @public
|
|
344
|
+
* Main configuration for the Ads plugin.
|
|
345
|
+
*/
|
|
346
|
+
export declare type AdsConfig = ConfigWith<{
|
|
347
|
+
/**
|
|
348
|
+
* Ads plugin configuration
|
|
349
|
+
*/
|
|
350
|
+
ima?: PlayerIMAConfig;
|
|
351
|
+
/**
|
|
352
|
+
* Ads plugin configuration
|
|
353
|
+
*/
|
|
354
|
+
ads?: AdsDetails;
|
|
355
|
+
}>;
|
|
356
|
+
|
|
357
|
+
declare class AdsController extends EventBus {
|
|
358
|
+
readonly adapter: Adapter;
|
|
359
|
+
readonly opts: Partial<ControllerConfig>;
|
|
360
|
+
readonly analytics: Analytics;
|
|
361
|
+
private _macros;
|
|
362
|
+
private _schedule;
|
|
363
|
+
private _state;
|
|
364
|
+
private _lastAd;
|
|
365
|
+
private content_processing_src;
|
|
366
|
+
constructor(params?: Partial<ControllerConfig>);
|
|
367
|
+
reset(): this;
|
|
368
|
+
destroy(): void;
|
|
369
|
+
stop(): void;
|
|
370
|
+
onContentNewSrc(): void;
|
|
371
|
+
wireup(): void;
|
|
372
|
+
initialize(ads: TimeBasedAd[] | false, opts?: Partial<ControllerConfig>, preload?: boolean): Promise<this>;
|
|
373
|
+
get videoTag(): Player | undefined;
|
|
374
|
+
get adInfo(): AdInfo | undefined;
|
|
375
|
+
setVideoTag(player: Player): Promise<void>;
|
|
376
|
+
waitForVideoTag(): Promise<unknown>;
|
|
377
|
+
adapterInitialized(preload?: boolean): Promise<void>;
|
|
378
|
+
fetchNextAd(time: number, depth?: number): Promise<void>;
|
|
379
|
+
skipAdsOnSeek(time: number): void;
|
|
380
|
+
setCurrentTime(time: number, preload?: boolean, seek?: boolean): Promise<void>;
|
|
381
|
+
playAd(): Promise<void>;
|
|
382
|
+
checkIfBreakComplete(): void;
|
|
383
|
+
resetScheduleCounter(): void;
|
|
384
|
+
setSchedule(ads: TimeBasedAd[], contentDuration?: number): void;
|
|
385
|
+
toJSON(): TimeBasedAd[];
|
|
386
|
+
trigger<EventName extends keyof AdEventsDetailMap>(name: EventName, data?: any): void;
|
|
387
|
+
dispatch<EventName extends keyof AdEventsDetailMap>(name: EventName, data: any): void;
|
|
388
|
+
get ad_type(): "preroll" | "midroll" | "postroll" | undefined;
|
|
389
|
+
shouldRestartContent(): boolean;
|
|
390
|
+
finished(cb: () => void): Promise<void>;
|
|
391
|
+
hasPreroll(): boolean | undefined;
|
|
392
|
+
shallPlayAd(time: number): boolean;
|
|
393
|
+
setLastAd(ad: TimeBasedAd): this;
|
|
394
|
+
setIsContentProcessingNewSrc(is_processing: boolean): void;
|
|
395
|
+
getLastAd(): Maybe<TimeBasedAd>;
|
|
396
|
+
getIsContentProcessingNewSrc(): boolean;
|
|
397
|
+
mergeMacros(macros?: {}): this;
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* public interface for plugin users, keep the signature unchanged
|
|
401
|
+
*
|
|
402
|
+
**/
|
|
403
|
+
get paused(): boolean;
|
|
404
|
+
pause(): void;
|
|
405
|
+
resume(): void;
|
|
406
|
+
resize(opts: Todo): void;
|
|
407
|
+
requestAd(ad: AdTag, idx?: number, timeout?: number | undefined): Promise<void>;
|
|
408
|
+
resetSchedule(ads: TimeBasedAd[]): void;
|
|
409
|
+
get adPlaying(): boolean;
|
|
410
|
+
get adBreak(): boolean;
|
|
411
|
+
get adRequesting(): boolean;
|
|
412
|
+
get adLinear(): boolean;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* @public
|
|
417
|
+
*/
|
|
418
|
+
export declare type AdsControllerPublic = {
|
|
419
|
+
/**
|
|
420
|
+
* Pauses the ad
|
|
421
|
+
*/
|
|
422
|
+
pause(): void;
|
|
423
|
+
/**
|
|
424
|
+
* Resumes the ad
|
|
425
|
+
*/
|
|
426
|
+
resume(): void;
|
|
427
|
+
/**
|
|
428
|
+
* Attempts to request & play an adTag
|
|
429
|
+
* @param adTag - Ad tag
|
|
430
|
+
*/
|
|
431
|
+
requestAd(adTag: string): Promise<void>;
|
|
432
|
+
/**
|
|
433
|
+
* Resets the internal ad schedule
|
|
434
|
+
* @param adSchedule - Ad schedule
|
|
435
|
+
*/
|
|
436
|
+
resetSchedule(adSchedule: Array<{
|
|
437
|
+
adTag: string;
|
|
438
|
+
time: number;
|
|
439
|
+
}>): void;
|
|
440
|
+
/**
|
|
441
|
+
* Boolean to show when ad is playing
|
|
442
|
+
*/
|
|
443
|
+
get adPlaying(): boolean;
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* @public
|
|
448
|
+
*/
|
|
449
|
+
export declare type AdsDetails = {
|
|
450
|
+
/**
|
|
451
|
+
* Adds a bitmask to configure {@link https://developer.wowza.com/docs/wowza-flowplayer/plugins/advertising/#ui-configuration|UI elements}. Default value is undefined.
|
|
452
|
+
*/
|
|
453
|
+
ui?: number;
|
|
454
|
+
/**
|
|
455
|
+
* Configuration for Prebid.js integration.
|
|
456
|
+
*/
|
|
457
|
+
prebid?: PrebidConfig;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* @public
|
|
462
|
+
*/
|
|
463
|
+
export declare type AdSkippedEventDetail = AdBasicInfo & AdDetail;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* @public
|
|
467
|
+
*/
|
|
468
|
+
export declare type AdsPlayer = PlayerWith<{
|
|
469
|
+
ads?: AdsControllerPublic;
|
|
470
|
+
on<EventName extends keyof AdEventsDetailMap>(event: EventName, handler: (e: FPEvent<AdEventsDetailMap[EventName]>) => void): Player;
|
|
471
|
+
}>;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* @public
|
|
475
|
+
*/
|
|
476
|
+
export declare type AdStartedEventDetail = AdBasicInfo & AdDetail;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @public
|
|
480
|
+
* Represents the UI configuration for ads.
|
|
481
|
+
*/
|
|
482
|
+
export declare type AdsUI = typeof Flags_2;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* @public
|
|
486
|
+
* Represents an ad tag which can be a string, array of strings, LazyAdTag, or array of LazyAdTags.
|
|
487
|
+
*/
|
|
488
|
+
export declare type AdTag = string | LazyAdTag[] | string[] | (string | LazyAdTag)[] | LazyAdTag | TimeBasedAd;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* @public
|
|
492
|
+
*/
|
|
493
|
+
export declare type AdTearDownEventDetail = AdBasicInfo;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* @public
|
|
497
|
+
*/
|
|
498
|
+
export declare type AdTimeoutEventDetail = Error;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* @public
|
|
502
|
+
*/
|
|
503
|
+
export declare enum AdType {
|
|
504
|
+
Preroll = "preroll",
|
|
505
|
+
Midroll = "midroll",
|
|
506
|
+
Postroll = "postroll"
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* @public
|
|
511
|
+
*/
|
|
512
|
+
export declare type AdVideoTagAttachedEventDetail = Player;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* @public
|
|
516
|
+
*/
|
|
517
|
+
export declare type AdVolumeChangedEventDetail = number;
|
|
518
|
+
|
|
519
|
+
declare class Analytics {
|
|
520
|
+
readonly emitter: Listenable;
|
|
521
|
+
/**
|
|
522
|
+
* pure creation interface
|
|
523
|
+
*/
|
|
524
|
+
static of(emitter: Listenable, opts: Todo): Analytics;
|
|
525
|
+
/**
|
|
526
|
+
* check it there are any keys that the Analytics service
|
|
527
|
+
* considers to be require on an Object
|
|
528
|
+
*/
|
|
529
|
+
static ensure_required_keys(analytics: Analytics, obj: Record<string, string | number>): string[];
|
|
530
|
+
/**
|
|
531
|
+
* takes an Object and plucks what the Analytics service
|
|
532
|
+
* considers to be valid keys
|
|
533
|
+
*/
|
|
534
|
+
static pluck_valid_keys(analytics: Analytics, obj: Record<string, string | number>): {};
|
|
535
|
+
/**
|
|
536
|
+
* Assigns the metadata to the analytics.metadata
|
|
537
|
+
* only will propagate valid keys
|
|
538
|
+
*
|
|
539
|
+
* @param analytics - The Analytics object
|
|
540
|
+
* @param metadata - The metadata to assign
|
|
541
|
+
*/
|
|
542
|
+
static mergeMetadata(analytics: Analytics, metadata?: {}): Analytics;
|
|
543
|
+
events: string[];
|
|
544
|
+
required_keys: string[];
|
|
545
|
+
optional_keys: string[];
|
|
546
|
+
valid_keys: string[];
|
|
547
|
+
metadata: Metadata_2;
|
|
548
|
+
/**
|
|
549
|
+
* Construct a new Analytics tracking object
|
|
550
|
+
*/
|
|
551
|
+
constructor(emitter: Listenable, opts?: Partial<AnalyticsOpts>);
|
|
552
|
+
wireup(): void;
|
|
553
|
+
destroy(): void;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
declare type AnalyticsOpts = {
|
|
557
|
+
metadata: Metadata_2;
|
|
558
|
+
required_keys: string[];
|
|
559
|
+
events: string[];
|
|
560
|
+
optional_keys: string[];
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
/* Excluded from this release type: AnyLoader */
|
|
564
|
+
|
|
565
|
+
declare type ArrayToIntersection<T extends Array<unknown>> = T extends [
|
|
566
|
+
infer Current,
|
|
567
|
+
...infer Remaining
|
|
568
|
+
] ? Current & ArrayToIntersection<Remaining> : unknown;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Each loader must
|
|
572
|
+
*/
|
|
573
|
+
declare type _AttachedEventCheck = {
|
|
574
|
+
on(event: `${string}:attached`, handler: (e: FPEvent<unknown>) => void): Player;
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
/* Excluded from this release type: AUDIO_ONLY_SOURCE */
|
|
578
|
+
|
|
579
|
+
/* Excluded from this release type: AudioOnlySourceEventDetail */
|
|
580
|
+
|
|
581
|
+
declare const AUTOPLAY = "is-autoplay";
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* @public
|
|
585
|
+
*/
|
|
586
|
+
declare type Autoplay = BitOpts | boolean;
|
|
587
|
+
|
|
588
|
+
declare enum AutoplayOpts {
|
|
589
|
+
OFF = 0,
|
|
590
|
+
ON = 1,
|
|
591
|
+
AUDIO_REQUIRED = 2
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* @public
|
|
596
|
+
*/
|
|
597
|
+
export declare type BaseAdObj = {
|
|
598
|
+
/**
|
|
599
|
+
* Defines an adTag URL to load VAST from. Several tags can be configured for waterfalling.
|
|
600
|
+
*/
|
|
601
|
+
adTag: string | string[] | LazyAdTag;
|
|
602
|
+
/**
|
|
603
|
+
* Determines if the ad should attempt to restart the content. Default value is true.
|
|
604
|
+
*/
|
|
605
|
+
restart?: boolean;
|
|
606
|
+
/* Excluded from this release type: lazy */
|
|
607
|
+
/**
|
|
608
|
+
* Indicates if the ad is an outstream ad.
|
|
609
|
+
*/
|
|
610
|
+
outstream?: boolean;
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
/* Excluded from this release type: BEFORE_PAUSE */
|
|
614
|
+
|
|
615
|
+
/* Excluded from this release type: BEFORE_PLAY */
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* @public
|
|
619
|
+
*/
|
|
620
|
+
declare type BeforePauseEventDetail = {
|
|
621
|
+
forced: boolean;
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* @public
|
|
626
|
+
*/
|
|
627
|
+
declare type BeforePlayEventDetail = {
|
|
628
|
+
forced: boolean;
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* @public
|
|
633
|
+
*/
|
|
634
|
+
declare type BitOpts = number;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* @public
|
|
638
|
+
*/
|
|
639
|
+
declare const /**
|
|
640
|
+
@public
|
|
641
|
+
* when a new player is inserted into the HTML
|
|
642
|
+
*/ /**
|
|
643
|
+
* @public
|
|
644
|
+
*/
|
|
645
|
+
CAN_PLAY = "canplay";
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* @public
|
|
649
|
+
*/
|
|
650
|
+
declare const /**
|
|
651
|
+
@public
|
|
652
|
+
* when a new player is inserted into the HTML
|
|
653
|
+
*/ /**
|
|
654
|
+
* @public
|
|
655
|
+
*/
|
|
656
|
+
CLICK = "click";
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* For plugins that add new properties to all source types, combine their src-mixins into one SourceObject
|
|
660
|
+
* @example
|
|
661
|
+
* ```
|
|
662
|
+
* type Combined = CombineGlobalSrcExtensions<DRMPlugin, PluginWithFooFieldInSrc> // Combined = SourceObject<DRMConfig & FooFieldConfig>
|
|
663
|
+
* ```
|
|
664
|
+
*/
|
|
665
|
+
declare type CombineGlobalSrcExtensions<PluginSrcs extends unknown[]> = HasGlobalSrcExtensios<PluginSrcs> extends false ? SourceObj : SourceObj & ArrayToIntersection<PickGlobalSrcExtension<PluginSrcs>>;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* For plugins that define a new src type, make a union of all new src.type declarations
|
|
669
|
+
* @example
|
|
670
|
+
* ```
|
|
671
|
+
* type Combined = CombineNewSourceTypes<RTSPlugin, SSAIPlugin> // Combined = DRMConfig | FooFieldConfig
|
|
672
|
+
* ```
|
|
673
|
+
*/
|
|
674
|
+
declare type CombineNewSourceTypes<PluginSrcs extends unknown[]> = TupleToUnion<FilterNewSourceTypes<PluginSrcs>>;
|
|
675
|
+
|
|
676
|
+
declare type CombineSrc<PluginSrcs extends unknown[]> = UnsafeSource<CombineGlobalSrcExtensions<PluginSrcs> | (CombineNewSourceTypes<PluginSrcs> & CombineGlobalSrcExtensions<PluginSrcs>)>;
|
|
677
|
+
|
|
678
|
+
/* Excluded from this release type: Component */
|
|
679
|
+
|
|
680
|
+
/* Excluded from this release type: Components */
|
|
681
|
+
|
|
682
|
+
/* Excluded from this release type: CONFIG */
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* @public
|
|
686
|
+
*/
|
|
687
|
+
declare interface Config {
|
|
688
|
+
src?: UnsafeSource;
|
|
689
|
+
preload?: "none" | "metadata" | "auto";
|
|
690
|
+
controls?: boolean;
|
|
691
|
+
lang?: string;
|
|
692
|
+
start_time?: number;
|
|
693
|
+
autopause?: boolean;
|
|
694
|
+
rewind?: boolean;
|
|
695
|
+
loop?: boolean;
|
|
696
|
+
/**
|
|
697
|
+
* an access token for the media
|
|
698
|
+
* @public
|
|
699
|
+
*/
|
|
700
|
+
playback_token?: string;
|
|
701
|
+
/* Excluded from this release type: seamless */
|
|
702
|
+
retry?: boolean;
|
|
703
|
+
autoplay?: Autoplay;
|
|
704
|
+
start_quality?: BitOpts;
|
|
705
|
+
live?: boolean;
|
|
706
|
+
poster?: string;
|
|
707
|
+
disabled?: boolean;
|
|
708
|
+
muted?: boolean;
|
|
709
|
+
/* Excluded from this release type: is_native */
|
|
710
|
+
/**
|
|
711
|
+
* bitflags for UI options
|
|
712
|
+
*/
|
|
713
|
+
ui?: BitOpts;
|
|
714
|
+
/**
|
|
715
|
+
* your user access token
|
|
716
|
+
*/
|
|
717
|
+
token?: string;
|
|
718
|
+
/* Excluded from this release type: duration */
|
|
719
|
+
/**
|
|
720
|
+
* can the content be seeked to any position
|
|
721
|
+
*/
|
|
722
|
+
seekable?: boolean;
|
|
723
|
+
multiplay?: boolean;
|
|
724
|
+
ratio?: number | string;
|
|
725
|
+
logo?: string;
|
|
726
|
+
logo_href?: string;
|
|
727
|
+
logo_alt_text?: string;
|
|
728
|
+
title?: string;
|
|
729
|
+
description?: string;
|
|
730
|
+
/**
|
|
731
|
+
* the number of seconds to have in the buffer before dvr is activated
|
|
732
|
+
*/
|
|
733
|
+
seconds_to_dvr?: number;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/* Excluded from this release type: ConfigEventDetail */
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* @public
|
|
740
|
+
*/
|
|
741
|
+
declare type ConfigWith<T> = Config & T;
|
|
742
|
+
|
|
743
|
+
declare type ConfigWithSourceExtensions<PluginBareConfigs extends unknown[]> = Omit<ConfigWith<ArrayToIntersection<PluginBareConfigs>>, "src"> & {
|
|
744
|
+
src?: CombineSrc<PickSrcExtensions<PluginBareConfigs>>;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
/* Excluded from this release type: CONTENT_REAL_LOAD_START */
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* @public
|
|
751
|
+
*/
|
|
752
|
+
declare const /**
|
|
753
|
+
@public
|
|
754
|
+
* when a new player is inserted into the HTML
|
|
755
|
+
*/ /**
|
|
756
|
+
* @public
|
|
757
|
+
*/
|
|
758
|
+
CONTEXT_MENU = "contextmenu";
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* @public
|
|
762
|
+
*/
|
|
763
|
+
declare type ContextMenuEventDetail = null;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* @public
|
|
767
|
+
*/
|
|
768
|
+
export declare type ControllerConfig = {
|
|
769
|
+
parameters: MacrosMap;
|
|
770
|
+
muted: boolean;
|
|
771
|
+
autoplay: boolean;
|
|
772
|
+
timeout: number;
|
|
773
|
+
show_all_ads_on_seek: boolean;
|
|
774
|
+
preload_advance: number;
|
|
775
|
+
preload_ads: boolean;
|
|
776
|
+
video_source: string;
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* @public
|
|
781
|
+
* @deprecated
|
|
782
|
+
* when a cuepoint becomes inactive
|
|
783
|
+
*/
|
|
784
|
+
declare const /**
|
|
785
|
+
@public
|
|
786
|
+
* when a new player is inserted into the HTML
|
|
787
|
+
*/ /**
|
|
788
|
+
* @public
|
|
789
|
+
* @deprecated
|
|
790
|
+
* when a cuepoint becomes inactive
|
|
791
|
+
*/
|
|
792
|
+
CUEPOINT_END = "cuepointend";
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* @public
|
|
796
|
+
* @deprecated
|
|
797
|
+
* when a cuepoint is active
|
|
798
|
+
*/
|
|
799
|
+
declare const /**
|
|
800
|
+
@public
|
|
801
|
+
* when a new player is inserted into the HTML
|
|
802
|
+
*/ /**
|
|
803
|
+
* @public
|
|
804
|
+
* @deprecated
|
|
805
|
+
* when a cuepoint is active
|
|
806
|
+
*/
|
|
807
|
+
CUEPOINT_START = "cuepointstart";
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* @public
|
|
811
|
+
* @deprecated
|
|
812
|
+
* cuepoints parsing is asynchronous
|
|
813
|
+
* you cannot rely on them existing until
|
|
814
|
+
* this event is emitted
|
|
815
|
+
*/
|
|
816
|
+
declare const /**
|
|
817
|
+
@public
|
|
818
|
+
* when a new player is inserted into the HTML
|
|
819
|
+
*/ /**
|
|
820
|
+
* @public
|
|
821
|
+
* @deprecated
|
|
822
|
+
* cuepoints parsing is asynchronous
|
|
823
|
+
* you cannot rely on them existing until
|
|
824
|
+
* this event is emitted
|
|
825
|
+
*/
|
|
826
|
+
CUEPOINTS = "cuepoints";
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* @public
|
|
830
|
+
*/
|
|
831
|
+
declare const /**
|
|
832
|
+
@public
|
|
833
|
+
* when a new player is inserted into the HTML
|
|
834
|
+
*/ /**
|
|
835
|
+
* @public
|
|
836
|
+
*/
|
|
837
|
+
DATA = "loadeddata";
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* @public
|
|
841
|
+
*/
|
|
842
|
+
declare const /**
|
|
843
|
+
@public
|
|
844
|
+
* when a new player is inserted into the HTML
|
|
845
|
+
*/ /**
|
|
846
|
+
* @public
|
|
847
|
+
*/
|
|
848
|
+
DBL_CLICK = "dblclick";
|
|
849
|
+
|
|
850
|
+
declare const DESTROYED = "is-destroyed";
|
|
851
|
+
|
|
852
|
+
/* Excluded from this release type: DeviceId */
|
|
853
|
+
|
|
854
|
+
declare const DISABLED = "is-disabled";
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* @public
|
|
858
|
+
*/
|
|
859
|
+
declare const /**
|
|
860
|
+
@public
|
|
861
|
+
* when a new player is inserted into the HTML
|
|
862
|
+
*/ /**
|
|
863
|
+
* @public
|
|
864
|
+
*/
|
|
865
|
+
DURATION_CHANGE = "durationchange";
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* @public
|
|
869
|
+
* when the player has started playing dvr content
|
|
870
|
+
*/
|
|
871
|
+
declare const /**
|
|
872
|
+
@public
|
|
873
|
+
* when a new player is inserted into the HTML
|
|
874
|
+
*/ /**
|
|
875
|
+
* @public
|
|
876
|
+
* when the player has started playing dvr content
|
|
877
|
+
*/
|
|
878
|
+
DVR = "dvr";
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* @public
|
|
882
|
+
*/
|
|
883
|
+
declare type DvrEventDetail = number;
|
|
884
|
+
|
|
885
|
+
declare const ENDED = "is-ended";
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* @public
|
|
889
|
+
*/
|
|
890
|
+
declare const /**
|
|
891
|
+
@public
|
|
892
|
+
* when a new player is inserted into the HTML
|
|
893
|
+
*/ /**
|
|
894
|
+
* @public
|
|
895
|
+
*/
|
|
896
|
+
ENDED_2 = "ended";
|
|
897
|
+
|
|
898
|
+
declare type EnsureOnAttached<P extends Function, T extends Player> = ExtractPureAPI<T> extends _AttachedEventCheck ? P : "Loaders must implement on('<pluginname>:attached') event";
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* @public
|
|
902
|
+
*/
|
|
903
|
+
declare const /**
|
|
904
|
+
@public
|
|
905
|
+
* when a new player is inserted into the HTML
|
|
906
|
+
*/ /**
|
|
907
|
+
* @public
|
|
908
|
+
*/
|
|
909
|
+
ERROR = "error";
|
|
910
|
+
|
|
911
|
+
declare const ERRORED = "is-error";
|
|
912
|
+
|
|
913
|
+
declare class EventBus {
|
|
914
|
+
private _bus;
|
|
915
|
+
private _listeners;
|
|
916
|
+
constructor(_bus?: HTMLDivElement, _listeners?: Array<[string, Listener]>);
|
|
917
|
+
removeAllListeners(): void;
|
|
918
|
+
emit<T>(eventName: string, detail: T): void;
|
|
919
|
+
on<T>(eventName: string, handler: Listener<T>): void;
|
|
920
|
+
once<T>(eventName: string, handler: Listener<T>): void;
|
|
921
|
+
removeListener(eventName: string, handler: Listener): void;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
declare namespace events {
|
|
925
|
+
export {
|
|
926
|
+
MOUNT,
|
|
927
|
+
RETRY,
|
|
928
|
+
ERROR,
|
|
929
|
+
CONTEXT_MENU,
|
|
930
|
+
CLICK,
|
|
931
|
+
DBL_CLICK,
|
|
932
|
+
KEYUP,
|
|
933
|
+
KEYDOWN,
|
|
934
|
+
LOAD,
|
|
935
|
+
MOUSE_ENTER,
|
|
936
|
+
MOUSE_LEAVE,
|
|
937
|
+
MOUSE_UP,
|
|
938
|
+
MOUSE_DOWN,
|
|
939
|
+
MOUSE_MOVE,
|
|
940
|
+
TOUCH_START,
|
|
941
|
+
TOUCH_MOVE,
|
|
942
|
+
TOUCH_END,
|
|
943
|
+
TOUCH_CANCEL,
|
|
944
|
+
RESIZE,
|
|
945
|
+
SCROLL,
|
|
946
|
+
FULLSCREEN_ENTER,
|
|
947
|
+
FULLSCREEN_EXIT,
|
|
948
|
+
FULLSCREEN_CHANGE,
|
|
949
|
+
METADATA,
|
|
950
|
+
DATA,
|
|
951
|
+
PROGRESS,
|
|
952
|
+
TIME_UPDATE,
|
|
953
|
+
LOAD_START,
|
|
954
|
+
VOLUME_CHANGE,
|
|
955
|
+
PAUSE,
|
|
956
|
+
PLAYING_2 as PLAYING,
|
|
957
|
+
PLAY,
|
|
958
|
+
WAITING_2 as WAITING,
|
|
959
|
+
CAN_PLAY,
|
|
960
|
+
ENDED_2 as ENDED,
|
|
961
|
+
SEEKED,
|
|
962
|
+
SEEKING_2 as SEEKING,
|
|
963
|
+
DURATION_CHANGE,
|
|
964
|
+
VIEW_ENTER,
|
|
965
|
+
VIEW_LEAVE,
|
|
966
|
+
SOURCE,
|
|
967
|
+
REAP,
|
|
968
|
+
QUALITIES,
|
|
969
|
+
QUALITY_CHANGE,
|
|
970
|
+
VIDEO_TRACKS,
|
|
971
|
+
SET_QUALITY,
|
|
972
|
+
VIDEO_TRACK_SELECT,
|
|
973
|
+
RECOMMENDATIONS_READY,
|
|
974
|
+
LANDSCAPE,
|
|
975
|
+
PORTRAIT,
|
|
976
|
+
DVR,
|
|
977
|
+
LIVE,
|
|
978
|
+
RECOVER,
|
|
979
|
+
CUEPOINTS,
|
|
980
|
+
CUEPOINT_START,
|
|
981
|
+
CUEPOINT_END,
|
|
982
|
+
STANDARD_ERROR
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
declare namespace events_2 {
|
|
987
|
+
export {
|
|
988
|
+
AD_PLAYBACK_ERROR,
|
|
989
|
+
AD_TEARDOWN,
|
|
990
|
+
AD_VIDEOTAG_ATTACHED,
|
|
991
|
+
AD_REQUEST_ERROR,
|
|
992
|
+
AD_REQUESTED,
|
|
993
|
+
AD_REQUEST_COMPLETED,
|
|
994
|
+
AD_PAUSE_CONTENT,
|
|
995
|
+
AD_STARTED,
|
|
996
|
+
AD_COMPLETED,
|
|
997
|
+
AD_PAUSED,
|
|
998
|
+
AD_RESUMED,
|
|
999
|
+
AD_PROGRESS,
|
|
1000
|
+
AD_SKIPPED,
|
|
1001
|
+
AD_MUTED,
|
|
1002
|
+
AD_VOLUME_CHANGED,
|
|
1003
|
+
AD_TIMEOUT,
|
|
1004
|
+
AD_BREAK_COMPLETED,
|
|
1005
|
+
AD_POSTROLL_FINISHED,
|
|
1006
|
+
AD_PREROLL_FINSIHED,
|
|
1007
|
+
IMA_ADAPTER_INIT,
|
|
1008
|
+
IMA_BEFORE_ADS_REQUEST,
|
|
1009
|
+
IMA_ADS_RENDERING_SETTINGS,
|
|
1010
|
+
ADAPTER_INIT_FAILED,
|
|
1011
|
+
AD_PLAY_REQUESTED,
|
|
1012
|
+
RELOAD_AD_REQUESTED,
|
|
1013
|
+
REQUEST_AD_PAUSE,
|
|
1014
|
+
REQUEST_AD_PLAY,
|
|
1015
|
+
REQUEST_AD_MUTE_UNMUTE,
|
|
1016
|
+
PBJS_AVAILABLE
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
declare type ExtractBareConfig<Plugins extends PluginCtor> = Plugins extends PluginCtor<ConfigWith<infer ConfigType>> ? ConfigType : never;
|
|
1021
|
+
|
|
1022
|
+
declare type ExtractPluginPlayerExtension<Plugin extends PluginCtor> = Plugin extends PluginCtor<infer _uConfigType, PlayerWith<infer PluginPlayer>> ? PluginPlayer : never;
|
|
1023
|
+
|
|
1024
|
+
declare type ExtractPureAPI<T> = T extends PlayerWith<infer PureAPI> ? PureAPI : never;
|
|
1025
|
+
|
|
1026
|
+
declare type ExtractSrcExtension<PluginBareConfig> = Get<PluginBareConfig, "src"> extends UnsafeSource<infer SrcMixinType> ? SrcMixinType : never;
|
|
1027
|
+
|
|
1028
|
+
declare const FEATURE_USAGE = "flowplayer:feature";
|
|
1029
|
+
|
|
1030
|
+
/* Excluded from this release type: FeatureUsageEventDetail */
|
|
1031
|
+
|
|
1032
|
+
declare type FilterNewSourceTypes<PluginSrcs extends unknown[]> = {
|
|
1033
|
+
[Index in keyof PluginSrcs]: PluginSrcs[Index] extends {
|
|
1034
|
+
type: string;
|
|
1035
|
+
} ? PluginSrcs[Index] : never;
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
declare namespace Flags_2 {
|
|
1039
|
+
export {
|
|
1040
|
+
STICKY_CONTROLS,
|
|
1041
|
+
NO_FULLSCREEN,
|
|
1042
|
+
NO_AD_INDICATOR,
|
|
1043
|
+
AD_ATTRIBUTION,
|
|
1044
|
+
AD_CHOICES,
|
|
1045
|
+
REMAINING_TIME,
|
|
1046
|
+
VOLUME_BAR
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* @public
|
|
1052
|
+
*/
|
|
1053
|
+
declare type FlowplayerCustomElementRegistry = Map<string, string>;
|
|
1054
|
+
|
|
1055
|
+
declare class FlowplayerError extends Error {
|
|
1056
|
+
readonly message: string;
|
|
1057
|
+
readonly flowplayerErrorCode: FlowplayerErrorCode;
|
|
1058
|
+
readonly config: FlowplayerErrorConfig;
|
|
1059
|
+
static getErrorKey(code: FlowplayerErrorCode): FlowplayerErrorCodeName;
|
|
1060
|
+
readonly id: string;
|
|
1061
|
+
readonly isFatal: boolean;
|
|
1062
|
+
readonly errorKey: string;
|
|
1063
|
+
constructor(message: string, flowplayerErrorCode: FlowplayerErrorCode, config?: FlowplayerErrorConfig);
|
|
1064
|
+
toJSON(): {
|
|
1065
|
+
message: string;
|
|
1066
|
+
flowplayer_error_code: FlowplayerErrorCode;
|
|
1067
|
+
id: string;
|
|
1068
|
+
root_error_id: string | undefined;
|
|
1069
|
+
resource: string | undefined;
|
|
1070
|
+
is_fatal: boolean;
|
|
1071
|
+
is_retry: boolean;
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
declare type FlowplayerErrorCode = (typeof FlowplayerErrorCodeMap)[keyof typeof FlowplayerErrorCodeMap];
|
|
1076
|
+
|
|
1077
|
+
declare const FlowplayerErrorCodeMap: {
|
|
1078
|
+
/** Unknown */
|
|
1079
|
+
readonly Unknown: "00-00";
|
|
1080
|
+
/** Media Section */
|
|
1081
|
+
readonly MediaUnknown: "01-00";
|
|
1082
|
+
readonly MediaUnavailable: "01-01";
|
|
1083
|
+
readonly MediaUnsupportedVideoFormat: "01-02";
|
|
1084
|
+
readonly MediaUnsupportedAudioFormat: "01-03";
|
|
1085
|
+
readonly MediaBitrateExceeded: "01-04";
|
|
1086
|
+
readonly MediaBufferOverread: "01-05";
|
|
1087
|
+
readonly MediaIntegerOverflow: "01-06";
|
|
1088
|
+
readonly MediaQuotaExceeded: "01-07";
|
|
1089
|
+
readonly MediaInvalidCompositionDuration: "01-08";
|
|
1090
|
+
readonly MediaInvalidCompositionSourceDuration: "01-09";
|
|
1091
|
+
readonly MediaInvalidCompositionSourceStartTime: "01-10";
|
|
1092
|
+
readonly MediaMalformedDepth: "01-11";
|
|
1093
|
+
/** Playback Section */
|
|
1094
|
+
readonly PlaybackUnknown: "02-00";
|
|
1095
|
+
readonly PlaybackVideoBufferUnderRun: "02-01";
|
|
1096
|
+
readonly PlaybackAudioBufferUnderRun: "02-02";
|
|
1097
|
+
readonly PlaybackVideoBufferingTimeout: "02-03";
|
|
1098
|
+
readonly PlaybackAudioBufferingTimeout: "02-04";
|
|
1099
|
+
readonly PlaybackManifestParseError: "02-05";
|
|
1100
|
+
readonly PlaybackVideoDecodeError: "02-06";
|
|
1101
|
+
readonly PlaybackAudioDecodeError: "02-07";
|
|
1102
|
+
readonly PlaybackDroppedFramesExceeded: "02-08";
|
|
1103
|
+
readonly PlaybackPlayheadExceedsDuration: "02-09";
|
|
1104
|
+
readonly PlaybackUnsupportedDevice: "02-10";
|
|
1105
|
+
readonly PlaybackManifestLoadError: "02-11";
|
|
1106
|
+
readonly PlaybackManifestLoadTimeout: "02-12";
|
|
1107
|
+
readonly PlaybackManifestParsingError: "02-13";
|
|
1108
|
+
readonly PlaybackManifestIncompatibleCodecs: "02-14";
|
|
1109
|
+
readonly PlaybackLevelEmptyError: "02-15";
|
|
1110
|
+
readonly PlaybackLevelLoadError: "02-16";
|
|
1111
|
+
readonly PlaybackLevelLoadTimeout: "02-17";
|
|
1112
|
+
readonly PlaybackLevelSwitchError: "02-18";
|
|
1113
|
+
readonly PlaybackAudioTrackLoadError: "02-19";
|
|
1114
|
+
readonly PlaybackAudioTrackLoadTimeout: "02-20";
|
|
1115
|
+
readonly PlaybackFragLoadError: "02-21";
|
|
1116
|
+
readonly PlaybackFragLoadTimeout: "02-22";
|
|
1117
|
+
readonly PlaybackFragDecryptError: "02-23";
|
|
1118
|
+
readonly PlaybackFragParsingError: "02-24";
|
|
1119
|
+
readonly PlaybackFragGap: "02-25";
|
|
1120
|
+
readonly PlaybackRemuxAllocError: "02-26";
|
|
1121
|
+
readonly PlaybackBufferAddCodecError: "02-27";
|
|
1122
|
+
readonly PlaybackBufferIncompatibleCodecs: "02-28";
|
|
1123
|
+
readonly PlaybackBufferAppendError: "02-29";
|
|
1124
|
+
readonly PlaybackBufferStalledError: "02-30";
|
|
1125
|
+
readonly PlaybackBufferFullError: "02-31";
|
|
1126
|
+
readonly PlaybackBufferSeekOverHole: "02-32";
|
|
1127
|
+
readonly PlaybackBufferNudgeOnStall: "02-33";
|
|
1128
|
+
readonly PlaybackInternalException: "02-34";
|
|
1129
|
+
readonly PlaybackInternalAborted: "02-35";
|
|
1130
|
+
readonly PlaybackManifestLoaderFailure: "02-36";
|
|
1131
|
+
readonly PlaybackSegmentBaseLoaderError: "02-37";
|
|
1132
|
+
readonly PlaybackTimeSyncFailed: "02-38";
|
|
1133
|
+
readonly PlaybackFragmentLoaderFailure: "02-39";
|
|
1134
|
+
readonly PlaybackAppendError: "02-40";
|
|
1135
|
+
readonly PlaybackRemoveError: "02-41";
|
|
1136
|
+
readonly PlaybackDataUpdateFailed: "02-42";
|
|
1137
|
+
readonly PlaybackManifestNoStreams: "02-43";
|
|
1138
|
+
readonly PlaybackUnknownManifestType: "02-44";
|
|
1139
|
+
readonly PlaybackDashInsufficientSegmentInfo: "02-45";
|
|
1140
|
+
readonly PlaybackDashNoRepresentations: "02-46";
|
|
1141
|
+
readonly PlaybackDashNoAdaptationSets: "02-47";
|
|
1142
|
+
readonly PlaybackDashNoInitSegment: "02-48";
|
|
1143
|
+
readonly PlaybackDashUnsupportedContainerFormat: "02-49";
|
|
1144
|
+
readonly PlaybackDashKeySystemMismatch: "02-50";
|
|
1145
|
+
readonly PlaybackMultipleKeyIDs: "02-51";
|
|
1146
|
+
readonly PlaybackDashConflictingKeyIDs: "02-52";
|
|
1147
|
+
readonly PlaybackRestrictedStreams: "02-53";
|
|
1148
|
+
readonly PlaybackHlsMasterAndMediaTags: "02-54";
|
|
1149
|
+
readonly PlaybackRepresentationIdConflict: "02-55";
|
|
1150
|
+
readonly PlaybackHlsUnsupportedKeyFormats: "02-56";
|
|
1151
|
+
readonly PlaybackManifestNoVariants: "02-57";
|
|
1152
|
+
readonly PlaybackHlsUndeclaredVariables: "02-58";
|
|
1153
|
+
readonly PlaybackAes128InvalidKeyLength: "02-59";
|
|
1154
|
+
readonly PlaybackDashConflictingAes128Keys: "02-60";
|
|
1155
|
+
readonly PlaybackDashUnsupportedAes128Encryption: "02-61";
|
|
1156
|
+
readonly PlaybackManifestPatchMismatch: "02-62";
|
|
1157
|
+
readonly PlaybackEmptyMediaPlaylist: "02-63";
|
|
1158
|
+
readonly PlaybackNonContiguousCompositionTrack: "02-64";
|
|
1159
|
+
readonly PlaybackDecoderNotFound: "02-65";
|
|
1160
|
+
readonly PlaybackDecoderTemporarilyUnavailable: "02-66";
|
|
1161
|
+
readonly PlaybackIncompatibleAsset: "02-67";
|
|
1162
|
+
readonly PlaybackNoCompatibleExternalDisplay: "02-69";
|
|
1163
|
+
readonly PlaybackOutOfMemory: "02-70";
|
|
1164
|
+
readonly PlaybackToneMappingFailed: "02-71";
|
|
1165
|
+
readonly PlaybackVideoCompositorFailed: "02-72";
|
|
1166
|
+
/** Network Section */
|
|
1167
|
+
readonly NetworkUnknown: "03-00";
|
|
1168
|
+
readonly NetworkNoInternet: "03-01";
|
|
1169
|
+
readonly NetworkRequestTimeout: "03-02";
|
|
1170
|
+
readonly NetworkUnableToResolveHost: "03-03";
|
|
1171
|
+
readonly NetworkResourceNotFound: "03-04";
|
|
1172
|
+
readonly NetworkExpiredUrl: "03-05";
|
|
1173
|
+
readonly NetworkUrlResolutionFailed: "03-06";
|
|
1174
|
+
readonly NetworkDownloadErrorIdManifest: "03-07";
|
|
1175
|
+
readonly NetworkDownloadErrorIdSidx: "03-08";
|
|
1176
|
+
readonly NetworkDownloadErrorIdContent: "03-09";
|
|
1177
|
+
readonly NetworkDownloadErrorIdInitialization: "03-10";
|
|
1178
|
+
readonly NetworkDownloadErrorIdXlink: "03-11";
|
|
1179
|
+
readonly NetworkHttpRequestFailed: "03-12";
|
|
1180
|
+
readonly NetworkMaxRetriesExceeded: "03-13";
|
|
1181
|
+
readonly NetworkSegmentMissing: "03-14";
|
|
1182
|
+
/** HTTP Error Codes */
|
|
1183
|
+
readonly NetworkHttp400BadRequest: "03-400";
|
|
1184
|
+
readonly NetworkHttp401Unauthorized: "03-401";
|
|
1185
|
+
readonly NetworkHttp402PaymentRequired: "03-402";
|
|
1186
|
+
readonly NetworkHttp403Forbidden: "03-403";
|
|
1187
|
+
readonly NetworkHttp404NotFound: "03-404";
|
|
1188
|
+
readonly NetworkHttp405MethodNotAllowed: "03-405";
|
|
1189
|
+
readonly NetworkHttp406NotAcceptable: "03-406";
|
|
1190
|
+
readonly NetworkHttp407ProxyAuthenticationRequired: "03-407";
|
|
1191
|
+
readonly NetworkHttp408RequestTimeout: "03-408";
|
|
1192
|
+
readonly NetworkHttp409Conflict: "03-409";
|
|
1193
|
+
readonly NetworkHttp410Gone: "03-410";
|
|
1194
|
+
readonly NetworkHttp411LengthRequired: "03-411";
|
|
1195
|
+
readonly NetworkHttp412PreconditionFailed: "03-412";
|
|
1196
|
+
readonly NetworkHttp413PayloadTooLarge: "03-413";
|
|
1197
|
+
readonly NetworkHttp414URITooLong: "03-414";
|
|
1198
|
+
readonly NetworkHttp415UnsupportedMediaType: "03-415";
|
|
1199
|
+
readonly NetworkHttp416RangeNotSatisfiable: "03-416";
|
|
1200
|
+
readonly NetworkHttp417ExpectationFailed: "03-417";
|
|
1201
|
+
readonly NetworkHttp418ImATeapot: "03-418";
|
|
1202
|
+
readonly NetworkHttp421MisdirectedRequest: "03-421";
|
|
1203
|
+
readonly NetworkHttp422UnprocessableEntity: "03-422";
|
|
1204
|
+
readonly NetworkHttp423Locked: "03-423";
|
|
1205
|
+
readonly NetworkHttp424FailedDependency: "03-424";
|
|
1206
|
+
readonly NetworkHttp425TooEarly: "03-425";
|
|
1207
|
+
readonly NetworkHttp426UpgradeRequired: "03-426";
|
|
1208
|
+
readonly NetworkHttp428PreconditionRequired: "03-428";
|
|
1209
|
+
readonly NetworkHttp429TooManyRequests: "03-429";
|
|
1210
|
+
readonly NetworkHttp431RequestHeaderFieldsTooLarge: "03-431";
|
|
1211
|
+
readonly NetworkHttp451UnavailableForLegalReasons: "03-451";
|
|
1212
|
+
readonly NetworkHttp500InternalServerError: "03-500";
|
|
1213
|
+
readonly NetworkHttp501NotImplemented: "03-501";
|
|
1214
|
+
readonly NetworkHttp502BadGateway: "03-502";
|
|
1215
|
+
readonly NetworkHttp503ServiceUnavailable: "03-503";
|
|
1216
|
+
readonly NetworkHttp504GatewayTimeout: "03-504";
|
|
1217
|
+
readonly NetworkHttp505HTTPVersionNotSupported: "03-505";
|
|
1218
|
+
readonly NetworkHttp506VariantAlsoNegotiates: "03-506";
|
|
1219
|
+
readonly NetworkHttp507InsufficientStorage: "03-507";
|
|
1220
|
+
readonly NetworkHttp508LoopDetected: "03-508";
|
|
1221
|
+
readonly NetworkHttp510NotExtended: "03-510";
|
|
1222
|
+
readonly NetworkHttp511NetworkAuthenticationRequired: "03-511";
|
|
1223
|
+
/** Content Protection Section */
|
|
1224
|
+
readonly ContentProtectionUnknown: "04-00";
|
|
1225
|
+
readonly ContentProtectionConcurrentStreamLimitExceeded: "04-01";
|
|
1226
|
+
readonly ContentProtectionEntitlementRefused: "04-02";
|
|
1227
|
+
readonly ContentProtectionLicenseExpired: "04-03";
|
|
1228
|
+
readonly ContentProtectionBadLicenseRequest: "04-04";
|
|
1229
|
+
readonly ContentProtectionLicenseServerTimeout: "04-05";
|
|
1230
|
+
readonly ContentProtectionInsufficientHDCPSupport: "04-06";
|
|
1231
|
+
readonly ContentProtectionGeoRestricted: "04-07";
|
|
1232
|
+
readonly ContentProtectionParentalControlRestricted: "04-08";
|
|
1233
|
+
readonly ContentProtectionCDNUnauthorized: "04-09";
|
|
1234
|
+
readonly ContentProtectionInvalidAccessToken: "04-10";
|
|
1235
|
+
readonly ContentProtectionKeySystemNoKeys: "04-11";
|
|
1236
|
+
readonly ContentProtectionKeySystemNoAccess: "04-12";
|
|
1237
|
+
readonly ContentProtectionKeySystemNoSession: "04-13";
|
|
1238
|
+
readonly ContentProtectionKeySystemNoConfiguredLicense: "04-14";
|
|
1239
|
+
readonly ContentProtectionKeySystemCertificateRequestFailed: "04-15";
|
|
1240
|
+
readonly ContentProtectionKeySystemCertificateUpdateFailed: "04-16";
|
|
1241
|
+
/** Key System: Session update failed */
|
|
1242
|
+
readonly ContentProtectionKeySystemSessionUpdateFailed: "04-17";
|
|
1243
|
+
/** Key System: Status output restricted */
|
|
1244
|
+
readonly ContentProtectionKeySystemStatusOutputRestricted: "04-18";
|
|
1245
|
+
/** Key System: Status internal error */
|
|
1246
|
+
readonly ContentProtectionKeySystemStatusInternalError: "04-19";
|
|
1247
|
+
/** Key Load Error */
|
|
1248
|
+
readonly ContentProtectionKeyLoadError: "04-20";
|
|
1249
|
+
/** Key Load Timeout */
|
|
1250
|
+
readonly ContentProtectionKeyLoadTimeout: "04-21";
|
|
1251
|
+
/** Capability MediaKeys Error */
|
|
1252
|
+
readonly ContentProtectionCapabilityMediaKeysError: "04-22";
|
|
1253
|
+
/** Manifest indicated protected content, but unable to determine key systems */
|
|
1254
|
+
readonly ContentProtectionManifestKeySystemUnknown: "04-23";
|
|
1255
|
+
/**
|
|
1256
|
+
* None of the requested key system configurations are available.
|
|
1257
|
+
* Possible reasons:
|
|
1258
|
+
* - Key system not supported
|
|
1259
|
+
* - Requested features (e.g., persistent state) not supported
|
|
1260
|
+
* - User denied access in prompt
|
|
1261
|
+
* - Key system unavailable in insecure contexts (requires HTTPS)
|
|
1262
|
+
*/
|
|
1263
|
+
readonly ContentProtectionKeySystemUnavailable: "04-24";
|
|
1264
|
+
/** Browser found requested key system, but failed to create CDM instance */
|
|
1265
|
+
readonly ContentProtectionCDMCreationFailed: "04-25";
|
|
1266
|
+
/** Browser created CDM instance but failed to attach it to the video */
|
|
1267
|
+
readonly ContentProtectionCDMAttachFailed: "04-26";
|
|
1268
|
+
/** CDM rejected the server certificate (malformed or unsupported format) */
|
|
1269
|
+
readonly ContentProtectionCDMServerCertificateRejected: "04-27";
|
|
1270
|
+
/** CDM refused to create a session for unknown reasons */
|
|
1271
|
+
readonly ContentProtectionCDMSessionCreationFailed: "04-28";
|
|
1272
|
+
/** CDM unable to generate a license request due to malformed or unsupported init data */
|
|
1273
|
+
readonly ContentProtectionCDMLicenseRequestFailed: "04-29";
|
|
1274
|
+
/** License response rejected by the CDM (invalid/malformed response) */
|
|
1275
|
+
readonly ContentProtectionCDMLicenseResponseRejected: "04-30";
|
|
1276
|
+
/** Manifest does not specify DRM info, but content is encrypted */
|
|
1277
|
+
readonly ContentProtectionManifestMissingDRMInfo: "04-31";
|
|
1278
|
+
/** No license server was provided for the key system signaled by the manifest */
|
|
1279
|
+
readonly ContentProtectionLicenseServerMissing: "04-32";
|
|
1280
|
+
/** A required offline session was removed, affecting playback */
|
|
1281
|
+
readonly ContentProtectionOfflineSessionRemoved: "04-33";
|
|
1282
|
+
/** Error while executing init data transformation */
|
|
1283
|
+
readonly ContentProtectionInitDataTransformationError: "04-34";
|
|
1284
|
+
/** Server certificate request failed */
|
|
1285
|
+
readonly ContentProtectionServerCertificateRequestFailed: "04-35";
|
|
1286
|
+
/** HDCP version does not meet the requirements */
|
|
1287
|
+
readonly ContentProtectionInsufficientHDCPVersion: "04-36";
|
|
1288
|
+
/** Error when checking HDCP version */
|
|
1289
|
+
readonly ContentProtectionHDCPVersionCheckFailed: "04-37";
|
|
1290
|
+
/** Ads Section */
|
|
1291
|
+
readonly AdsUnknown: "08-00";
|
|
1292
|
+
readonly AdsVastParseError: "08-100";
|
|
1293
|
+
readonly AdsInvalidVastSchema: "08-101";
|
|
1294
|
+
readonly AdsVastVersionNotSupported: "08-102";
|
|
1295
|
+
readonly AdsUnexpectedAdType: "08-200";
|
|
1296
|
+
readonly AdsCreativeLinearityMismatch: "08-201";
|
|
1297
|
+
readonly AdsCreativeDurationMismatch: "08-202";
|
|
1298
|
+
readonly AdsCreativeSizeMismatch: "08-203";
|
|
1299
|
+
readonly AdsWrapperVastError: "08-300";
|
|
1300
|
+
readonly AdsVastResponseRedirectTimeout: "08-301";
|
|
1301
|
+
readonly AdsWrapperLimitReached: "08-302";
|
|
1302
|
+
readonly AdsVastResponseEmpty: "08-303";
|
|
1303
|
+
readonly AdsLinearAdDisplayError: "08-400";
|
|
1304
|
+
readonly AdsMediaFileNotFound: "08-401";
|
|
1305
|
+
readonly AdsMediaFileUnavailable: "08-402";
|
|
1306
|
+
readonly AdsUnsupportedMimeType: "08-403";
|
|
1307
|
+
readonly AdsUnableToDisplayMediaFile: "08-405";
|
|
1308
|
+
readonly AdsMezzanineFileMissing: "08-406";
|
|
1309
|
+
readonly AdsMezzanineFileDownloaded: "08-407";
|
|
1310
|
+
readonly AdsRejectedAd: "08-408";
|
|
1311
|
+
readonly AdsInteractiveCreativeError: "08-409";
|
|
1312
|
+
readonly AdsVerificationNodeExecutionError: "08-410";
|
|
1313
|
+
readonly AdsNonLinearAdDisplayError: "08-500";
|
|
1314
|
+
readonly AdsNonLinearAdSizeMismatch: "08-501";
|
|
1315
|
+
readonly AdsNonLinearAdFetchError: "08-502";
|
|
1316
|
+
readonly AdsNonLinearUnsupportedType: "08-503";
|
|
1317
|
+
readonly AdsCompanionAdDisplayError: "08-600";
|
|
1318
|
+
readonly AdsCompanionAdSizeMismatch: "08-601";
|
|
1319
|
+
readonly AdsRequiredCompanionAdError: "08-602";
|
|
1320
|
+
readonly AdsCompanionAdFetchError: "08-603";
|
|
1321
|
+
readonly AdsUndefinedVastError: "08-900";
|
|
1322
|
+
readonly AdsUnknownVpaidError: "08-901";
|
|
1323
|
+
readonly AdsVastDocumentEmpty: "08-999";
|
|
1324
|
+
};
|
|
1325
|
+
|
|
1326
|
+
declare type FlowplayerErrorCodeName = keyof typeof FlowplayerErrorCodeMap;
|
|
1327
|
+
|
|
1328
|
+
declare type FlowplayerErrorConfig = Partial<{
|
|
1329
|
+
isFatal: boolean;
|
|
1330
|
+
showErrorUI: boolean;
|
|
1331
|
+
isRetry: boolean;
|
|
1332
|
+
resource: string;
|
|
1333
|
+
rootErrorId: string;
|
|
1334
|
+
retryOpts: Partial<{
|
|
1335
|
+
retry: (typeof RetryMap)[keyof typeof RetryMap];
|
|
1336
|
+
retryTimeout: number;
|
|
1337
|
+
}>;
|
|
1338
|
+
}> & Record<string, any>;
|
|
1339
|
+
|
|
1340
|
+
declare type FlowplayerErrorEventDetail = {
|
|
1341
|
+
error: FlowplayerError;
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* @public
|
|
1346
|
+
*/
|
|
1347
|
+
declare type FlowplayerStates = typeof states;
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* @public
|
|
1351
|
+
*/
|
|
1352
|
+
declare interface FlowplayerUMD extends FlowplayerUMDBase {
|
|
1353
|
+
/**
|
|
1354
|
+
* Configure flowplayer and display it in the UI
|
|
1355
|
+
* @param selector - query selector of the HTML element where player will render
|
|
1356
|
+
* @param config - configuration of flowplayer
|
|
1357
|
+
*/
|
|
1358
|
+
(selector: string, config?: Config): Player;
|
|
1359
|
+
/**
|
|
1360
|
+
* Configure flowplayer and display it in the UI
|
|
1361
|
+
* @param element - HTML element where player will render
|
|
1362
|
+
* @param config - configuration of flowplayer
|
|
1363
|
+
*/
|
|
1364
|
+
(element: HTMLElement, config?: Config): Player;
|
|
1365
|
+
/**
|
|
1366
|
+
* Configure flowplayer and display it in the UI
|
|
1367
|
+
* @param selector - query selector of the HTML element where player will render
|
|
1368
|
+
* @param config - configuration of flowplayer
|
|
1369
|
+
*/
|
|
1370
|
+
<T>(selector: string, config?: ConfigWith<T>): Player;
|
|
1371
|
+
/**
|
|
1372
|
+
* Configure flowplayer and display it in the UI
|
|
1373
|
+
* @param element - HTML element where player will render
|
|
1374
|
+
* @param config - configuration of flowplayer
|
|
1375
|
+
*/
|
|
1376
|
+
<T>(element: HTMLElement, config?: ConfigWith<T>): Player;
|
|
1377
|
+
/**
|
|
1378
|
+
* Register plugins in flowplayer
|
|
1379
|
+
* @returns flowplayer instance with registered plugins
|
|
1380
|
+
*/
|
|
1381
|
+
<PluginCtors extends PluginCtor[]>(...plugins: PluginCtors): FlowplayerUMDWithPlugins<MergeConfigs<PluginCtors>, PlayerWith<MergePlayerExtensions<PluginCtors>>>;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
declare interface FlowplayerUMDBase {
|
|
1385
|
+
/**
|
|
1386
|
+
* All player instances on the page
|
|
1387
|
+
*/
|
|
1388
|
+
instances: Player[];
|
|
1389
|
+
/**
|
|
1390
|
+
* Flowplayer core events
|
|
1391
|
+
*/
|
|
1392
|
+
events: typeof events;
|
|
1393
|
+
/**
|
|
1394
|
+
* Flowplayer ui states map
|
|
1395
|
+
*/
|
|
1396
|
+
states: FlowplayerStates;
|
|
1397
|
+
/**
|
|
1398
|
+
* Flowplayer errors map
|
|
1399
|
+
*/
|
|
1400
|
+
errors: typeof FlowplayerErrorCodeMap;
|
|
1401
|
+
quality: typeof QualityOpts;
|
|
1402
|
+
autoplay: typeof AutoplayOpts;
|
|
1403
|
+
commit: string;
|
|
1404
|
+
version: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* Flowplayer's custom element registry
|
|
1407
|
+
*/
|
|
1408
|
+
customElements: FlowplayerCustomElementRegistry;
|
|
1409
|
+
/* Excluded from this release type: extensions */
|
|
1410
|
+
/* Excluded from this release type: defaultElements */
|
|
1411
|
+
/* Excluded from this release type: components */
|
|
1412
|
+
/* Excluded from this release type: support */
|
|
1413
|
+
/* Excluded from this release type: jwt */
|
|
1414
|
+
/* Excluded from this release type: loaders */
|
|
1415
|
+
/**
|
|
1416
|
+
* @public
|
|
1417
|
+
* Translations dictionaries to be used with `@flowplayer/translations` package
|
|
1418
|
+
*
|
|
1419
|
+
* See [official documentation](https://developer.wowza.com/docs/wowza-flowplayer/player/translations/)
|
|
1420
|
+
*/
|
|
1421
|
+
i18n: typeof I18n;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* @public
|
|
1426
|
+
*/
|
|
1427
|
+
declare interface FlowplayerUMDWithPlugins<ConfigWithPlugins extends Config = Config, PluginPlayer extends Player = Player> extends FlowplayerUMDBase {
|
|
1428
|
+
/**
|
|
1429
|
+
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
1430
|
+
* @param selector - query selector of the HTML element where player will render
|
|
1431
|
+
* @param config - Configuration of the flowplayer and the attached plugins
|
|
1432
|
+
*/
|
|
1433
|
+
(selector: string, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
1434
|
+
/**
|
|
1435
|
+
* Configure flowplayer, it's attached plugins and display flowplayer it in the UI
|
|
1436
|
+
* @param element - HTML element where player will render
|
|
1437
|
+
* @param config - Configuration of the flowplayer and the attached plugins
|
|
1438
|
+
*/
|
|
1439
|
+
(element: HTMLElement, config?: ConfigWithPlugins): PlayerWithOpts<PluginPlayer, ConfigWithPlugins>;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* @public
|
|
1444
|
+
*/
|
|
1445
|
+
declare interface FPEvent<T> extends CustomEvent<T> {
|
|
1446
|
+
/**
|
|
1447
|
+
* @deprecated
|
|
1448
|
+
the data attribute has been migrated to details to match the CustomEvent spec
|
|
1449
|
+
more info: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
|
1450
|
+
*/
|
|
1451
|
+
data?: T;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
declare const FULLSCREEN = "is-fullscreen";
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* @public
|
|
1458
|
+
*/
|
|
1459
|
+
declare const /**
|
|
1460
|
+
@public
|
|
1461
|
+
* when a new player is inserted into the HTML
|
|
1462
|
+
*/ /**
|
|
1463
|
+
* @public
|
|
1464
|
+
*/
|
|
1465
|
+
FULLSCREEN_CHANGE = "fullscreenchange";
|
|
1466
|
+
|
|
1467
|
+
/**
|
|
1468
|
+
* @public
|
|
1469
|
+
*/
|
|
1470
|
+
declare const /**
|
|
1471
|
+
@public
|
|
1472
|
+
* when a new player is inserted into the HTML
|
|
1473
|
+
*/ /**
|
|
1474
|
+
* @public
|
|
1475
|
+
*/
|
|
1476
|
+
FULLSCREEN_ENTER = "fullscreenenter";
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* @public
|
|
1480
|
+
*/
|
|
1481
|
+
declare const /**
|
|
1482
|
+
@public
|
|
1483
|
+
* when a new player is inserted into the HTML
|
|
1484
|
+
*/ /**
|
|
1485
|
+
* @public
|
|
1486
|
+
*/
|
|
1487
|
+
FULLSCREEN_EXIT = "fullscreenexit";
|
|
1488
|
+
|
|
1489
|
+
export declare namespace google {
|
|
1490
|
+
/**
|
|
1491
|
+
* The Google IMA SDK for HTML5 V3 allows developers to request and track VAST ads in a HTML5 video environment. For platform compatibility information and a detailed list of the video ad features supported by each of the IMA SDKs, see Support and Compatibility.
|
|
1492
|
+
*
|
|
1493
|
+
* Download the code samples to assist with implementing the IMA HTML5 SDK.
|
|
1494
|
+
*/
|
|
1495
|
+
export namespace ima {
|
|
1496
|
+
/**
|
|
1497
|
+
* An ad class that's extended by classes representing different ad types.
|
|
1498
|
+
*/
|
|
1499
|
+
export interface Ad {
|
|
1500
|
+
/**
|
|
1501
|
+
* Ad ID is used to synchronize master ad and companion ads.
|
|
1502
|
+
* @returns The ID of the ad, or the empty string if this information is unavailable.
|
|
1503
|
+
*/
|
|
1504
|
+
getAdId(): string;
|
|
1505
|
+
/**
|
|
1506
|
+
* Returns the ad's pod information.
|
|
1507
|
+
* @returns The ad's pod information.
|
|
1508
|
+
*/
|
|
1509
|
+
getAdPodInfo(): AdPodInfo;
|
|
1510
|
+
/**
|
|
1511
|
+
* The source ad server information included in the ad response.
|
|
1512
|
+
* @returns The source ad server of the ad, or the empty string if this information is unavailable.
|
|
1513
|
+
*/
|
|
1514
|
+
getAdSystem(): string;
|
|
1515
|
+
/**
|
|
1516
|
+
* The advertiser name as defined by the serving party.
|
|
1517
|
+
* @returns The advertiser name, or the empty string if this information is unavailable.
|
|
1518
|
+
*/
|
|
1519
|
+
getAdvertiserName(): string;
|
|
1520
|
+
/**
|
|
1521
|
+
* Identifies the API needed to execute the ad. This corresponds with the apiFramework specified in vast.
|
|
1522
|
+
* @returns The API framework need to execute the ad, or null if this information is unavailable.
|
|
1523
|
+
*/
|
|
1524
|
+
getApiFramework(): string | null;
|
|
1525
|
+
/**
|
|
1526
|
+
* Gets the companion ads for this ad based on companion ad slot size. Optionally, advanced selection settings are accepted. Note that this method will only return non-empty array for ad instances acquired on or after STARTED event. Specifically, ads from the LOADED event will return an empty array.
|
|
1527
|
+
* @param adSlotWidth Width of the companion ad slot.
|
|
1528
|
+
* @param adSlotHeight Height of the companion ad slot.
|
|
1529
|
+
* @param settings The selection settings for companion ads.
|
|
1530
|
+
* @returns Array of companion ads that matches the settings and the slot size.
|
|
1531
|
+
*/
|
|
1532
|
+
getCompanionAds(
|
|
1533
|
+
adSlotWidth: number,
|
|
1534
|
+
adSlotHeight: number,
|
|
1535
|
+
settings?: CompanionAdSelectionSettings
|
|
1536
|
+
): CompanionAd[];
|
|
1537
|
+
/**
|
|
1538
|
+
* Returns the content type of the currently selected creative, or empty string if no creative is selected or the content type is unavailable. For linear ads, the content type is only going to be available after the START event, when the media file is selected.
|
|
1539
|
+
* @returns The content type, empty string if not available.
|
|
1540
|
+
*/
|
|
1541
|
+
getContentType(): string;
|
|
1542
|
+
/**
|
|
1543
|
+
* Returns the ISCI (Industry Standard Commercial Identifier) code for an ad, or empty string if the code is unavailable. This is the Ad-ID of the creative in the VAST response.
|
|
1544
|
+
*/
|
|
1545
|
+
getCreativeAdId(): string;
|
|
1546
|
+
/**
|
|
1547
|
+
* Retrieves the ID of the selected creative for the ad.
|
|
1548
|
+
* @returns The ID of the selected creative for the ad, or the empty string if this information is unavailable.
|
|
1549
|
+
*/
|
|
1550
|
+
getCreativeId(): string;
|
|
1551
|
+
/**
|
|
1552
|
+
* Returns the first deal ID present in the wrapper chain for the current ad, starting from the top. Returns the empty string if unavailable.
|
|
1553
|
+
*/
|
|
1554
|
+
getDealId(): string;
|
|
1555
|
+
/**
|
|
1556
|
+
* Returns the description of this ad from the VAST response.
|
|
1557
|
+
* @returns The description, empty if not specified.
|
|
1558
|
+
*/
|
|
1559
|
+
getDescription(): string;
|
|
1560
|
+
/**
|
|
1561
|
+
* Returns the duration of the selected creative, or -1 for non-linear creatives.
|
|
1562
|
+
* @returns The selected creative duration in seconds, -1 if non-linear.
|
|
1563
|
+
*/
|
|
1564
|
+
getDuration(): number;
|
|
1565
|
+
/**
|
|
1566
|
+
* Returns the height of the selected non-linear creative.
|
|
1567
|
+
* @returns The height of the selected non-linear creative or 0 for a linear creative.
|
|
1568
|
+
*/
|
|
1569
|
+
getHeight(): number;
|
|
1570
|
+
/**
|
|
1571
|
+
* Returns the URL of the media file chosen from the ad based on the media selection settings currently in use. Returns null if this information is unavailable. Available on STARTED event.
|
|
1572
|
+
*/
|
|
1573
|
+
getMediaUrl(): string | null;
|
|
1574
|
+
/**
|
|
1575
|
+
* Returns the minimum suggested duration in seconds that the nonlinear creative should be displayed. Returns -2 if the minimum suggested duration is unknown. For linear creative it returns the entire duration of the ad.
|
|
1576
|
+
* @returns The minimum suggested duration in seconds that a creative should be displayed.
|
|
1577
|
+
*/
|
|
1578
|
+
getMinSuggestedDuration(): number;
|
|
1579
|
+
/**
|
|
1580
|
+
* The number of seconds of playback before the ad becomes skippable. -1 is returned for non skippable ads or if this is unavailable.
|
|
1581
|
+
* @returns The offset in seconds, or -1.
|
|
1582
|
+
*/
|
|
1583
|
+
getSkipTimeOffset(): number;
|
|
1584
|
+
/**
|
|
1585
|
+
* Returns the URL associated with the survey for the given ad. Returns null if unavailable.
|
|
1586
|
+
*/
|
|
1587
|
+
getSurveyUrl(): string | null;
|
|
1588
|
+
/**
|
|
1589
|
+
* Returns the title of this ad from the VAST response.
|
|
1590
|
+
* @returns The title, empty if not specified.
|
|
1591
|
+
*/
|
|
1592
|
+
getTitle(): string;
|
|
1593
|
+
/**
|
|
1594
|
+
* Gets custom parameters associated with the ad at the time of ad trafficking.
|
|
1595
|
+
* @returns A mapping of trafficking keys to their values, or the empty Object if this information is not available.
|
|
1596
|
+
*/
|
|
1597
|
+
getTraffickingParameters(): any;
|
|
1598
|
+
/**
|
|
1599
|
+
* Gets custom parameters associated with the ad at the time of ad trafficking. Returns a raw string version of the parsed parameters from getTraffickingParameters.
|
|
1600
|
+
* @returns Trafficking parameters, or the empty string if this information is not available.
|
|
1601
|
+
*/
|
|
1602
|
+
getTraffickingParametersString(): string;
|
|
1603
|
+
/**
|
|
1604
|
+
* Returns the UI elements that are being displayed when this ad is played. Refer to UiElements for possible elements of the array returned.
|
|
1605
|
+
* @returns The UI elements being displayed.
|
|
1606
|
+
*/
|
|
1607
|
+
getUiElements(): UiElements[];
|
|
1608
|
+
/**
|
|
1609
|
+
* The registry associated with cataloging the UniversalAdId of the selected creative for the ad.
|
|
1610
|
+
* @returns Returns the registry value, or "unknown" if unavailable.
|
|
1611
|
+
*/
|
|
1612
|
+
getUniversalAdIdRegistry(): string;
|
|
1613
|
+
/**
|
|
1614
|
+
* The UniversalAdId of the selected creative for the ad.
|
|
1615
|
+
* @returns Returns the id value or "unknown" if unavailable.
|
|
1616
|
+
*/
|
|
1617
|
+
getUniversalAdIdValue(): string;
|
|
1618
|
+
/**
|
|
1619
|
+
* Returns the VAST media height of the selected creative.
|
|
1620
|
+
* @returns The VAST media height of the selected creative or 0 if none is selected.
|
|
1621
|
+
*/
|
|
1622
|
+
getVastMediaHeight(): number;
|
|
1623
|
+
/**
|
|
1624
|
+
* Returns the VAST media width of the selected creative.
|
|
1625
|
+
* @returns The VAST media width of the selected creative or 0 if none is selected.
|
|
1626
|
+
*/
|
|
1627
|
+
getVastMediaWidth(): number;
|
|
1628
|
+
/**
|
|
1629
|
+
* Returns the width of the selected creative.
|
|
1630
|
+
* @returns The width of the selected non-linear creative or 0 for a linear creative.
|
|
1631
|
+
*/
|
|
1632
|
+
getWidth(): number;
|
|
1633
|
+
/**
|
|
1634
|
+
* Ad IDs used for wrapper ads. The IDs returned starts at the inline ad (innermost) and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads.
|
|
1635
|
+
* @returns The IDs of the ads, starting at the inline ad, or an empty array if there are no wrapper ads.
|
|
1636
|
+
*/
|
|
1637
|
+
getWrapperAdIds(): string[];
|
|
1638
|
+
/**
|
|
1639
|
+
* Ad systems used for wrapper ads. The ad systems returned starts at the inline ad and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads.
|
|
1640
|
+
* @returns The ad systems of the ads, starting at the inline ad, or an empty array if there are no wrapper ads.
|
|
1641
|
+
*/
|
|
1642
|
+
getWrapperAdSystems(): string[];
|
|
1643
|
+
/**
|
|
1644
|
+
* Selected creative IDs used for wrapper ads. The creative IDs returned starts at the inline ad and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads.
|
|
1645
|
+
* @returns The IDs of the ads' creatives, starting at the inline ad, or an empty array if there are no wrapper ads.
|
|
1646
|
+
*/
|
|
1647
|
+
getWrapperCreativeIds(): string[];
|
|
1648
|
+
/**
|
|
1649
|
+
* Indicates whether the ad’s current mode of operation is linear or non-linear. If the value is true, it indicates that the ad is in linear playback mode; if false, it indicates non-linear mode. The player checks the linear property and updates its state according to the details of the ad placement. While the ad is in linear mode, the player pauses the content video. If linear is true initially, and the ad is a pre-roll (defined externally), the player may choose to delay loading the content video until near the end of the ad playback.
|
|
1650
|
+
* @returns True if the ad is linear, false otherwise.
|
|
1651
|
+
*/
|
|
1652
|
+
isLinear(): boolean;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* This class represents a container for displaying ads. The SDK will automatically create structures inside the containerElement parameter to house video and overlay ads.
|
|
1657
|
+
*
|
|
1658
|
+
* When an instance of this class is created, it creates an IFRAME in the containerElement and loads the SDK core. This IFRAME must be preserved in order for the SDK to function properly. Once all ads have been played and the SDK is no longer needed, use the destroy() method to unload the SDK.
|
|
1659
|
+
*
|
|
1660
|
+
* The containerElement parameter must be an element that is part of the DOM. It is necessary to correctly position the containerElement in order for the ads to be displayed correctly. It is recommended to position it above the content video player and size it to cover the whole video player. Please refer to the SDK documentation for details about recommended implementations.
|
|
1661
|
+
*/
|
|
1662
|
+
export class AdDisplayContainer {
|
|
1663
|
+
/**
|
|
1664
|
+
*
|
|
1665
|
+
* @param containerElement The element to display the ads in. The element must be inserted into the DOM before creating ima.AdDisplayContainer.
|
|
1666
|
+
* @param videoElement Specifies the alternative video ad playback element. We recommend always passing in your content video player. Refer to Custom Ad Playback for more information.
|
|
1667
|
+
* @param clickTrackingElement Specifies the alternative video ad click element. Leave this null to let the SDK handle clicks. Even if supplied, the SDK will only use the custom click tracking element when non-AdSense/AdX creatives are displayed in environments that do not support UI elements overlaying a video player (e.g. iPhone or pre-4.0 Android). The custom click tracking element should never be rendered over the video player because it can intercept clicks to UI elements that the SDK renders. Also note that the SDK will not modify the visibility of the custom click tracking element. This means that if a custom click tracking element is supplied, it must be properly displayed when the linear ad is played. You can check ima.AdsManager.isCustomClickTrackingUsed when the google.ima.AdEvent.Type.STARTED event is fired to determine whether or not to display your custom click tracking element. If appropriate for your UI, you should hide the click tracking element when the google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED event fires.
|
|
1668
|
+
*/
|
|
1669
|
+
constructor(
|
|
1670
|
+
containerElement: HTMLElement,
|
|
1671
|
+
videoElement?: HTMLVideoElement,
|
|
1672
|
+
clickTrackingElement?: HTMLElement
|
|
1673
|
+
);
|
|
1674
|
+
/**
|
|
1675
|
+
* Destroys internal state and previously created DOM elements. The IMA SDK will be unloaded and no further calls to any APIs should be made.
|
|
1676
|
+
*/
|
|
1677
|
+
public destroy(): void;
|
|
1678
|
+
/**
|
|
1679
|
+
* Initializes the video playback. On mobile platforms, including iOS and Android browsers, first interaction with video playback is only allowed within a user action (a click or tap) to prevent unexpected bandwidth costs. Call this method as a direct result of a user action before starting the ad playback. This method has no effect on desktop platforms and when custom video playback is used.
|
|
1680
|
+
*/
|
|
1681
|
+
public initialize(): void;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
/**
|
|
1685
|
+
* AdError surfaces information to the user about whether a failure occurred during ad loading or playing. The errorType accessor provides information about whether the error occurred during ad loading or ad playing.
|
|
1686
|
+
*/
|
|
1687
|
+
export class AdError extends Error {
|
|
1688
|
+
/**
|
|
1689
|
+
* Constructs the ad error based on the error data.
|
|
1690
|
+
* @param data The ad error message data.
|
|
1691
|
+
* @returns The constructed ad error object.
|
|
1692
|
+
*/
|
|
1693
|
+
public static deserialize(data: any): AdError;
|
|
1694
|
+
/**
|
|
1695
|
+
* @returns The error code, as defined in google.ima.AdError.ErrorCode.
|
|
1696
|
+
*/
|
|
1697
|
+
public getErrorCode(): AdError.ErrorCode;
|
|
1698
|
+
/**
|
|
1699
|
+
* Returns the Error that caused this one.
|
|
1700
|
+
* @returns Inner error that occurred during processing, or null if this information is unavailable. This error may either be a native error or an google.ima.AdError, a subclass of a native error. This may return null if the error that caused this one is not available.
|
|
1701
|
+
*/
|
|
1702
|
+
public getInnerError(): Error | null;
|
|
1703
|
+
/**
|
|
1704
|
+
* @returns The message for this error.
|
|
1705
|
+
*/
|
|
1706
|
+
public getMessage(): string;
|
|
1707
|
+
/**
|
|
1708
|
+
* @returns The type of this error, as defined in google.ima.AdError.Type.
|
|
1709
|
+
*/
|
|
1710
|
+
public getType(): string;
|
|
1711
|
+
/**
|
|
1712
|
+
* @returns If VAST error code is available, returns it, otherwise returns ima.AdError.ErrorCode.UNKNOWN_ERROR.
|
|
1713
|
+
*/
|
|
1714
|
+
public getVastErrorCode(): number;
|
|
1715
|
+
/**
|
|
1716
|
+
* Serializes an ad to JSON-friendly object for channel transmission.
|
|
1717
|
+
* @returns The transmittable ad error.
|
|
1718
|
+
*/
|
|
1719
|
+
public serialize(): any;
|
|
1720
|
+
public toString(): string;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
export namespace AdError {
|
|
1724
|
+
/**
|
|
1725
|
+
* The possible error codes raised while loading or playing ads.
|
|
1726
|
+
*/
|
|
1727
|
+
export enum ErrorCode {
|
|
1728
|
+
/**
|
|
1729
|
+
* There was a problem requesting ads from the server. VAST error code 1012
|
|
1730
|
+
*/
|
|
1731
|
+
ADS_REQUEST_NETWORK_ERROR = 1012,
|
|
1732
|
+
/**
|
|
1733
|
+
* There was an error with asset fallback. VAST error code 1021
|
|
1734
|
+
*/
|
|
1735
|
+
ASSET_FALLBACK_FAILED = 1021,
|
|
1736
|
+
/**
|
|
1737
|
+
* The browser prevented playback initiated without user interaction. VAST error code 1205
|
|
1738
|
+
*/
|
|
1739
|
+
AUTOPLAY_DISALLOWED = 1205,
|
|
1740
|
+
/**
|
|
1741
|
+
* A companion ad failed to load or render. VAST error code 603
|
|
1742
|
+
*/
|
|
1743
|
+
COMPANION_AD_LOADING_FAILED = 603,
|
|
1744
|
+
/**
|
|
1745
|
+
* Unable to display one or more required companions. The master ad is discarded since the required companions could not be displayed. VAST error code 602
|
|
1746
|
+
*/
|
|
1747
|
+
COMPANION_REQUIRED_ERROR = 602,
|
|
1748
|
+
/**
|
|
1749
|
+
* There was a problem requesting ads from the server. VAST error code 1005
|
|
1750
|
+
*/
|
|
1751
|
+
FAILED_TO_REQUEST_ADS = 1005,
|
|
1752
|
+
/**
|
|
1753
|
+
* The ad tag url specified was invalid. It needs to be properly encoded. VAST error code 1013
|
|
1754
|
+
*/
|
|
1755
|
+
INVALID_AD_TAG = 1013,
|
|
1756
|
+
/**
|
|
1757
|
+
* An invalid AdX extension was found. VAST error code 1105
|
|
1758
|
+
*/
|
|
1759
|
+
INVALID_ADX_EXTENSION = 1105,
|
|
1760
|
+
/**
|
|
1761
|
+
* Invalid arguments were provided to SDK methods. VAST error code 1101
|
|
1762
|
+
*/
|
|
1763
|
+
INVALID_ARGUMENTS = 1101,
|
|
1764
|
+
/**
|
|
1765
|
+
* Unable to display NonLinear ad because creative dimensions do not align with creative display area (i.e. creative dimension too large). VAST error code 501
|
|
1766
|
+
*/
|
|
1767
|
+
NONLINEAR_DIMENSIONS_ERROR = 501,
|
|
1768
|
+
/**
|
|
1769
|
+
* An overlay ad failed to load. VAST error code 502
|
|
1770
|
+
*/
|
|
1771
|
+
OVERLAY_AD_LOADING_FAILED = 502,
|
|
1772
|
+
/**
|
|
1773
|
+
* An overlay ad failed to render. VAST error code 500
|
|
1774
|
+
*/
|
|
1775
|
+
OVERLAY_AD_PLAYING_FAILED = 500,
|
|
1776
|
+
/**
|
|
1777
|
+
* There was an error with stream initialization during server side ad insertion. VAST error code 1020
|
|
1778
|
+
*/
|
|
1779
|
+
STREAM_INITIALIZATION_FAILED = 1020,
|
|
1780
|
+
/**
|
|
1781
|
+
* The ad response was not understood and cannot be parsed. VAST error code 1010
|
|
1782
|
+
*/
|
|
1783
|
+
UNKNOWN_AD_RESPONSE = 1010,
|
|
1784
|
+
/**
|
|
1785
|
+
* An unexpected error occurred and the cause is not known. Refer to the inner error for more information. VAST error code 900
|
|
1786
|
+
*/
|
|
1787
|
+
UNKNOWN_ERROR = 900,
|
|
1788
|
+
/**
|
|
1789
|
+
* Locale specified for the SDK is not supported. VAST error code 1011
|
|
1790
|
+
*/
|
|
1791
|
+
UNSUPPORTED_LOCALE = 1011,
|
|
1792
|
+
/**
|
|
1793
|
+
* No assets were found in the VAST ad response. VAST error code 1007
|
|
1794
|
+
*/
|
|
1795
|
+
VAST_ASSET_NOT_FOUND = 1007,
|
|
1796
|
+
/**
|
|
1797
|
+
* Empty VAST response. VAST error code 1009
|
|
1798
|
+
*/
|
|
1799
|
+
VAST_EMPTY_RESPONSE = 1009,
|
|
1800
|
+
/**
|
|
1801
|
+
* Assets were found in the VAST ad response for linear ad, but none of them matched the video player's capabilities. VAST error code 403
|
|
1802
|
+
*/
|
|
1803
|
+
VAST_LINEAR_ASSET_MISMATCH = 403,
|
|
1804
|
+
/**
|
|
1805
|
+
* The VAST URI provided, or a VAST URI provided in a subsequent wrapper element, was either unavailable or reached a timeout, as defined by the video player. The timeout is 5 seconds for initial VAST requests and each subsequent wrapper. VAST error code 301
|
|
1806
|
+
*/
|
|
1807
|
+
VAST_LOAD_TIMEOUT = 301,
|
|
1808
|
+
/**
|
|
1809
|
+
* The ad response was not recognized as a valid VAST ad. VAST error code 100
|
|
1810
|
+
*/
|
|
1811
|
+
VAST_MALFORMED_RESPONSE = 100,
|
|
1812
|
+
/**
|
|
1813
|
+
* Failed to load media assets from a VAST response. The default timeout for media loading is 8 seconds. VAST error code 402
|
|
1814
|
+
*/
|
|
1815
|
+
VAST_MEDIA_LOAD_TIMEOUT = 402,
|
|
1816
|
+
/**
|
|
1817
|
+
* No Ads VAST response after one or more wrappers. VAST error code 303
|
|
1818
|
+
*/
|
|
1819
|
+
VAST_NO_ADS_AFTER_WRAPPER = 303,
|
|
1820
|
+
/**
|
|
1821
|
+
* Assets were found in the VAST ad response for nonlinear ad, but none of them matched the video player's capabilities. VAST error code 503
|
|
1822
|
+
*/
|
|
1823
|
+
VAST_NONLINEAR_ASSET_MISMATCH = 503,
|
|
1824
|
+
/**
|
|
1825
|
+
* Problem displaying MediaFile. Currently used if video playback is stopped due to poor playback quality. VAST error code 405
|
|
1826
|
+
*/
|
|
1827
|
+
VAST_PROBLEM_DISPLAYING_MEDIA_FILE = 405,
|
|
1828
|
+
/**
|
|
1829
|
+
* VAST schema validation error. VAST error code 101
|
|
1830
|
+
*/
|
|
1831
|
+
VAST_SCHEMA_VALIDATION_ERROR = 101,
|
|
1832
|
+
/**
|
|
1833
|
+
* The maximum number of VAST wrapper redirects has been reached. VAST error code 302
|
|
1834
|
+
*/
|
|
1835
|
+
VAST_TOO_MANY_REDIRECTS = 302,
|
|
1836
|
+
/**
|
|
1837
|
+
* Trafficking error. Video player received an ad type that it was not expecting and/or cannot display. VAST error code 200
|
|
1838
|
+
*/
|
|
1839
|
+
VAST_TRAFFICKING_ERROR = 200,
|
|
1840
|
+
/**
|
|
1841
|
+
* VAST duration is different from the actual media file duration. VAST error code 202
|
|
1842
|
+
*/
|
|
1843
|
+
VAST_UNEXPECTED_DURATION_ERROR = 202,
|
|
1844
|
+
/**
|
|
1845
|
+
* Ad linearity is different from what the video player is expecting. VAST error code 201
|
|
1846
|
+
*/
|
|
1847
|
+
VAST_UNEXPECTED_LINEARITY = 201,
|
|
1848
|
+
/**
|
|
1849
|
+
* The ad response contained an unsupported VAST version. VAST error code 102
|
|
1850
|
+
*/
|
|
1851
|
+
VAST_UNSUPPORTED_VERSION = 102,
|
|
1852
|
+
/**
|
|
1853
|
+
* General VAST wrapper error. VAST error code 300
|
|
1854
|
+
*/
|
|
1855
|
+
VAST_WRAPPER_ERROR = 300,
|
|
1856
|
+
/**
|
|
1857
|
+
* There was an error playing the video ad. VAST error code 400
|
|
1858
|
+
*/
|
|
1859
|
+
VIDEO_PLAY_ERROR = 400,
|
|
1860
|
+
/**
|
|
1861
|
+
* A VPAID error occurred. Refer to the inner error for more information. VAST error code 901
|
|
1862
|
+
*/
|
|
1863
|
+
VPAID_ERROR = 901,
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
/**
|
|
1867
|
+
* The possible error types for ad loading and playing.
|
|
1868
|
+
*/
|
|
1869
|
+
export enum Type {
|
|
1870
|
+
/**
|
|
1871
|
+
* Indicates that the error was encountered when the ad was being loaded. Possible causes: there was no response from the ad server, malformed ad response was returned, or ad request parameters failed to pass validation.
|
|
1872
|
+
*/
|
|
1873
|
+
AD_LOAD = "adLoadError",
|
|
1874
|
+
/**
|
|
1875
|
+
* Indicates that the error was encountered after the ad loaded, during ad play. Possible causes: ad assets could not be loaded, etc.
|
|
1876
|
+
*/
|
|
1877
|
+
AD_PLAY = "adPlayError",
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* This event is raised when an error occurs when loading an ad from the Google or DoubleClick servers. The types on which you can register for the event are AdsLoader and AdsManager.
|
|
1883
|
+
*/
|
|
1884
|
+
export class AdErrorEvent {
|
|
1885
|
+
/**
|
|
1886
|
+
* @returns The AdError that caused this event.
|
|
1887
|
+
*/
|
|
1888
|
+
public getError(): AdError;
|
|
1889
|
+
/**
|
|
1890
|
+
* During ads load request it is possible to provide an object that is available once the ads load is complete or fails. One possible use case: relate ads response to a specific request and use user request content object as the key for identifying the response. If an error occurred during ads load, you can find out which request caused this failure.
|
|
1891
|
+
* @returns Object that was provided during ads request.
|
|
1892
|
+
*/
|
|
1893
|
+
public getUserRequestContext(): any;
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
export namespace AdErrorEvent {
|
|
1897
|
+
/**
|
|
1898
|
+
* Types of AdErrorEvents
|
|
1899
|
+
*/
|
|
1900
|
+
export enum Type {
|
|
1901
|
+
/**
|
|
1902
|
+
* Fired when an error occurred while the ad was loading or playing.
|
|
1903
|
+
*/
|
|
1904
|
+
AD_ERROR = "adError",
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
export type Listener = (event: AdErrorEvent) => void;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
/**
|
|
1911
|
+
* This event type is raised by the ad as a notification when the ad state changes and when users interact with the ad. For example, when the ad starts playing, is clicked on, etc. You can register for the various state changed events on AdsManager.
|
|
1912
|
+
*/
|
|
1913
|
+
export class AdEvent {
|
|
1914
|
+
/**
|
|
1915
|
+
* Get the current ad that is playing or just played.
|
|
1916
|
+
* @returns The ad associated with the event, or null if there is no relevant ad.
|
|
1917
|
+
*/
|
|
1918
|
+
public getAd(): Ad | null;
|
|
1919
|
+
/**
|
|
1920
|
+
* Allows extra data to be passed from the ad.
|
|
1921
|
+
* @returns Extra data for the event. Log events raised for error carry object of type 'google.ima.AdError' which can be accessed using 'adError' key.
|
|
1922
|
+
*/
|
|
1923
|
+
public getAdData(): any;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
export namespace AdEvent {
|
|
1927
|
+
/**
|
|
1928
|
+
* Types of AdEvents
|
|
1929
|
+
*/
|
|
1930
|
+
export enum Type {
|
|
1931
|
+
/**
|
|
1932
|
+
* Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.
|
|
1933
|
+
*/
|
|
1934
|
+
AD_BREAK_READY = "adBreakReady",
|
|
1935
|
+
/**
|
|
1936
|
+
* Fired when the ad has stalled playback to buffer.
|
|
1937
|
+
*/
|
|
1938
|
+
AD_BUFFERING = "adBuffering",
|
|
1939
|
+
/**
|
|
1940
|
+
* Fired when an ads list is loaded.
|
|
1941
|
+
*/
|
|
1942
|
+
AD_METADATA = "adMetadata",
|
|
1943
|
+
/**
|
|
1944
|
+
* Fired when the ad's current time value changes. Calling getAdData() on this event will return an AdProgressData object.
|
|
1945
|
+
*/
|
|
1946
|
+
AD_PROGRESS = "adProgress",
|
|
1947
|
+
/**
|
|
1948
|
+
* Fired when the ads manager is done playing all the ads.
|
|
1949
|
+
*/
|
|
1950
|
+
ALL_ADS_COMPLETED = "allAdsCompleted",
|
|
1951
|
+
/**
|
|
1952
|
+
* Fired when the ad is clicked.
|
|
1953
|
+
*/
|
|
1954
|
+
CLICK = "click",
|
|
1955
|
+
/**
|
|
1956
|
+
* Fired when the ad completes playing.
|
|
1957
|
+
*/
|
|
1958
|
+
COMPLETE = "complete",
|
|
1959
|
+
/**
|
|
1960
|
+
* Fired when content should be paused. This usually happens right before an ad is about to cover the content.
|
|
1961
|
+
*/
|
|
1962
|
+
CONTENT_PAUSE_REQUESTED = "contentPauseRequested",
|
|
1963
|
+
/**
|
|
1964
|
+
* Fired when content should be resumed. This usually happens when an ad finishes or collapses.
|
|
1965
|
+
*/
|
|
1966
|
+
CONTENT_RESUME_REQUESTED = "contentResumeRequested",
|
|
1967
|
+
/**
|
|
1968
|
+
* Fired when the ad's duration changes.
|
|
1969
|
+
*/
|
|
1970
|
+
DURATION_CHANGE = "durationChange",
|
|
1971
|
+
/**
|
|
1972
|
+
* Fired when the ad playhead crosses first quartile.
|
|
1973
|
+
*/
|
|
1974
|
+
FIRST_QUARTILE = "firstQuartile",
|
|
1975
|
+
/**
|
|
1976
|
+
* Fired when the impression URL has been pinged.
|
|
1977
|
+
*/
|
|
1978
|
+
IMPRESSION = "impression",
|
|
1979
|
+
/**
|
|
1980
|
+
* Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.
|
|
1981
|
+
*/
|
|
1982
|
+
INTERACTION = "interaction",
|
|
1983
|
+
/**
|
|
1984
|
+
* Fired when the displayed ad changes from linear to nonlinear, or vice versa.
|
|
1985
|
+
*/
|
|
1986
|
+
LINEAR_CHANGED = "linearChanged",
|
|
1987
|
+
/**
|
|
1988
|
+
* Fired when ad data is available.
|
|
1989
|
+
*/
|
|
1990
|
+
LOADED = "loaded",
|
|
1991
|
+
/**
|
|
1992
|
+
* Fired when a non-fatal error is encountered. The user need not take any action since the SDK will continue with the same or next ad playback depending on the error situation.
|
|
1993
|
+
*/
|
|
1994
|
+
LOG = "log",
|
|
1995
|
+
/**
|
|
1996
|
+
* Fired when the ad playhead crosses midpoint.
|
|
1997
|
+
*/
|
|
1998
|
+
MIDPOINT = "midpoint",
|
|
1999
|
+
/**
|
|
2000
|
+
* Fired when the ad is paused.
|
|
2001
|
+
*/
|
|
2002
|
+
PAUSED = "pause",
|
|
2003
|
+
/**
|
|
2004
|
+
* Fired when the ad is resumed.
|
|
2005
|
+
*/
|
|
2006
|
+
RESUMED = "resume",
|
|
2007
|
+
/**
|
|
2008
|
+
* Fired when the displayed ads skippable state is changed.
|
|
2009
|
+
*/
|
|
2010
|
+
SKIPPABLE_STATE_CHANGED = "skippableStateChanged",
|
|
2011
|
+
/**
|
|
2012
|
+
* Fired when the ad is skipped by the user.
|
|
2013
|
+
*/
|
|
2014
|
+
SKIPPED = "skip",
|
|
2015
|
+
/**
|
|
2016
|
+
* Fired when the ad starts playing.
|
|
2017
|
+
*/
|
|
2018
|
+
STARTED = "start",
|
|
2019
|
+
/**
|
|
2020
|
+
* Fired when the ad playhead crosses third quartile.
|
|
2021
|
+
*/
|
|
2022
|
+
THIRD_QUARTILE = "thirdQuartile",
|
|
2023
|
+
/**
|
|
2024
|
+
* Fired when the ad is closed by the user.
|
|
2025
|
+
*/
|
|
2026
|
+
USER_CLOSE = "userClose",
|
|
2027
|
+
/**
|
|
2028
|
+
* Fired when the ad volume has changed.
|
|
2029
|
+
*/
|
|
2030
|
+
VOLUME_CHANGED = "volumeChange",
|
|
2031
|
+
/**
|
|
2032
|
+
* Fired when the ad volume has been muted.
|
|
2033
|
+
*/
|
|
2034
|
+
VOLUME_MUTED = "mute",
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
export type Listener = (event: AdEvent) => void;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* An ad may be part of a pod of ads. This object exposes metadata related to that pod, such as the number of ads in the pod and ad position within the pod.
|
|
2042
|
+
*
|
|
2043
|
+
* The getTotalAds API contained within this object is often correct, but in certain scenarios, it represents the SDK's best guess. See that method's documentation for more information.
|
|
2044
|
+
*/
|
|
2045
|
+
export interface AdPodInfo {
|
|
2046
|
+
/**
|
|
2047
|
+
* Returns the position of the ad.
|
|
2048
|
+
* @returns The position of the ad within the pod. The value returned is one-based, i.e. 1 of 2, 2 of 2, etc.
|
|
2049
|
+
*/
|
|
2050
|
+
getAdPosition(): number;
|
|
2051
|
+
/**
|
|
2052
|
+
* Returns true if the ad is a bumper ad. Bumper ads are short linear ads that can indicate to a user when the user is entering into or exiting from an ad break.
|
|
2053
|
+
* @returns Whether the ad is a bumper ad.
|
|
2054
|
+
*/
|
|
2055
|
+
getIsBumper(): boolean;
|
|
2056
|
+
/**
|
|
2057
|
+
* The maximum duration of the pod in seconds. For unknown duration, -1 is returned.
|
|
2058
|
+
* @returns The maximum duration of the ads in this pod in seconds.
|
|
2059
|
+
*/
|
|
2060
|
+
getMaxDuration(): number;
|
|
2061
|
+
/**
|
|
2062
|
+
* Returns the index of the ad pod.
|
|
2063
|
+
*
|
|
2064
|
+
* For preroll pod, 0 is returned. For midrolls, 1, 2, ... N is returned. For postroll, -1 is returned.
|
|
2065
|
+
*
|
|
2066
|
+
* For pods in VOD streams with dynamically inserted ads, 0...N is returned regardless of whether the ad is a pre-, mid-, or post-roll.
|
|
2067
|
+
*
|
|
2068
|
+
* Defaults to 0 if this ad is not part of a pod, or the pod is not part of an ad playlist.
|
|
2069
|
+
*
|
|
2070
|
+
* @returns The index of the pod in the ad playlist.
|
|
2071
|
+
*/
|
|
2072
|
+
getPodIndex(): number;
|
|
2073
|
+
/**
|
|
2074
|
+
* Returns the content time offset at which the current ad pod was scheduled. For pods in VOD streams with dynamically inserted ads, stream time is returned.
|
|
2075
|
+
*
|
|
2076
|
+
* For preroll pod, 0 is returned. For midrolls, the scheduled time is returned. For postroll, -1 is returned.
|
|
2077
|
+
*
|
|
2078
|
+
* Defaults to 0 if this ad is not part of a pod, or the pod is not part of an ad playlist.
|
|
2079
|
+
*
|
|
2080
|
+
* @returns The time offset for the current ad pod.
|
|
2081
|
+
*/
|
|
2082
|
+
getTimeOffset(): number;
|
|
2083
|
+
/**
|
|
2084
|
+
* The total number of ads contained within this pod, including bumpers. Bumper ads are short linear ads that can indicate to a user when the user is entering into or exiting from an ad break.
|
|
2085
|
+
*
|
|
2086
|
+
* Defaults to 1 if this ad is not part of a pod.
|
|
2087
|
+
*
|
|
2088
|
+
* In certain scenarios, the SDK does not know for sure how many ads are contained within this ad pod. These scenarios include ad pods, which are multiple ads within a single ad tag. In these scenarios, the first few AdEvents fired (AD_METADATA, LOADED, etc.) may have just the total number of ad tags from the playlist response. We recommend using the STARTED event as the event in which publishers pull information from this object and update the visual elements of the player, if any.
|
|
2089
|
+
*
|
|
2090
|
+
* @returns Total number of ads in the pod.
|
|
2091
|
+
*/
|
|
2092
|
+
getTotalAds(): number;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* AdsLoader allows clients to request ads from ad servers. To do so, users must register for the AdsManagerLoadedEvent event and then request ads.
|
|
2097
|
+
*/
|
|
2098
|
+
export class AdsLoader {
|
|
2099
|
+
/**
|
|
2100
|
+
* @param container The display container for ads.
|
|
2101
|
+
*/
|
|
2102
|
+
constructor(container: AdDisplayContainer);
|
|
2103
|
+
/**
|
|
2104
|
+
* Adds an event listener for the specified type.
|
|
2105
|
+
* @param type The event type to listen to.
|
|
2106
|
+
* @param listener The function to call when the event is triggered.
|
|
2107
|
+
* @param useCapture Optional
|
|
2108
|
+
*/
|
|
2109
|
+
public addEventListener(
|
|
2110
|
+
type: AdsManagerLoadedEvent.Type,
|
|
2111
|
+
listener: AdsManagerLoadedEvent.Listener,
|
|
2112
|
+
useCapture?: boolean
|
|
2113
|
+
): void;
|
|
2114
|
+
/**
|
|
2115
|
+
* Adds an event listener for the specified type.
|
|
2116
|
+
* @param type The event type to listen to.
|
|
2117
|
+
* @param listener The function to call when the event is triggered.
|
|
2118
|
+
* @param useCapture Optional
|
|
2119
|
+
*/
|
|
2120
|
+
public addEventListener(
|
|
2121
|
+
type: AdErrorEvent.Type,
|
|
2122
|
+
listener: AdErrorEvent.Listener,
|
|
2123
|
+
useCapture?: boolean
|
|
2124
|
+
): void;
|
|
2125
|
+
/**
|
|
2126
|
+
* Removes an event listener for the specified type.
|
|
2127
|
+
* @param type The event type for which to remove an event listener.
|
|
2128
|
+
* @param listener The function of the event handler to remove from the event target.
|
|
2129
|
+
* @param useCapture Optional
|
|
2130
|
+
*/
|
|
2131
|
+
public removeEventListener(
|
|
2132
|
+
type: AdsManagerLoadedEvent.Type,
|
|
2133
|
+
listener: AdsManagerLoadedEvent.Listener,
|
|
2134
|
+
useCapture?: boolean
|
|
2135
|
+
): void;
|
|
2136
|
+
/**
|
|
2137
|
+
* Removes an event listener for the specified type.
|
|
2138
|
+
* @param type The event type for which to remove an event listener.
|
|
2139
|
+
* @param listener The function of the event handler to remove from the event target.
|
|
2140
|
+
* @param useCapture Optional
|
|
2141
|
+
*/
|
|
2142
|
+
public removeEventListener(
|
|
2143
|
+
type: AdErrorEvent.Type,
|
|
2144
|
+
listener: AdErrorEvent.Listener,
|
|
2145
|
+
useCapture?: boolean
|
|
2146
|
+
): void;
|
|
2147
|
+
/**
|
|
2148
|
+
* Signals to the SDK that the content is finished. This will allow the SDK to play post-roll ads, if any are loaded via ad rules.
|
|
2149
|
+
*/
|
|
2150
|
+
public contentComplete(): void;
|
|
2151
|
+
/**
|
|
2152
|
+
* Cleans up the internal state.
|
|
2153
|
+
*/
|
|
2154
|
+
public destroy(): void;
|
|
2155
|
+
/**
|
|
2156
|
+
* Returns the IMA SDK settings instance. To change the settings, just call the methods on the instance. The changes will apply for all the ad requests made with this ads loader.
|
|
2157
|
+
* @returns The settings instance.
|
|
2158
|
+
*/
|
|
2159
|
+
public getSettings(): ImaSdkSettings;
|
|
2160
|
+
/**
|
|
2161
|
+
* Request ads from a server.
|
|
2162
|
+
* @param adsRequest AdsRequest instance containing data for the ads request.
|
|
2163
|
+
* @param userRequestContext User-provided object that is associated with the ads request. It can be retrieved when the ads are loaded.
|
|
2164
|
+
*/
|
|
2165
|
+
public requestAds(adsRequest: AdsRequest, userRequestContext?: any): void;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* This class is responsible for playing ads.
|
|
2170
|
+
*/
|
|
2171
|
+
export interface AdsManager {
|
|
2172
|
+
/**
|
|
2173
|
+
* Adds an event listener for the specified type.
|
|
2174
|
+
* @param type The event type to listen to
|
|
2175
|
+
* @param listener The function to call when the event is triggered
|
|
2176
|
+
* @param useCapture Optional
|
|
2177
|
+
*/
|
|
2178
|
+
addEventListener(
|
|
2179
|
+
type: AdEvent.Type,
|
|
2180
|
+
listener: AdEvent.Listener,
|
|
2181
|
+
useCapture?: boolean
|
|
2182
|
+
): void;
|
|
2183
|
+
/**
|
|
2184
|
+
* Adds an event listener for the specified type.
|
|
2185
|
+
* @param type The event type to listen to
|
|
2186
|
+
* @param listener The function to call when the event is triggered
|
|
2187
|
+
* @param useCapture Optional
|
|
2188
|
+
*/
|
|
2189
|
+
addEventListener(
|
|
2190
|
+
type: AdErrorEvent.Type,
|
|
2191
|
+
listener: AdErrorEvent.Listener,
|
|
2192
|
+
useCapture?: boolean
|
|
2193
|
+
): void;
|
|
2194
|
+
/**
|
|
2195
|
+
* Removes an event listener for the specified type.
|
|
2196
|
+
* @param type The event type for which to remove an event listener.
|
|
2197
|
+
* @param listener The function of the event handler to remove from the event target.
|
|
2198
|
+
* @param useCapture Optional
|
|
2199
|
+
*/
|
|
2200
|
+
removeEventListener(
|
|
2201
|
+
type: AdEvent.Type,
|
|
2202
|
+
listener: AdEvent.Listener,
|
|
2203
|
+
useCapture?: boolean
|
|
2204
|
+
): void;
|
|
2205
|
+
/**
|
|
2206
|
+
* Removes an event listener for the specified type.
|
|
2207
|
+
* @param type The event type for which to remove an event listener.
|
|
2208
|
+
* @param listener The function of the event handler to remove from the event target.
|
|
2209
|
+
* @param useCapture Optional
|
|
2210
|
+
*/
|
|
2211
|
+
removeEventListener(
|
|
2212
|
+
type: AdErrorEvent.Type,
|
|
2213
|
+
listener: AdErrorEvent.Listener,
|
|
2214
|
+
useCapture?: boolean
|
|
2215
|
+
): void;
|
|
2216
|
+
/**
|
|
2217
|
+
* Collapse the current ad. This is no-op for HTML5 SDK.
|
|
2218
|
+
*/
|
|
2219
|
+
collapse(): void;
|
|
2220
|
+
/**
|
|
2221
|
+
* Removes ad assets loaded at runtime that need to be properly removed at the time of ad completion and stops the ad and all tracking.
|
|
2222
|
+
*/
|
|
2223
|
+
destroy(): void;
|
|
2224
|
+
/**
|
|
2225
|
+
* If an ad break is currently playing, discard it and resume content. Otherwise, ignore the next scheduled ad break. For example, this can be called immediately after the ads manager loads to ignore a preroll without losing future midrolls or postrolls. This is a no-op unless the ad request returned a playlist or VMAP response.
|
|
2226
|
+
*/
|
|
2227
|
+
discardAdBreak(): void;
|
|
2228
|
+
/**
|
|
2229
|
+
* Expand the current ad. This is no-op for HTML5 SDK.
|
|
2230
|
+
*/
|
|
2231
|
+
expand(): void;
|
|
2232
|
+
/**
|
|
2233
|
+
* Returns true if the ad can currently be skipped. When this value changes, the AdsManager fires an AdEvent.SKIPPABLE_STATE_CHANGED event.
|
|
2234
|
+
* @returns True if the ad can currently be skipped, false otherwise.
|
|
2235
|
+
*/
|
|
2236
|
+
getAdSkippableState(): boolean;
|
|
2237
|
+
/**
|
|
2238
|
+
* Returns an array of offsets in seconds indicating when a scheduled ad break will play. A preroll is represented by 0, and a postroll is represented by -1. An empty array indicates the ad or ad pod has no schedule and can be played at any time.
|
|
2239
|
+
* @returns List of time offsets in seconds.
|
|
2240
|
+
*/
|
|
2241
|
+
getCuePoints(): number[];
|
|
2242
|
+
/**
|
|
2243
|
+
* Get the remaining time of the current ad that is playing. If the ad is not loaded yet or has finished playing, the API would return -1.
|
|
2244
|
+
* @returns Returns the time remaining for current ad. If the remaining time is undefined for the current ad (for example custom ads), the value returns -1.
|
|
2245
|
+
*/
|
|
2246
|
+
getRemainingTime(): number;
|
|
2247
|
+
/**
|
|
2248
|
+
* Get the volume for the current ad.
|
|
2249
|
+
* @returns The volume of the current ad, from 0 (muted) to 1 (loudest).
|
|
2250
|
+
*/
|
|
2251
|
+
getVolume(): number;
|
|
2252
|
+
/**
|
|
2253
|
+
* Call init to initialize the ad experience on the ads manager.
|
|
2254
|
+
* @param width The desired width of the ad.
|
|
2255
|
+
* @param height The desired height of the ad.
|
|
2256
|
+
* @param viewMode The desired view mode.
|
|
2257
|
+
* @param videoElement The video element for custom playback. This video element overrides the one provided in the AdDisplayContainer constructor. Only use this property if absolutely necessary - otherwise we recommend specifying this video element while creating the AdDisplayContainer.
|
|
2258
|
+
*/
|
|
2259
|
+
init(
|
|
2260
|
+
width: number,
|
|
2261
|
+
height: number,
|
|
2262
|
+
viewMode: ViewMode,
|
|
2263
|
+
videoElement?: HTMLVideoElement
|
|
2264
|
+
): void;
|
|
2265
|
+
/**
|
|
2266
|
+
* Returns true if a custom click tracking element is being used for click tracking on the current ad. Custom click tracking is only used when an optional click tracking element is provided to the AdDisplayContainer, custom playback is used, and the current ad is not an AdSense/AdX ad.
|
|
2267
|
+
* @returns Whether custom click tracking is used.
|
|
2268
|
+
*/
|
|
2269
|
+
isCustomClickTrackingUsed(): boolean;
|
|
2270
|
+
/**
|
|
2271
|
+
* Returns true if a custom video element is being used to play the current ad. Custom playback occurs when an optional video element is provided to the AdDisplayContainer on platforms where a custom video element would provide a more seamless ad viewing experience.
|
|
2272
|
+
* @returns Whether custom playback is used.
|
|
2273
|
+
*/
|
|
2274
|
+
isCustomPlaybackUsed(): boolean;
|
|
2275
|
+
/**
|
|
2276
|
+
* Pauses the current ad that is playing. This function will be no-op when a static overlay is being shown or if the ad is not loaded yet or is done playing.
|
|
2277
|
+
*/
|
|
2278
|
+
pause(): void;
|
|
2279
|
+
/**
|
|
2280
|
+
* Resizes the current ad.
|
|
2281
|
+
* @param width New ad slot width.
|
|
2282
|
+
* @param height New ad slot height.
|
|
2283
|
+
* @param viewMode The new view mode.
|
|
2284
|
+
*/
|
|
2285
|
+
resize(width: number, height: number, viewMode: ViewMode): void;
|
|
2286
|
+
/**
|
|
2287
|
+
* Resumes the current ad that is loaded and paused. This function will be no-op when a static overlay is being shown or if the ad is not loaded yet or is done playing.
|
|
2288
|
+
*/
|
|
2289
|
+
resume(): void;
|
|
2290
|
+
/**
|
|
2291
|
+
* Set the volume for the current ad.
|
|
2292
|
+
* @param volume The volume to set, from 0 (muted) to 1 (loudest).
|
|
2293
|
+
*/
|
|
2294
|
+
setVolume(volume: number): void;
|
|
2295
|
+
/**
|
|
2296
|
+
* Skips the current ad when AdsManager.getAdSkippableState() is true. When called under other circumstances, skip has no effect. After the skip is completed the AdsManager fires an AdEvent.SKIPPED event.
|
|
2297
|
+
*/
|
|
2298
|
+
skip(): void;
|
|
2299
|
+
/**
|
|
2300
|
+
* Start playing the ads.
|
|
2301
|
+
*/
|
|
2302
|
+
start(): void;
|
|
2303
|
+
/**
|
|
2304
|
+
* Stop playing the ads. Calling this will get publisher back to the content.
|
|
2305
|
+
*/
|
|
2306
|
+
stop(): void;
|
|
2307
|
+
/**
|
|
2308
|
+
* Updates the ads rendering settings. This should be used specifically for VMAP use cases between ad breaks when ads rendering settings such as bitrate need to be updated.
|
|
2309
|
+
* @param adsRenderingSettings The updated ads rendering settings.
|
|
2310
|
+
*/
|
|
2311
|
+
updateAdsRenderingSettings(
|
|
2312
|
+
adsRenderingSettings: Partial<AdsRenderingSettings>
|
|
2313
|
+
): void;
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
/**
|
|
2317
|
+
* This event is raised when ads are successfully loaded from the Google or DoubleClick ad servers via an AdsLoader. You can register for this event on AdsLoader.
|
|
2318
|
+
*/
|
|
2319
|
+
export class AdsManagerLoadedEvent {
|
|
2320
|
+
/**
|
|
2321
|
+
* After ads are loaded from the Google or DoubleClick ad servers, the publisher needs to play these ads either in their own video player or in the Google-provided video player. This method returns an AdsManager object. The AdsManager supports playing ads and allows the publisher to subscribe to various events during ad playback.
|
|
2322
|
+
* @param contentPlayback Player that plays back publisher's content. This must be an object that contains the property currentTime, which allows the SDK to query playhead position to properly display midrolls in case ad server responds with an ad rule, and the duration property. The HMTL5 video element fulfills these requirements. You may optionally implement your own playhead tracker, as long as it fulfills the above requirements.
|
|
2323
|
+
* @param adsRenderingSettings Optional settings to control the rendering of ads.
|
|
2324
|
+
* @returns AdsManager that manages and plays ads.
|
|
2325
|
+
*/
|
|
2326
|
+
public getAdsManager(
|
|
2327
|
+
contentPlayback: {
|
|
2328
|
+
currentTime: number;
|
|
2329
|
+
duration: number;
|
|
2330
|
+
},
|
|
2331
|
+
adsRenderingSettings?: Partial<AdsRenderingSettings>
|
|
2332
|
+
): AdsManager;
|
|
2333
|
+
/**
|
|
2334
|
+
* @returns During ads load request it is possible to provide an object that is available once the ads load is complete. One possible use case: relate ads response to a specific request and use user request content object as a key for identifying the response.
|
|
2335
|
+
*/
|
|
2336
|
+
public getUserRequestContext(): any;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
export namespace AdsManagerLoadedEvent {
|
|
2340
|
+
/**
|
|
2341
|
+
* Types of AdsManagerLoadedEvents.
|
|
2342
|
+
*/
|
|
2343
|
+
export enum Type {
|
|
2344
|
+
/**
|
|
2345
|
+
* Fired when the ads have been loaded and an AdsManager is available.
|
|
2346
|
+
*/
|
|
2347
|
+
ADS_MANAGER_LOADED = "adsManagerLoaded",
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
export type Listener = (event: AdsManagerLoadedEvent) => void;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* Defines parameters that control the rendering of ads.
|
|
2355
|
+
*/
|
|
2356
|
+
export class AdsRenderingSettings {
|
|
2357
|
+
/**
|
|
2358
|
+
* Set to false if you wish to have fine grained control over the positioning of all non-linear ads. If this value is true, the ad is positioned in the bottom center. If this value is false, the ad is positioned in the top left corner. The default value is true.
|
|
2359
|
+
*/
|
|
2360
|
+
public autoAlign: boolean;
|
|
2361
|
+
/**
|
|
2362
|
+
* Maximum recommended bitrate. The value is in kbit/s. The SDK will pick media with bitrate below the specified max, or the closest bitrate if there is no media with lower bitrate found. Default value, -1, means the bitrate will be selected by the SDK.
|
|
2363
|
+
*/
|
|
2364
|
+
public bitrate: number;
|
|
2365
|
+
/**
|
|
2366
|
+
* Enables preloading of video assets. For more info see our guide to preloading media.
|
|
2367
|
+
*/
|
|
2368
|
+
public enablePreloading: boolean;
|
|
2369
|
+
/**
|
|
2370
|
+
* Timeout (in milliseconds) when loading a video ad media file. If loading takes longer than this timeout, the ad playback is canceled and the next ad in the pod plays, if available. Use -1 for the default of 8 seconds.
|
|
2371
|
+
*/
|
|
2372
|
+
public loadVideoTimeout: number;
|
|
2373
|
+
/**
|
|
2374
|
+
* Only supported for linear video mime types. If specified, the SDK will include media that matches the MIME type(s) specified in the list and exclude media that does not match the specified MIME type(s). The format is a list of strings, e.g., [ 'video/mp4', 'video/webm', ... ] If not specified, the SDK will pick the media based on player capabilities.
|
|
2375
|
+
*/
|
|
2376
|
+
public mimeTypes: string[];
|
|
2377
|
+
/**
|
|
2378
|
+
* For VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds). This setting is strictly after - e.g. setting playAdsAfterTime to 15 will cause IMA to ignore an ad break scheduled to play at 15s.
|
|
2379
|
+
*/
|
|
2380
|
+
public playAdsAfterTime: number;
|
|
2381
|
+
/**
|
|
2382
|
+
* Specifies whether or not the SDK should restore the custom playback state after an ad break completes. This is setting is used primarily when the publisher passes in its content player to use for custom ad playback.
|
|
2383
|
+
*/
|
|
2384
|
+
public restoreCustomPlaybackStateOnAdBreakComplete: boolean;
|
|
2385
|
+
/**
|
|
2386
|
+
* Specifies whether the UI elements that should be displayed. The elements in this array are ignored for AdSense/AdX ads.
|
|
2387
|
+
*/
|
|
2388
|
+
public uiElements: UiElements[];
|
|
2389
|
+
/**
|
|
2390
|
+
* Render linear ads with full UI styling. This setting does not apply to AdSense/AdX ads or ads played in a mobile context that already use full UI styling by default.
|
|
2391
|
+
*/
|
|
2392
|
+
public useStyledLinearAds: boolean;
|
|
2393
|
+
/**
|
|
2394
|
+
* Render non-linear ads with a close and recall button.
|
|
2395
|
+
*/
|
|
2396
|
+
public useStyledNonLinearAds: boolean;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
/**
|
|
2400
|
+
* A class for specifying properties of the ad request.
|
|
2401
|
+
*/
|
|
2402
|
+
export class AdsRequest {
|
|
2403
|
+
/**
|
|
2404
|
+
* Specifies a VAST 2.0 document to be used as the ads response instead of making a request via an ad tag url. This can be useful for debugging and other situations where a VAST response is already available.
|
|
2405
|
+
*
|
|
2406
|
+
* This parameter is optional.
|
|
2407
|
+
*/
|
|
2408
|
+
public adsResponse?: string;
|
|
2409
|
+
/**
|
|
2410
|
+
* Specifies the ad tag url that is requested from the ad server. For details on constructing the ad tag url, see Create a master video tag manually.
|
|
2411
|
+
*
|
|
2412
|
+
* This parameter is required.
|
|
2413
|
+
*/
|
|
2414
|
+
public adTagUrl: string;
|
|
2415
|
+
/**
|
|
2416
|
+
* Specifies the duration of the content in seconds to be shown. Used in AdX requests.
|
|
2417
|
+
*
|
|
2418
|
+
* This parameter is optional.
|
|
2419
|
+
*/
|
|
2420
|
+
public contentDuration?: number;
|
|
2421
|
+
/**
|
|
2422
|
+
* Specifies the keywords used to describe the content to be shown. Used in AdX requests.
|
|
2423
|
+
*
|
|
2424
|
+
* This parameter is optional.
|
|
2425
|
+
*/
|
|
2426
|
+
public contentKeywords?: string[];
|
|
2427
|
+
/**
|
|
2428
|
+
* Specifies the title of the content to be shown. Used in AdX requests.
|
|
2429
|
+
*
|
|
2430
|
+
* This parameter is optional.
|
|
2431
|
+
*/
|
|
2432
|
+
public contentTitle?: string;
|
|
2433
|
+
/**
|
|
2434
|
+
* Forces non-linear AdSense ads to render as linear fullslot. If set, the content video will be paused and the non-linear text or image ad will be rendered as fullslot. The content video will resume once the ad has been skipped or closed.
|
|
2435
|
+
*/
|
|
2436
|
+
public forceNonLinearFullSlot?: boolean;
|
|
2437
|
+
/**
|
|
2438
|
+
* Specifies the height of the rectangular area within which a linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad's height.
|
|
2439
|
+
*
|
|
2440
|
+
* This parameter is required.
|
|
2441
|
+
*/
|
|
2442
|
+
public linearAdSlotHeight: number;
|
|
2443
|
+
/**
|
|
2444
|
+
* Specifies the width of the rectangular area within which a linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad's width.
|
|
2445
|
+
*
|
|
2446
|
+
* This parameter is required.
|
|
2447
|
+
*/
|
|
2448
|
+
public linearAdSlotWidth: number;
|
|
2449
|
+
/**
|
|
2450
|
+
* Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL. This can be used to stagger requests during a live-stream event, in order to mitigate spikes in the number of requests.
|
|
2451
|
+
*/
|
|
2452
|
+
public liveStreamPrefetchSeconds?: number;
|
|
2453
|
+
/**
|
|
2454
|
+
* Specifies the height of the rectangular area within which a non linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad's height.
|
|
2455
|
+
*
|
|
2456
|
+
* This parameter is required.
|
|
2457
|
+
*/
|
|
2458
|
+
public nonLinearAdSlotHeight: number;
|
|
2459
|
+
/**
|
|
2460
|
+
* Specifies the width of the rectangular area within which a non linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad's width.
|
|
2461
|
+
*
|
|
2462
|
+
* This parameter is required.
|
|
2463
|
+
*/
|
|
2464
|
+
public nonLinearAdSlotWidth: number;
|
|
2465
|
+
/**
|
|
2466
|
+
* Specifies the full url of the page that will be included in the Google ad request for targeting purposes. The url needs to be a valid url. If specified, this value will be used for the [PAGEURL] VAST macro.
|
|
2467
|
+
*
|
|
2468
|
+
* This parameter is optional.
|
|
2469
|
+
*/
|
|
2470
|
+
public pageUrl?: string;
|
|
2471
|
+
/**
|
|
2472
|
+
* Override for default VAST load timeout in milliseconds for a single wrapper. The default timeout is 5000ms.
|
|
2473
|
+
*
|
|
2474
|
+
* This parameter is optional.
|
|
2475
|
+
*/
|
|
2476
|
+
public vastLoadTimeout?: number;
|
|
2477
|
+
|
|
2478
|
+
/**
|
|
2479
|
+
* Notifies the SDK whether the player intends to start the content and ad in response to a user action or whether it will be automatically played. Changing this setting will have no impact on ad playback.
|
|
2480
|
+
* @param autoPlay Whether the content and the ad will be autoplayed or whether it will be started by a user action.
|
|
2481
|
+
*/
|
|
2482
|
+
public setAdWillAutoPlay(autoPlay: boolean): void;
|
|
2483
|
+
/**
|
|
2484
|
+
* Notifies the SDK whether the player intends to start ad while muted. Changing this setting will have no impact on ad playback, but will send the appropriate signal in the ad request to allow buyers to bid on muted inventory.
|
|
2485
|
+
* @param muted Whether the ad will be played while muted.
|
|
2486
|
+
*/
|
|
2487
|
+
public setAdWillPlayMuted(muted: boolean): void;
|
|
2488
|
+
/**
|
|
2489
|
+
* Notifies the SDK whether the player intends to continuously play the content videos one after another similar to TV broadcast. Changing this setting will have no impact on the ad playback, but will send the appropriate signal in this ad request to allow buyers to bid on the type of ad inventory.
|
|
2490
|
+
* @param continuousPlayback Whether the content video is played one after another continuously.
|
|
2491
|
+
*/
|
|
2492
|
+
public setContinuousPlayback(continuousPlayback: boolean): void;
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* A companion ad class that is extended by companion ads of different ad types.
|
|
2497
|
+
*/
|
|
2498
|
+
export interface CompanionAd {
|
|
2499
|
+
/**
|
|
2500
|
+
* @returns Returns the ad slot id for this companion.
|
|
2501
|
+
*/
|
|
2502
|
+
getAdSlotId(): string;
|
|
2503
|
+
/**
|
|
2504
|
+
* Returns the HTML content for the companion ad that can be added to the publisher page.
|
|
2505
|
+
* @returns The HTML content.
|
|
2506
|
+
*/
|
|
2507
|
+
getContent(): string;
|
|
2508
|
+
/**
|
|
2509
|
+
* @returns The content type of the Companion Ad. This may return null if the content type is not known (such as in the case of a VAST HTMLResource or IFrameResource).
|
|
2510
|
+
*/
|
|
2511
|
+
getContentType(): string | null;
|
|
2512
|
+
/**
|
|
2513
|
+
* @returns Returns the height of the companion in pixels.
|
|
2514
|
+
*/
|
|
2515
|
+
getHeight(): number;
|
|
2516
|
+
/**
|
|
2517
|
+
* @returns Returns the width of the companion in pixels.
|
|
2518
|
+
*/
|
|
2519
|
+
getWidth(): number;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
/**
|
|
2523
|
+
* CompanionAdSelectionSettings object is used to define the selection criteria when calling the ima.Ad.getCompanionAds function.
|
|
2524
|
+
*/
|
|
2525
|
+
export class CompanionAdSelectionSettings {
|
|
2526
|
+
/**
|
|
2527
|
+
* The companion ad slot ids to be used for matching set by the user.
|
|
2528
|
+
*/
|
|
2529
|
+
public adSlotIds: string[];
|
|
2530
|
+
/**
|
|
2531
|
+
* Creative type setting set by the user.
|
|
2532
|
+
*/
|
|
2533
|
+
public creativeType: CompanionAdSelectionSettings.CreativeType;
|
|
2534
|
+
/**
|
|
2535
|
+
* The near fit percent set by the user.
|
|
2536
|
+
*/
|
|
2537
|
+
public nearMatchPercent: number;
|
|
2538
|
+
/**
|
|
2539
|
+
* Resource type setting set by the user.
|
|
2540
|
+
*/
|
|
2541
|
+
public resourceType: CompanionAdSelectionSettings.ResourceType;
|
|
2542
|
+
/**
|
|
2543
|
+
* Size criteria setting set by the user.
|
|
2544
|
+
*/
|
|
2545
|
+
public sizeCriteria: CompanionAdSelectionSettings.SizeCriteria;
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
export namespace CompanionAdSelectionSettings {
|
|
2549
|
+
/**
|
|
2550
|
+
* Available choices for creative type of a companion ad. The user can specify any of these choices as a criterion for selecting companion ads.
|
|
2551
|
+
*/
|
|
2552
|
+
export enum CreativeType {
|
|
2553
|
+
/**
|
|
2554
|
+
* Specifies all creative types.
|
|
2555
|
+
*/
|
|
2556
|
+
ALL = "All",
|
|
2557
|
+
/**
|
|
2558
|
+
* Specifies Flash creatives.
|
|
2559
|
+
*/
|
|
2560
|
+
FLASH = "Flash",
|
|
2561
|
+
/**
|
|
2562
|
+
* Specifies image creatives (such as JPEG, PNG, GIF, etc).
|
|
2563
|
+
*/
|
|
2564
|
+
IMAGE = "Image",
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* Available choices for resource type of a companion ad. The user can specify any of these choices as a criterion for selecting companion ads.
|
|
2569
|
+
*/
|
|
2570
|
+
export enum ResourceType {
|
|
2571
|
+
/**
|
|
2572
|
+
* Specifies that the resource can be any type of resource.
|
|
2573
|
+
*/
|
|
2574
|
+
ALL = "All",
|
|
2575
|
+
/**
|
|
2576
|
+
* Specifies that the resource should be an HTML snippet.
|
|
2577
|
+
*/
|
|
2578
|
+
HTML = "Html",
|
|
2579
|
+
/**
|
|
2580
|
+
* Specifies that the resource should be a URL that should be used as the source of an iframe.
|
|
2581
|
+
*/
|
|
2582
|
+
IFRAME = "IFrame",
|
|
2583
|
+
/**
|
|
2584
|
+
* Specifies that the resource should be a static file (usually the URL of an image of SWF).
|
|
2585
|
+
*/
|
|
2586
|
+
STATIC = "Static",
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
/**
|
|
2590
|
+
* Available choices for size selection criteria. The user can specify any of these choices for selecting companion ads.
|
|
2591
|
+
*/
|
|
2592
|
+
export enum SizeCriteria {
|
|
2593
|
+
/**
|
|
2594
|
+
* Specifies that size should be ignored when choosing companions.
|
|
2595
|
+
*/
|
|
2596
|
+
IGNORE = "IgnoreSize",
|
|
2597
|
+
/**
|
|
2598
|
+
* Specifies that only companions that match the size of the companion ad slot exactly should be chosen.
|
|
2599
|
+
*/
|
|
2600
|
+
SELECT_EXACT_MATCH = "SelectExactMatch",
|
|
2601
|
+
/**
|
|
2602
|
+
* Specifies that any companion close to the size of the companion ad slot should be chosen.
|
|
2603
|
+
*/
|
|
2604
|
+
SELECT_NEAR_MATCH = "SelectNearMatch",
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
/**
|
|
2609
|
+
* This class contains SDK-wide settings.
|
|
2610
|
+
*/
|
|
2611
|
+
export class ImaSdkSettings {
|
|
2612
|
+
/**
|
|
2613
|
+
* Returns the current companion backfill mode.
|
|
2614
|
+
* @returns The current value.
|
|
2615
|
+
*/
|
|
2616
|
+
public getCompanionBackfill(): ImaSdkSettings.CompanionBackfillMode;
|
|
2617
|
+
/**
|
|
2618
|
+
* Gets whether to disable custom playback on iOS 10+ browsers. The default value is false.
|
|
2619
|
+
*/
|
|
2620
|
+
public getDisableCustomPlaybackForIOS10Plus(): boolean;
|
|
2621
|
+
/**
|
|
2622
|
+
* @returns Whether flash ads should be disabled.
|
|
2623
|
+
*/
|
|
2624
|
+
public getDisableFlashAds(): boolean;
|
|
2625
|
+
/**
|
|
2626
|
+
* Returns the publisher provided locale.
|
|
2627
|
+
* @returns Publisher provided locale.
|
|
2628
|
+
*/
|
|
2629
|
+
public getLocale(): string;
|
|
2630
|
+
/**
|
|
2631
|
+
* Returns the maximum number of redirects for subsequent redirects will be denied.
|
|
2632
|
+
* @returns The maximum number of redirects.
|
|
2633
|
+
*/
|
|
2634
|
+
public getNumRedirects(): number;
|
|
2635
|
+
/**
|
|
2636
|
+
* Returns the partner provided player type.
|
|
2637
|
+
* @returns Partner player type.
|
|
2638
|
+
*/
|
|
2639
|
+
public getPlayerType(): string;
|
|
2640
|
+
/**
|
|
2641
|
+
* Returns the partner provided player version.
|
|
2642
|
+
* @returns Partner player version.
|
|
2643
|
+
*/
|
|
2644
|
+
public getPlayerVersion(): string;
|
|
2645
|
+
/**
|
|
2646
|
+
* Returns the publisher provided id.
|
|
2647
|
+
* @returns Publisher provided id.
|
|
2648
|
+
*/
|
|
2649
|
+
public getPpid(): string;
|
|
2650
|
+
/**
|
|
2651
|
+
* Sets whether VMAP and ad rules ad breaks are automatically played
|
|
2652
|
+
* @param autoPlayAdBreaks Whether to autoPlay the ad breaks.
|
|
2653
|
+
*/
|
|
2654
|
+
public setAutoPlayAdBreaks(autoPlayAdBreaks: boolean): void;
|
|
2655
|
+
/**
|
|
2656
|
+
* Sets the companion backfill mode. Please see the various modes available in google.ima.ImaSdkSettings.CompanionBackfillMode.
|
|
2657
|
+
*
|
|
2658
|
+
* The default mode is ima.ImaSdkSettings.CompanionBackfillMode.ALWAYS.
|
|
2659
|
+
*
|
|
2660
|
+
* @param mode The desired companion backfill mode.
|
|
2661
|
+
*/
|
|
2662
|
+
public setCompanionBackfill(
|
|
2663
|
+
mode: ImaSdkSettings.CompanionBackfillMode
|
|
2664
|
+
): void;
|
|
2665
|
+
/**
|
|
2666
|
+
* Sets whether to disable custom playback on iOS 10+ browsers. If true, ads will play inline if the content video is inline. This enables TrueView skippable ads. However, the ad will stay inline and not support iOS's native fullscreen. When false, ads will play in the same player as your content. The value set here when an AdDisplayContainer is created is used for the lifetime of the container. The default value is false.
|
|
2667
|
+
* @param disable Whether or not to disable custom playback.
|
|
2668
|
+
*/
|
|
2669
|
+
public setDisableCustomPlaybackForIOS10Plus(disable: boolean): void;
|
|
2670
|
+
/**
|
|
2671
|
+
* Sets whether flash ads should be disabled.
|
|
2672
|
+
* @param disableFlashAds Whether flash ads should be disabled.
|
|
2673
|
+
*/
|
|
2674
|
+
public setDisableFlashAds(disableFlashAds: boolean): void;
|
|
2675
|
+
/**
|
|
2676
|
+
* Sets the publisher provided locale. Must be called before creating AdsLoader or AdDisplayContainer. The locale specifies the language in which to display UI elements and can be any two-letter ISO 639-1 code.
|
|
2677
|
+
* @param locale Publisher-provided locale.
|
|
2678
|
+
*/
|
|
2679
|
+
public setLocale(locale: string): void;
|
|
2680
|
+
/**
|
|
2681
|
+
* Specifies the maximum number of redirects before the subsequent redirects will be denied, and the ad load aborted. The number of redirects directly affects latency and thus user experience. This applies to all VAST wrapper ads.
|
|
2682
|
+
* @param numRedirects The maximum number of redirects.
|
|
2683
|
+
*/
|
|
2684
|
+
public setNumRedirects(numRedirects: number): void;
|
|
2685
|
+
/**
|
|
2686
|
+
* Sets the partner provided player type. This setting should be used to specify the name of the player being integrated with the SDK. Player type greater than 20 characters will be truncated. The player type specified should be short and unique. This is an optional setting used to improve SDK usability by tracking player types.
|
|
2687
|
+
* @param playerType The type of the partner player.
|
|
2688
|
+
*/
|
|
2689
|
+
public setPlayerType(playerType: string): void;
|
|
2690
|
+
/**
|
|
2691
|
+
* Sets the partner provided player version. This setting should be used to specify the version of the partner player being integrated with the SDK. Player versions greater than 20 characters will be truncated. This is an optional setting used to improve SDK usability by tracking player version.
|
|
2692
|
+
* @param playerVersion The version of the partner player.
|
|
2693
|
+
*/
|
|
2694
|
+
public setPlayerVersion(playerVersion: string): void;
|
|
2695
|
+
/**
|
|
2696
|
+
* Sets the publisher provided id.
|
|
2697
|
+
* @param ppid Publisher provided id.
|
|
2698
|
+
*/
|
|
2699
|
+
public setPpid(ppid: string): void;
|
|
2700
|
+
/**
|
|
2701
|
+
* Sets whether VPAID creatives are allowed.
|
|
2702
|
+
* @param allowVpaid Whether to allow VPAID creatives.
|
|
2703
|
+
* @deprecated Please use setVpaidMode.
|
|
2704
|
+
*/
|
|
2705
|
+
public setVpaidAllowed(allowVpaid: boolean): void;
|
|
2706
|
+
/**
|
|
2707
|
+
* Sets VPAID playback mode.
|
|
2708
|
+
* @param vpaidMode Sets how VPAID ads will be played. Default is to not allow VPAID ads.
|
|
2709
|
+
*/
|
|
2710
|
+
public setVpaidMode(vpaidMode: ImaSdkSettings.VpaidMode): void;
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
export namespace ImaSdkSettings {
|
|
2714
|
+
/**
|
|
2715
|
+
* Defines a set of constants for the companion backfill setting. This setting indicates whether companions should be backfilled in various scenarios.
|
|
2716
|
+
*
|
|
2717
|
+
* The default value is ALWAYS.
|
|
2718
|
+
*
|
|
2719
|
+
* Note that client-side companion backfill requires tagging your companions properly with a Google Publisher Tag (GPT).
|
|
2720
|
+
*/
|
|
2721
|
+
export enum CompanionBackfillMode {
|
|
2722
|
+
/**
|
|
2723
|
+
* If the value is ALWAYS, companion backfill will be attempted in all situations, even when there is no master ad returned.
|
|
2724
|
+
*/
|
|
2725
|
+
ALWAYS = "always",
|
|
2726
|
+
/**
|
|
2727
|
+
* If the value is ON_MASTER_AD, companion backfill will be attempted if there is a master ad with fewer companions than there are companion slots. The missing companions will be backfilled.
|
|
2728
|
+
*/
|
|
2729
|
+
ON_MASTER_AD = "on_master_ad",
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
/**
|
|
2733
|
+
* A set of constants for enabling VPAID functionality.
|
|
2734
|
+
*/
|
|
2735
|
+
export enum VpaidMode {
|
|
2736
|
+
/**
|
|
2737
|
+
* VPAID ads will not play and an error will be returned.
|
|
2738
|
+
*/
|
|
2739
|
+
DISABLED = 0,
|
|
2740
|
+
/**
|
|
2741
|
+
* VPAID ads are enabled using a cross domain iframe. The VPAID ad cannot access the site. VPAID ads that depend on friendly iframe access may error. This is the default.
|
|
2742
|
+
*/
|
|
2743
|
+
ENABLED = 1,
|
|
2744
|
+
/**
|
|
2745
|
+
* VPAID ads are enabled using a friendly iframe. This allows the ad access to the site via JavaScript.
|
|
2746
|
+
*/
|
|
2747
|
+
INSECURE = 2,
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
/**
|
|
2752
|
+
* Enum specifying different UI elements that can be configured to be displayed or hidden. These settings may be ignored for AdSense and ADX ads.
|
|
2753
|
+
*/
|
|
2754
|
+
export enum UiElements {
|
|
2755
|
+
/**
|
|
2756
|
+
* Displays the "Ad" text in the ad UI. Must be present to show the countdown timer.
|
|
2757
|
+
*/
|
|
2758
|
+
AD_ATTRIBUTION = "adAttribution",
|
|
2759
|
+
/**
|
|
2760
|
+
* Ad attribution is required for a countdown timer to be displayed. Both UiElements.COUNTDOWN and UiElements.AD_ATTRIBUTION must be present in AdsRenderingSettings.uiElements.
|
|
2761
|
+
*/
|
|
2762
|
+
COUNTDOWN = "countdown",
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2765
|
+
/**
|
|
2766
|
+
* Enum specifying different VPAID view modes for ads.
|
|
2767
|
+
*/
|
|
2768
|
+
export enum ViewMode {
|
|
2769
|
+
/**
|
|
2770
|
+
* Fullscreen ad view mode. Indicates to the ads manager that the publisher considers the current AdDisplayContainer arrangement as fullscreen (i.e. simulated fullscreen). This does not cause the ads manager to enter fullscreen.
|
|
2771
|
+
*/
|
|
2772
|
+
FULLSCREEN = "fullscreen",
|
|
2773
|
+
/**
|
|
2774
|
+
* Normal ad view mode.
|
|
2775
|
+
*/
|
|
2776
|
+
NORMAL = "normal",
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
/**
|
|
2780
|
+
* A string containing the full version of the SDK.
|
|
2781
|
+
*/
|
|
2782
|
+
const VERSION: string;
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* Settings for the Google IMA SDK.
|
|
2786
|
+
*/
|
|
2787
|
+
const settings: ImaSdkSettings;
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
declare const GRABBING = "is-grabbing";
|
|
2792
|
+
|
|
2793
|
+
declare const HAS_POSTER = "has-poster";
|
|
2794
|
+
|
|
2795
|
+
declare type HasGlobalSrcExtensios<PluginSrcs extends unknown[]> = ArrayToIntersection<PickGlobalSrcExtension<PluginSrcs>>;
|
|
2796
|
+
|
|
2797
|
+
declare type HasSrcExtensions<PluginBareConfigs extends unknown[]> = TupleToUnion<PickSrcExtensions<PluginBareConfigs>> extends never ? false : true;
|
|
2798
|
+
|
|
2799
|
+
declare const HOVERED = "is-hovered";
|
|
2800
|
+
|
|
2801
|
+
declare class I18n implements Plugin_2 {
|
|
2802
|
+
static pluginName: string;
|
|
2803
|
+
static en: {
|
|
2804
|
+
ads: {
|
|
2805
|
+
ad: string;
|
|
2806
|
+
ads: string;
|
|
2807
|
+
advertisement: string;
|
|
2808
|
+
indicator: string;
|
|
2809
|
+
adchoices: string;
|
|
2810
|
+
};
|
|
2811
|
+
audio: {
|
|
2812
|
+
button_txt: string;
|
|
2813
|
+
menu_title: string;
|
|
2814
|
+
};
|
|
2815
|
+
cc: {
|
|
2816
|
+
button: string;
|
|
2817
|
+
menu_title: string;
|
|
2818
|
+
options: string;
|
|
2819
|
+
tracks: string;
|
|
2820
|
+
reset: string;
|
|
2821
|
+
colors: {
|
|
2822
|
+
Black: string;
|
|
2823
|
+
Blue: string;
|
|
2824
|
+
Cyan: string;
|
|
2825
|
+
Green: string;
|
|
2826
|
+
Magenta: string;
|
|
2827
|
+
Red: string;
|
|
2828
|
+
White: string;
|
|
2829
|
+
Yellow: string;
|
|
2830
|
+
};
|
|
2831
|
+
edgeStyle: {
|
|
2832
|
+
None: string;
|
|
2833
|
+
"Drop shadow": string;
|
|
2834
|
+
Raised: string;
|
|
2835
|
+
Depressed: string;
|
|
2836
|
+
Outline: string;
|
|
2837
|
+
};
|
|
2838
|
+
fontFamily: {
|
|
2839
|
+
"Monospaced Serif": string;
|
|
2840
|
+
"Proportional Serif": string;
|
|
2841
|
+
"Monospaced Sans-Serif": string;
|
|
2842
|
+
"Proportional Sans-Serif": string;
|
|
2843
|
+
Casual: string;
|
|
2844
|
+
Cursive: string;
|
|
2845
|
+
};
|
|
2846
|
+
properties: {
|
|
2847
|
+
fontFamily: string;
|
|
2848
|
+
fontSize: string;
|
|
2849
|
+
fontColor: string;
|
|
2850
|
+
fontOpacity: string;
|
|
2851
|
+
backgroundColor: string;
|
|
2852
|
+
backgroundOpacity: string;
|
|
2853
|
+
characterEdgeStyle: string;
|
|
2854
|
+
};
|
|
2855
|
+
};
|
|
2856
|
+
chromecast: {
|
|
2857
|
+
start: string;
|
|
2858
|
+
stop: string;
|
|
2859
|
+
};
|
|
2860
|
+
core: {
|
|
2861
|
+
exit_fullscreen: string;
|
|
2862
|
+
fullscreen: string;
|
|
2863
|
+
mute: string;
|
|
2864
|
+
muted: string;
|
|
2865
|
+
pause: string;
|
|
2866
|
+
play: string;
|
|
2867
|
+
seconds: string;
|
|
2868
|
+
timeline_aria_label: string;
|
|
2869
|
+
unmute: string;
|
|
2870
|
+
volume: string;
|
|
2871
|
+
close: string;
|
|
2872
|
+
"skip-next": string;
|
|
2873
|
+
"skip-prev": string;
|
|
2874
|
+
};
|
|
2875
|
+
ovp: {
|
|
2876
|
+
starting_in: string;
|
|
2877
|
+
};
|
|
2878
|
+
playlist: {
|
|
2879
|
+
cancel: string;
|
|
2880
|
+
up_next: string;
|
|
2881
|
+
autoplay: string;
|
|
2882
|
+
now_playing: string;
|
|
2883
|
+
turn_off_autoplay: string;
|
|
2884
|
+
playlist: string;
|
|
2885
|
+
};
|
|
2886
|
+
qsel: {
|
|
2887
|
+
menu_title: string;
|
|
2888
|
+
};
|
|
2889
|
+
share: {
|
|
2890
|
+
clipboard_failure: string;
|
|
2891
|
+
clipboard_success: string;
|
|
2892
|
+
embed: string;
|
|
2893
|
+
link: string;
|
|
2894
|
+
menu_title: string;
|
|
2895
|
+
};
|
|
2896
|
+
speed: {
|
|
2897
|
+
menu_title: string;
|
|
2898
|
+
};
|
|
2899
|
+
vtsel: {
|
|
2900
|
+
button_txt: string;
|
|
2901
|
+
menu_title: string;
|
|
2902
|
+
};
|
|
2903
|
+
};
|
|
2904
|
+
init(config: Config, _root: never, video: Player): void;
|
|
2905
|
+
/* Excluded from this release type: _nonLanguageFields */
|
|
2906
|
+
/* Excluded from this release type: languagesLoaded */
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
declare class IMA implements Adapter {
|
|
2910
|
+
readonly eventHandler: AdsController;
|
|
2911
|
+
readonly log: Logger;
|
|
2912
|
+
private _timers;
|
|
2913
|
+
private _started;
|
|
2914
|
+
private _volumeLevel;
|
|
2915
|
+
private _adLoaded;
|
|
2916
|
+
private _currentDuration;
|
|
2917
|
+
private _currentRemaining;
|
|
2918
|
+
private _currentDisplayTs;
|
|
2919
|
+
private _adLinear?;
|
|
2920
|
+
private _dimensions?;
|
|
2921
|
+
private _adHandlers;
|
|
2922
|
+
private opts;
|
|
2923
|
+
private _adsManager;
|
|
2924
|
+
private _adsLoader;
|
|
2925
|
+
private _adDisplayContainer;
|
|
2926
|
+
private videoTag;
|
|
2927
|
+
private customPlaybackEnabled;
|
|
2928
|
+
private _paused;
|
|
2929
|
+
private loadingController;
|
|
2930
|
+
private _all_ads_completed;
|
|
2931
|
+
private google;
|
|
2932
|
+
private _isInitialized;
|
|
2933
|
+
private _adBreakTime;
|
|
2934
|
+
private _prepared;
|
|
2935
|
+
/**
|
|
2936
|
+
* creates an instance of ImaAdapter
|
|
2937
|
+
*/
|
|
2938
|
+
constructor(eventHandler: AdsController);
|
|
2939
|
+
init(opts: any): Promise<void>;
|
|
2940
|
+
initAdapter(): Promise<void>;
|
|
2941
|
+
isReady(): boolean;
|
|
2942
|
+
setVideoTag(tag: Player): void;
|
|
2943
|
+
setAdBreakTime(time: number): void;
|
|
2944
|
+
getAdBreakTime(): number;
|
|
2945
|
+
isCustomPlaybackEnabled(): boolean;
|
|
2946
|
+
isAttemptingPrerollOnIOS(): boolean;
|
|
2947
|
+
setAttemptingPrerollOnIOS(preroll_ios: boolean): void;
|
|
2948
|
+
isLinearAd(): boolean;
|
|
2949
|
+
getVideoTag(): Maybe<Player>;
|
|
2950
|
+
getDimensions(): Partial<{
|
|
2951
|
+
width: number;
|
|
2952
|
+
height: number;
|
|
2953
|
+
linear: boolean;
|
|
2954
|
+
}>;
|
|
2955
|
+
getOpts(): Partial<IMAOpts>;
|
|
2956
|
+
isPaused(): boolean;
|
|
2957
|
+
destroy(): void;
|
|
2958
|
+
stop(): void;
|
|
2959
|
+
initialize(opts: Todo): void;
|
|
2960
|
+
destroyManager(label?: string): void;
|
|
2961
|
+
reset(): void;
|
|
2962
|
+
cleanup(): void;
|
|
2963
|
+
/**
|
|
2964
|
+
* returns a Promise of the IMA AdManager
|
|
2965
|
+
*/
|
|
2966
|
+
waitForAdsManager(): Promise<unknown>;
|
|
2967
|
+
initAd(adTag: string, timeout?: number): Promise<void>;
|
|
2968
|
+
requestAd(adTag: string, timeout: number): Promise<any>;
|
|
2969
|
+
playAd(): Promise<void>;
|
|
2970
|
+
/**
|
|
2971
|
+
* returns a Promise of a completed Ad
|
|
2972
|
+
*/
|
|
2973
|
+
startAndWaitForAdCompletion(adsManager: google.ima.AdsManager, linear: boolean): Promise<void> | undefined;
|
|
2974
|
+
pause(): void;
|
|
2975
|
+
resume(): void;
|
|
2976
|
+
volume(level?: number): number | undefined;
|
|
2977
|
+
onResize({ width, height, linear, silent, resize_non_linear }: ResizeInfo): void;
|
|
2978
|
+
onAdRequestEnd(): void;
|
|
2979
|
+
getAdInfo(): {
|
|
2980
|
+
duration: number;
|
|
2981
|
+
currentTime: number;
|
|
2982
|
+
} | undefined;
|
|
2983
|
+
currentAd(): google.ima.Ad | undefined;
|
|
2984
|
+
isAdPod(): boolean;
|
|
2985
|
+
/**
|
|
2986
|
+
* fetch the cuepoints from this adapter
|
|
2987
|
+
* allowing the flowplayer ad manager to schedule ads
|
|
2988
|
+
* without caring about their requests
|
|
2989
|
+
*/
|
|
2990
|
+
cuepoints(): number[] | undefined;
|
|
2991
|
+
/**
|
|
2992
|
+
* ad pods with ads in a postroll postion need this
|
|
2993
|
+
* to signal to play post rolls
|
|
2994
|
+
*/
|
|
2995
|
+
contentComplete(): Promise<void>;
|
|
2996
|
+
isUiDisabled(): any;
|
|
2997
|
+
getAdPodInfo(): google.ima.AdPodInfo | null | undefined;
|
|
2998
|
+
canDismissNonLinear(): boolean;
|
|
2999
|
+
/**
|
|
3000
|
+
* better error unwrapping
|
|
3001
|
+
* https://github.com/flowplayer/ads/issues/87
|
|
3002
|
+
*/
|
|
3003
|
+
static unwrapError(err?: google.ima.AdError | Error, fallback?: string): string;
|
|
3004
|
+
/**
|
|
3005
|
+
* polls to ensure that an error has not happened
|
|
3006
|
+
* and that an Ad is progressing
|
|
3007
|
+
*/
|
|
3008
|
+
static pollForFatalError({ err, ima }: {
|
|
3009
|
+
err: google.ima.AdErrorEvent;
|
|
3010
|
+
ima: IMA;
|
|
3011
|
+
}): Promise<{
|
|
3012
|
+
ok?: 1;
|
|
3013
|
+
err?: any;
|
|
3014
|
+
}>;
|
|
3015
|
+
/**
|
|
3016
|
+
* generate an interval polling for the time remaining
|
|
3017
|
+
* that will expose this value to the external wrapper
|
|
3018
|
+
*/
|
|
3019
|
+
static pollRemaining({ ima, adsManager }: {
|
|
3020
|
+
ima: IMA;
|
|
3021
|
+
adsManager: google.ima.AdsManager;
|
|
3022
|
+
}): number;
|
|
3023
|
+
once(obj: Todo, evType: string, handler: Todo): void;
|
|
3024
|
+
static race(obj: Todo, evTypes: string[], handler: Todo): void;
|
|
3025
|
+
clearAdHandlers(): void;
|
|
3026
|
+
emitWithAd<EventName extends keyof AdEventsDetailMap>(event: EventName, ad: google.ima.Ad): void;
|
|
3027
|
+
emitError<EventName extends keyof AdEventsDetailMap>(event: EventName, error: google.ima.AdErrorEvent): void;
|
|
3028
|
+
debugEvent(e: google.ima.AdEvent): void;
|
|
3029
|
+
}
|
|
3030
|
+
|
|
3031
|
+
/**
|
|
3032
|
+
* A special event to expose the IMA SDK AdsManager instance for custom event handling. The AdsManager instance is passed as a parameter to the event handler.
|
|
3033
|
+
*/
|
|
3034
|
+
declare const IMA_ADAPTER_INIT = "ad-ima-adapter-init";
|
|
3035
|
+
|
|
3036
|
+
/**
|
|
3037
|
+
* A special event to expose the IMA SDK AdsRenderingSettings
|
|
3038
|
+
* {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRenderingSettings}
|
|
3039
|
+
*/
|
|
3040
|
+
declare const IMA_ADS_RENDERING_SETTINGS = "ad-ima-rendering-settings";
|
|
3041
|
+
|
|
3042
|
+
/**
|
|
3043
|
+
* A special event to expose the IMA SDK AdsRequest
|
|
3044
|
+
* {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRequest}
|
|
3045
|
+
*/
|
|
3046
|
+
declare const IMA_BEFORE_ADS_REQUEST = "ad-ima-before-ads-request";
|
|
3047
|
+
|
|
3048
|
+
/**
|
|
3049
|
+
* @public
|
|
3050
|
+
* Event that exposes IMA's AdsManager for the users
|
|
3051
|
+
*/
|
|
3052
|
+
export declare type ImaAdapterInitEventDetail = google.ima.AdsManager;
|
|
3053
|
+
|
|
3054
|
+
/**
|
|
3055
|
+
* @public
|
|
3056
|
+
*/
|
|
3057
|
+
export declare type ImaAdsRenderingSettingsEventDetail = google.ima.AdsRenderingSettings;
|
|
3058
|
+
|
|
3059
|
+
/**
|
|
3060
|
+
* @public
|
|
3061
|
+
*/
|
|
3062
|
+
export declare type ImaBeforeAdsRequestDetail = {
|
|
3063
|
+
request: google.ima.AdsRequest;
|
|
3064
|
+
};
|
|
3065
|
+
|
|
3066
|
+
/**
|
|
3067
|
+
* @public
|
|
3068
|
+
*/
|
|
3069
|
+
export declare type ImaBeforeAdsRequestEventDetail = AdBasicInfo & ImaBeforeAdsRequestDetail;
|
|
3070
|
+
|
|
3071
|
+
declare type IMAOpts = {
|
|
3072
|
+
width: number;
|
|
3073
|
+
height: number;
|
|
3074
|
+
autoplay: boolean;
|
|
3075
|
+
disable_non_linear_ads: boolean;
|
|
3076
|
+
media_timeout: number;
|
|
3077
|
+
total_loading_timeout: number;
|
|
3078
|
+
};
|
|
3079
|
+
|
|
3080
|
+
declare const IN_VIEWPORT = "is-in-viewport";
|
|
3081
|
+
|
|
3082
|
+
/* Excluded from this release type: INTERSECTIONCHANGE */
|
|
3083
|
+
|
|
3084
|
+
/* Excluded from this release type: IntersectionChangeEventDetail */
|
|
3085
|
+
|
|
3086
|
+
declare const IS_SOURCE_PROCESSING = "is-source-processing";
|
|
3087
|
+
|
|
3088
|
+
declare type JSONPlayer = any;
|
|
3089
|
+
|
|
3090
|
+
/**
|
|
3091
|
+
* @public
|
|
3092
|
+
*/
|
|
3093
|
+
declare const /**
|
|
3094
|
+
@public
|
|
3095
|
+
* when a new player is inserted into the HTML
|
|
3096
|
+
*/ /**
|
|
3097
|
+
* @public
|
|
3098
|
+
*/
|
|
3099
|
+
KEYDOWN = "keydown";
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* @public
|
|
3103
|
+
*/
|
|
3104
|
+
declare const /**
|
|
3105
|
+
@public
|
|
3106
|
+
* when a new player is inserted into the HTML
|
|
3107
|
+
*/ /**
|
|
3108
|
+
* @public
|
|
3109
|
+
*/
|
|
3110
|
+
KEYUP = "keyup";
|
|
3111
|
+
|
|
3112
|
+
/**
|
|
3113
|
+
* @public
|
|
3114
|
+
*/
|
|
3115
|
+
declare type KeyValue = Record<string, any>;
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* @public
|
|
3119
|
+
*/
|
|
3120
|
+
declare const /**
|
|
3121
|
+
@public
|
|
3122
|
+
* when a new player is inserted into the HTML
|
|
3123
|
+
*/ /**
|
|
3124
|
+
* @public
|
|
3125
|
+
*/
|
|
3126
|
+
LANDSCAPE = "landscape";
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* @public
|
|
3130
|
+
* Represents a lazy-loaded ad tag.
|
|
3131
|
+
*/
|
|
3132
|
+
export declare interface LazyAdTag {
|
|
3133
|
+
(): Promise<string>;
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3136
|
+
declare type Listenable = {
|
|
3137
|
+
on<T>(eventName: string, handler: Listener<T>): void;
|
|
3138
|
+
};
|
|
3139
|
+
|
|
3140
|
+
declare type Listener<T = any> = {
|
|
3141
|
+
(e: FPEvent<T>): void;
|
|
3142
|
+
};
|
|
3143
|
+
|
|
3144
|
+
/**
|
|
3145
|
+
* @public
|
|
3146
|
+
* when src is a livestream
|
|
3147
|
+
*/
|
|
3148
|
+
declare const /**
|
|
3149
|
+
@public
|
|
3150
|
+
* when a new player is inserted into the HTML
|
|
3151
|
+
*/ /**
|
|
3152
|
+
* @public
|
|
3153
|
+
* when src is a livestream
|
|
3154
|
+
*/
|
|
3155
|
+
LIVE = "live";
|
|
3156
|
+
|
|
3157
|
+
declare const LIVE_2 = "is-live";
|
|
3158
|
+
|
|
3159
|
+
declare const LIVE_SEEKED = "is-live-seeked";
|
|
3160
|
+
|
|
3161
|
+
/**
|
|
3162
|
+
* @public
|
|
3163
|
+
*/
|
|
3164
|
+
declare type LiveEventDetail = null;
|
|
3165
|
+
|
|
3166
|
+
/**
|
|
3167
|
+
* @public
|
|
3168
|
+
*/
|
|
3169
|
+
declare const /**
|
|
3170
|
+
@public
|
|
3171
|
+
* when a new player is inserted into the HTML
|
|
3172
|
+
*/ /**
|
|
3173
|
+
* @public
|
|
3174
|
+
*/
|
|
3175
|
+
LOAD = "load";
|
|
3176
|
+
|
|
3177
|
+
/**
|
|
3178
|
+
* @public
|
|
3179
|
+
*/
|
|
3180
|
+
declare const /**
|
|
3181
|
+
@public
|
|
3182
|
+
* when a new player is inserted into the HTML
|
|
3183
|
+
*/ /**
|
|
3184
|
+
* @public
|
|
3185
|
+
*/
|
|
3186
|
+
LOAD_START = "loadstart";
|
|
3187
|
+
|
|
3188
|
+
declare const LOADED = "is-loaded";
|
|
3189
|
+
|
|
3190
|
+
/**
|
|
3191
|
+
* @public A plugin that supports loading new media formats. Use 'class MyPlugin implements Loader\<...\>' when writing your custom Loader
|
|
3192
|
+
* @typeParam PluginPlayer- Player API that will be implemented by the loader. Loader at least must implement on(\<loader-name\>:attached, ...) event handler
|
|
3193
|
+
*/
|
|
3194
|
+
declare interface Loader<PluginOwnConfig extends KeyValue, // FIXME extends Config
|
|
3195
|
+
PluginPlayer extends PlayerWith<_AttachedEventCheck>> extends Plugin_2<PluginOwnConfig, PluginPlayer> {
|
|
3196
|
+
onload: EnsureOnAttached<(config: ConfigWith<PluginOwnConfig>, root: PlayerRoot, video: PlayerWith<PluginPlayer>, src: SourceObj) => void, PluginPlayer>;
|
|
3197
|
+
wants<S = SourceObj>(srcString: SourceStr, srcObj: S, config: ConfigWith<PluginOwnConfig>): boolean;
|
|
3198
|
+
wants<S = KeyValue>(srcString: SourceStr, srcObj: SourceWith<S>, config: ConfigWith<PluginOwnConfig>): boolean;
|
|
3199
|
+
}
|
|
3200
|
+
|
|
3201
|
+
declare const LOADING = "is-loading";
|
|
3202
|
+
|
|
3203
|
+
declare interface Logger {
|
|
3204
|
+
(...args: any[]): void;
|
|
3205
|
+
log(...args: any[]): void;
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
/**
|
|
3209
|
+
* @public
|
|
3210
|
+
*/
|
|
3211
|
+
export declare type Macro = string | number | boolean | undefined | null;
|
|
3212
|
+
|
|
3213
|
+
/**
|
|
3214
|
+
* @public
|
|
3215
|
+
*/
|
|
3216
|
+
export declare type MacrosMap = Record<string, Macro>;
|
|
3217
|
+
|
|
3218
|
+
declare type MapToBareConfigs<Plugins extends PluginCtor[]> = {
|
|
3219
|
+
[PluginType in keyof Plugins]: ExtractBareConfig<Plugins[PluginType]>;
|
|
3220
|
+
};
|
|
3221
|
+
|
|
3222
|
+
declare type MapToPlayerExtensions<Plugins extends PluginCtor[]> = {
|
|
3223
|
+
[PluginIndex in keyof Plugins]: ExtractPluginPlayerExtension<Plugins[PluginIndex]>;
|
|
3224
|
+
};
|
|
3225
|
+
|
|
3226
|
+
declare type Maybe<T> = undefined | T;
|
|
3227
|
+
|
|
3228
|
+
declare const MENU_OPENED = "has-menu-opened";
|
|
3229
|
+
|
|
3230
|
+
/**
|
|
3231
|
+
* Combines plugin config and returns a type derived from Config
|
|
3232
|
+
*/
|
|
3233
|
+
declare type MergeConfigs<Plugins extends PluginCtor[]> = MergePluginConfigs<MapToBareConfigs<Plugins>>;
|
|
3234
|
+
|
|
3235
|
+
declare type MergePlayerExtensions<Plugins extends PluginCtor[]> = ArrayToIntersection<MapToPlayerExtensions<Plugins>>;
|
|
3236
|
+
|
|
3237
|
+
declare type MergePluginConfigs<PluginBareConfigs extends unknown[]> = HasSrcExtensions<PluginBareConfigs> extends true ? ConfigWithSourceExtensions<PluginBareConfigs> : ConfigWith<ArrayToIntersection<PluginBareConfigs>>;
|
|
3238
|
+
|
|
3239
|
+
/**
|
|
3240
|
+
* @public
|
|
3241
|
+
* general video events flowplayer uses internally
|
|
3242
|
+
* https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
|
|
3243
|
+
*/
|
|
3244
|
+
declare const /**
|
|
3245
|
+
@public
|
|
3246
|
+
* when a new player is inserted into the HTML
|
|
3247
|
+
*/ /**
|
|
3248
|
+
* @public
|
|
3249
|
+
* general video events flowplayer uses internally
|
|
3250
|
+
* https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events
|
|
3251
|
+
*/
|
|
3252
|
+
METADATA = "loadedmetadata";
|
|
3253
|
+
|
|
3254
|
+
declare type Metadata_2 = Record<string, string | number>;
|
|
3255
|
+
|
|
3256
|
+
/**
|
|
3257
|
+
@public
|
|
3258
|
+
* when a new player is inserted into the HTML
|
|
3259
|
+
*/
|
|
3260
|
+
declare const /**
|
|
3261
|
+
@public
|
|
3262
|
+
* when a new player is inserted into the HTML
|
|
3263
|
+
*/ /**
|
|
3264
|
+
@public
|
|
3265
|
+
* when a new player is inserted into the HTML
|
|
3266
|
+
*/ MOUNT = "mount";
|
|
3267
|
+
|
|
3268
|
+
/**
|
|
3269
|
+
* @public
|
|
3270
|
+
*/
|
|
3271
|
+
declare type MountEventDetail = null;
|
|
3272
|
+
|
|
3273
|
+
/**
|
|
3274
|
+
* @public
|
|
3275
|
+
*/
|
|
3276
|
+
declare const /**
|
|
3277
|
+
@public
|
|
3278
|
+
* when a new player is inserted into the HTML
|
|
3279
|
+
*/ /**
|
|
3280
|
+
* @public
|
|
3281
|
+
*/
|
|
3282
|
+
MOUSE_DOWN = "mousedown";
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* @public
|
|
3286
|
+
*/
|
|
3287
|
+
declare const /**
|
|
3288
|
+
@public
|
|
3289
|
+
* when a new player is inserted into the HTML
|
|
3290
|
+
*/ /**
|
|
3291
|
+
* @public
|
|
3292
|
+
*/
|
|
3293
|
+
MOUSE_ENTER = "mouseenter";
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* @public
|
|
3297
|
+
*/
|
|
3298
|
+
declare const /**
|
|
3299
|
+
@public
|
|
3300
|
+
* when a new player is inserted into the HTML
|
|
3301
|
+
*/ /**
|
|
3302
|
+
* @public
|
|
3303
|
+
*/
|
|
3304
|
+
MOUSE_LEAVE = "mouseleave";
|
|
3305
|
+
|
|
3306
|
+
/**
|
|
3307
|
+
* @public
|
|
3308
|
+
*/
|
|
3309
|
+
declare const /**
|
|
3310
|
+
@public
|
|
3311
|
+
* when a new player is inserted into the HTML
|
|
3312
|
+
*/ /**
|
|
3313
|
+
* @public
|
|
3314
|
+
*/
|
|
3315
|
+
MOUSE_MOVE = "mousemove";
|
|
3316
|
+
|
|
3317
|
+
/**
|
|
3318
|
+
* @public
|
|
3319
|
+
*/
|
|
3320
|
+
declare const /**
|
|
3321
|
+
@public
|
|
3322
|
+
* when a new player is inserted into the HTML
|
|
3323
|
+
*/ /**
|
|
3324
|
+
* @public
|
|
3325
|
+
*/
|
|
3326
|
+
MOUSE_UP = "mouseup";
|
|
3327
|
+
|
|
3328
|
+
declare const MUTED = "is-muted";
|
|
3329
|
+
|
|
3330
|
+
declare const NO_AD_INDICATOR: number;
|
|
3331
|
+
|
|
3332
|
+
declare const NO_CONTROLS = "no-controls";
|
|
3333
|
+
|
|
3334
|
+
declare const NO_DVR = "no-timeline";
|
|
3335
|
+
|
|
3336
|
+
declare const NO_FULLSCREEN: number;
|
|
3337
|
+
|
|
3338
|
+
/* Excluded from this release type: NON_RECOVERABLE_ERROR */
|
|
3339
|
+
|
|
3340
|
+
/* Excluded from this release type: NonRecoverableErrorEventDetail */
|
|
3341
|
+
|
|
3342
|
+
/* Excluded from this release type: NQState */
|
|
3343
|
+
|
|
3344
|
+
/**
|
|
3345
|
+
* @public
|
|
3346
|
+
*/
|
|
3347
|
+
declare type OVPMetadata = {
|
|
3348
|
+
player_id?: string;
|
|
3349
|
+
media_id?: string;
|
|
3350
|
+
ad_keywords?: string;
|
|
3351
|
+
title?: string;
|
|
3352
|
+
description?: string;
|
|
3353
|
+
category_name?: string;
|
|
3354
|
+
duration?: number;
|
|
3355
|
+
tags?: string;
|
|
3356
|
+
};
|
|
3357
|
+
|
|
3358
|
+
/**
|
|
3359
|
+
* @public
|
|
3360
|
+
*/
|
|
3361
|
+
declare const /**
|
|
3362
|
+
@public
|
|
3363
|
+
* when a new player is inserted into the HTML
|
|
3364
|
+
*/ /**
|
|
3365
|
+
* @public
|
|
3366
|
+
*/
|
|
3367
|
+
PAUSE = "pause";
|
|
3368
|
+
|
|
3369
|
+
declare const PAUSED = "is-paused";
|
|
3370
|
+
|
|
3371
|
+
/**
|
|
3372
|
+
* @public
|
|
3373
|
+
* Emitted when the Prebid.js library is loaded so you can get a reference to Prebid.js and configure the pbjs object if necessary. For more, see Prebid properties https://developer.wowza.com/docs/wowza-flowplayer/plugins/advertising/#prebid-properties
|
|
3374
|
+
*/
|
|
3375
|
+
declare const PBJS_AVAILABLE = "ad/pbjs";
|
|
3376
|
+
|
|
3377
|
+
/**
|
|
3378
|
+
* @public
|
|
3379
|
+
*/
|
|
3380
|
+
declare type PBJSAvailebleEventDetail = {
|
|
3381
|
+
pbjs: any;
|
|
3382
|
+
};
|
|
3383
|
+
|
|
3384
|
+
declare type PickGlobalSrcExtension<PluginSrcs extends unknown[]> = {
|
|
3385
|
+
[Index in keyof PluginSrcs]: PluginSrcs[Index] extends {
|
|
3386
|
+
type: string;
|
|
3387
|
+
} ? unknown : PluginSrcs[Index];
|
|
3388
|
+
};
|
|
3389
|
+
|
|
3390
|
+
/**
|
|
3391
|
+
* Maps incoming array to the src extension type
|
|
3392
|
+
* @example
|
|
3393
|
+
* ```
|
|
3394
|
+
* PickSrcExtensions<[
|
|
3395
|
+
* {configProp: boolean, src: UnsafeSource<{srcProp: boolean}>},
|
|
3396
|
+
* {}
|
|
3397
|
+
* ]> // = [{srcProp: boolean}, never]
|
|
3398
|
+
* ```
|
|
3399
|
+
*/
|
|
3400
|
+
declare type PickSrcExtensions<PluginBareConfigs extends unknown[]> = {
|
|
3401
|
+
[PluginType in keyof PluginBareConfigs]: ExtractSrcExtension<PluginBareConfigs[PluginType]>;
|
|
3402
|
+
};
|
|
3403
|
+
|
|
3404
|
+
/**
|
|
3405
|
+
* @public
|
|
3406
|
+
*/
|
|
3407
|
+
declare const /**
|
|
3408
|
+
@public
|
|
3409
|
+
* when a new player is inserted into the HTML
|
|
3410
|
+
*/ /**
|
|
3411
|
+
* @public
|
|
3412
|
+
*/
|
|
3413
|
+
PLAY = "play";
|
|
3414
|
+
|
|
3415
|
+
/**
|
|
3416
|
+
* @public
|
|
3417
|
+
*/
|
|
3418
|
+
declare type Player = HTMLVideoElement & PlayerEventOverloads & {
|
|
3419
|
+
/* Excluded from this release type: renderPlugin */
|
|
3420
|
+
/**
|
|
3421
|
+
* Disables and enables the player.
|
|
3422
|
+
* @param flag -Forces disabled mode (true) or enabled mode (false). Disabled player cannot be seeked forward.
|
|
3423
|
+
*/
|
|
3424
|
+
toggleDisable: (flag?: boolean) => void;
|
|
3425
|
+
/* Excluded from this release type: original_src */
|
|
3426
|
+
/**
|
|
3427
|
+
* The root element of the video player. This is the immediate parent element of the video tag.
|
|
3428
|
+
*/
|
|
3429
|
+
root: PlayerRoot;
|
|
3430
|
+
/* Excluded from this release type: playerState */
|
|
3431
|
+
/* Excluded from this release type: reaper */
|
|
3432
|
+
/* Excluded from this release type: hasState */
|
|
3433
|
+
/* Excluded from this release type: transitionState */
|
|
3434
|
+
/**
|
|
3435
|
+
* Toggles between playing and paused mode.
|
|
3436
|
+
* @param on - Forces the playback (true) or paused state (false). Use this for initial playback of a source configured with setSrc() and when changing the state.
|
|
3437
|
+
*/
|
|
3438
|
+
togglePlay(on?: boolean): Promise<void>;
|
|
3439
|
+
/* Excluded from this release type: toggleFullScreen */
|
|
3440
|
+
/**
|
|
3441
|
+
* @public
|
|
3442
|
+
* Toggles between normal and fullscreen mode. The optional flag attribute forces the normal sized (false) or fullscreen (false) mode.
|
|
3443
|
+
* The custom fullscreenenter and fullscreenexit events are sent respectively.
|
|
3444
|
+
*/
|
|
3445
|
+
toggleFullScreen(on?: boolean): void;
|
|
3446
|
+
/* Excluded from this release type: toggleMute */
|
|
3447
|
+
/**
|
|
3448
|
+
* Toggles between muted and original volume level.
|
|
3449
|
+
*/
|
|
3450
|
+
toggleMute(): void;
|
|
3451
|
+
/**
|
|
3452
|
+
* Removes a Flowplayer instance from `flowplayer.instances` and emits the `flowplayer.events.REAP` event, enabling cleanup of unsafe resources.
|
|
3453
|
+
*/
|
|
3454
|
+
destroy(): void;
|
|
3455
|
+
/* Excluded from this release type: render */
|
|
3456
|
+
/* Excluded from this release type: render */
|
|
3457
|
+
createComponents(...args: string[]): HTMLElement[];
|
|
3458
|
+
/**
|
|
3459
|
+
* Adds or changes configuration object. Usually used in conjunction with `setSrc()`. You can use all top-level config options like `subtitle:` , `logo:`, `ima:` etc.
|
|
3460
|
+
* @example
|
|
3461
|
+
* ```
|
|
3462
|
+
* setOpts({
|
|
3463
|
+
* subtitles:{
|
|
3464
|
+
* tracks:[
|
|
3465
|
+
* {
|
|
3466
|
+
* src: "1.vtt",
|
|
3467
|
+
* label: "English",
|
|
3468
|
+
* default: true
|
|
3469
|
+
* }, {
|
|
3470
|
+
* src: "2.vtt",
|
|
3471
|
+
* label: "Spanish",
|
|
3472
|
+
* default : false }]},
|
|
3473
|
+
* logo: "https://myserver.com/logo.png"
|
|
3474
|
+
* })
|
|
3475
|
+
* ```
|
|
3476
|
+
*/
|
|
3477
|
+
setOpts(config: Config): void;
|
|
3478
|
+
/**
|
|
3479
|
+
* Sets the video source to be played. The src attribute can be a string or an object similar to the src property.
|
|
3480
|
+
*/
|
|
3481
|
+
setSrc(sources: UnsafeSource): void;
|
|
3482
|
+
/* Excluded from this release type: setSrc */
|
|
3483
|
+
/* Excluded from this release type: setAttrs */
|
|
3484
|
+
/* Excluded from this release type: opt */
|
|
3485
|
+
/* Excluded from this release type: enqueueSeek */
|
|
3486
|
+
/* Excluded from this release type: setState */
|
|
3487
|
+
setState(state: PlayerState, flag: boolean): void;
|
|
3488
|
+
/* Excluded from this release type: toJSON */
|
|
3489
|
+
/**
|
|
3490
|
+
* Adds a language to the project. See {@link https://developer.wowza.com/docs/wowza-flowplayer/player/translations/#using-npm| Official documentation}
|
|
3491
|
+
*/
|
|
3492
|
+
i18n(k: TranslationKey): string;
|
|
3493
|
+
i18n(k: string, fallback: string): string;
|
|
3494
|
+
/* Excluded from this release type: deviceId */
|
|
3495
|
+
/* Excluded from this release type: live_state */
|
|
3496
|
+
/**
|
|
3497
|
+
* A reference to the configuration state of the player.
|
|
3498
|
+
*/
|
|
3499
|
+
opts: Config;
|
|
3500
|
+
/* Excluded from this release type: plugins */
|
|
3501
|
+
/* Excluded from this release type: dvr_offset */
|
|
3502
|
+
message?: {
|
|
3503
|
+
events: Record<string, string>;
|
|
3504
|
+
};
|
|
3505
|
+
/**
|
|
3506
|
+
* A boolean specifying whether the player is disabled and the user cannot seek forward using the mouse or keyboard.
|
|
3507
|
+
* Player is disabled and enabled with the `toggleDisable()` method.
|
|
3508
|
+
*/
|
|
3509
|
+
disabled: boolean;
|
|
3510
|
+
/* Excluded from this release type: started */
|
|
3511
|
+
/* Excluded from this release type: token */
|
|
3512
|
+
/* Excluded from this release type: _customElements */
|
|
3513
|
+
/* Excluded from this release type: _storage */
|
|
3514
|
+
};
|
|
3515
|
+
|
|
3516
|
+
declare type PlayerCustomEventName = keyof PlayerCustomEventsDetailMap;
|
|
3517
|
+
|
|
3518
|
+
declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap & {
|
|
3519
|
+
[REAP]: ReapEventDetail;
|
|
3520
|
+
[SOURCE]: SourceEventDetail;
|
|
3521
|
+
[MOUNT]: MountEventDetail;
|
|
3522
|
+
[LIVE]: LiveEventDetail;
|
|
3523
|
+
[DVR]: DvrEventDetail;
|
|
3524
|
+
[RETRY]: RetryEventDetail;
|
|
3525
|
+
[RECOVER]: RecoverEventDetail;
|
|
3526
|
+
[QUALITIES]: QualitiesEventDetail;
|
|
3527
|
+
[QUALITY_CHANGE]: QualityChangeEventDetail;
|
|
3528
|
+
[STANDARD_ERROR]: FlowplayerErrorEventDetail;
|
|
3529
|
+
/* Excluded from this release type: audioonlysource */
|
|
3530
|
+
/* Excluded from this release type: renderplugin */
|
|
3531
|
+
/* Excluded from this release type: "seek:queued" */
|
|
3532
|
+
/* Excluded from this release type: "seek:cancel" */
|
|
3533
|
+
/* Excluded from this release type: "plugin:registered" */
|
|
3534
|
+
/* Excluded from this release type: intersectionchange */
|
|
3535
|
+
/* Excluded from this release type: "flowplayer:feature" */
|
|
3536
|
+
/* Excluded from this release type: beforeplay */
|
|
3537
|
+
/* Excluded from this release type: beforepause */
|
|
3538
|
+
/* Excluded from this release type: state */
|
|
3539
|
+
/* Excluded from this release type: config */
|
|
3540
|
+
/* Excluded from this release type: "error:fatal" */
|
|
3541
|
+
};
|
|
3542
|
+
|
|
3543
|
+
declare type PlayerCustomEventsOverloads = {
|
|
3544
|
+
/**
|
|
3545
|
+
* Sent when the player interface is completely rendered and you can access all the elements with CSS and JavaScript. Due to the way mounting works, this event is only accessible inside of a custom extension.
|
|
3546
|
+
*/
|
|
3547
|
+
on(event: typeof MOUNT, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof MOUNT]>) => void): Player;
|
|
3548
|
+
/**
|
|
3549
|
+
* Sent when an error occurs. Learn more about error handling.
|
|
3550
|
+
*/
|
|
3551
|
+
on(// FIXME - this event is in context-menu plugin
|
|
3552
|
+
event: typeof CONTEXT_MENU, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CONTEXT_MENU]>) => void): Player;
|
|
3553
|
+
/* Excluded from this release type: on */
|
|
3554
|
+
/* Excluded from this release type: on */
|
|
3555
|
+
/* Excluded from this release type: on */
|
|
3556
|
+
/**
|
|
3557
|
+
* Sent when the player becomes visible for the user.
|
|
3558
|
+
*/
|
|
3559
|
+
on(event: typeof VIEW_ENTER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_ENTER]>) => void): Player;
|
|
3560
|
+
/**
|
|
3561
|
+
* Sent when the player leaves the users viewport and is longer visible.
|
|
3562
|
+
*/
|
|
3563
|
+
on(event: typeof VIEW_LEAVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof VIEW_LEAVE]>) => void): Player;
|
|
3564
|
+
/**
|
|
3565
|
+
* Sent right before the player src attribute is set. This allows you to change the video URL before playback.
|
|
3566
|
+
*/
|
|
3567
|
+
on(event: typeof SOURCE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof SOURCE]>) => void): Player;
|
|
3568
|
+
/**
|
|
3569
|
+
* Emitted when an Error recovery is attempted
|
|
3570
|
+
*/
|
|
3571
|
+
on(event: typeof RECOVER, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOVER]>) => void): Player;
|
|
3572
|
+
/**
|
|
3573
|
+
* Sent when a flowplayer instance is about to be removed from the DOM, and any unsafe references are about to be reaped, which allows Single Page Applications to perform the necessary resource cleanups. This is important when working with front-end frameworks like React. This event should never be emitted directly, only listened to.
|
|
3574
|
+
*/
|
|
3575
|
+
on(event: typeof REAP, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof REAP]>) => void): Player;
|
|
3576
|
+
/**
|
|
3577
|
+
* Emitted when a player will retry to reload
|
|
3578
|
+
*/
|
|
3579
|
+
on(event: typeof RETRY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RETRY]>) => void): Player;
|
|
3580
|
+
/* Excluded from this release type: on */
|
|
3581
|
+
/**
|
|
3582
|
+
* Emitted when the set of underlying qualities has changed.
|
|
3583
|
+
*/
|
|
3584
|
+
on(event: typeof QUALITIES, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITIES]>) => void): Player;
|
|
3585
|
+
/**
|
|
3586
|
+
* Emitted when the media changes quality.
|
|
3587
|
+
*/
|
|
3588
|
+
on(event: typeof QUALITY_CHANGE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITY_CHANGE]>) => void): Player;
|
|
3589
|
+
/**
|
|
3590
|
+
* Emitted when a standard FlowplayerError is encountered
|
|
3591
|
+
*/
|
|
3592
|
+
on(event: typeof STANDARD_ERROR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof STANDARD_ERROR]>) => void): Player;
|
|
3593
|
+
/* Excluded from this release type: on */
|
|
3594
|
+
/**
|
|
3595
|
+
* Listen to this event to create a recommendations grid using the data passed with the event.
|
|
3596
|
+
*/
|
|
3597
|
+
on(event: typeof RECOMMENDATIONS_READY, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof RECOMMENDATIONS_READY]>) => void): Player;
|
|
3598
|
+
/* Excluded from this release type: on */
|
|
3599
|
+
/* Excluded from this release type: on */
|
|
3600
|
+
/**
|
|
3601
|
+
* when the player has started playing dvr content
|
|
3602
|
+
*/
|
|
3603
|
+
on(event: typeof DVR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof DVR]>) => void): Player;
|
|
3604
|
+
/**
|
|
3605
|
+
* when src is a livestream
|
|
3606
|
+
*/
|
|
3607
|
+
on(event: typeof LIVE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof LIVE]>) => void): Player;
|
|
3608
|
+
/* Excluded from this release type: on */
|
|
3609
|
+
/* Excluded from this release type: on */
|
|
3610
|
+
/* Excluded from this release type: on */
|
|
3611
|
+
/* Excluded from this release type: on */
|
|
3612
|
+
/* Excluded from this release type: on */
|
|
3613
|
+
/* Excluded from this release type: on */
|
|
3614
|
+
/**
|
|
3615
|
+
* TODO: this is a workaround, since not all event overloads are typed. when all plugin work is finished, remove this
|
|
3616
|
+
* https://wowzamedia.jira.com/browse/PLAY-653
|
|
3617
|
+
*/
|
|
3618
|
+
on<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
3619
|
+
/* Excluded from this release type: on */
|
|
3620
|
+
/**
|
|
3621
|
+
* Same as `on()`, but the handler function is executed only once.
|
|
3622
|
+
*/
|
|
3623
|
+
once<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
|
|
3624
|
+
/**
|
|
3625
|
+
* Same as `on()`, but the handler function is executed only once.
|
|
3626
|
+
*/
|
|
3627
|
+
once<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
|
|
3628
|
+
once<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
3629
|
+
/**
|
|
3630
|
+
* Removes the event handler with the specified event type.
|
|
3631
|
+
*/
|
|
3632
|
+
off<T extends PlayerCustomEventName>(event: T, handler: (e: FPEvent<PlayerCustomEventsDetailMap[T]>) => void): Player;
|
|
3633
|
+
/**
|
|
3634
|
+
* Removes the event handler with the specified event type.
|
|
3635
|
+
*/
|
|
3636
|
+
off<T extends PlayerNativeEventName>(event: T, handler: (e: PlayerNativeEventsDetailMap[T]) => void): Player;
|
|
3637
|
+
/**
|
|
3638
|
+
* Removes the event handler with the specified event type.
|
|
3639
|
+
*/
|
|
3640
|
+
off<T>(event: string, handler: (e: FPEvent<T>) => void): Player;
|
|
3641
|
+
/* Excluded from this release type: poll */
|
|
3642
|
+
emit<T extends PlayerEmittableEventNames>(event: T, data?: PlayerCustomEventsDetailMap[T]): Player;
|
|
3643
|
+
emit(event: never, data?: never): Player;
|
|
3644
|
+
/* Excluded from this release type: emit */
|
|
3645
|
+
/* Excluded from this release type: emit */
|
|
3646
|
+
};
|
|
3647
|
+
|
|
3648
|
+
declare type PlayerEmittableCustomEventsDetailMap = {
|
|
3649
|
+
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
3650
|
+
[VIEW_ENTER]: ViewEnterEventDetail;
|
|
3651
|
+
[VIEW_LEAVE]: ViewLeaveEventDetail;
|
|
3652
|
+
[RECOMMENDATIONS_READY]: RecommendationsReadyEventDetail;
|
|
3653
|
+
};
|
|
3654
|
+
|
|
3655
|
+
declare type PlayerEmittableEventNames = keyof PlayerEmittableCustomEventsDetailMap;
|
|
3656
|
+
|
|
3657
|
+
/**
|
|
3658
|
+
* @public
|
|
3659
|
+
*/
|
|
3660
|
+
declare type PlayerEventOverloads = PlayerNativeEventsOverloads & PlayerCustomEventsOverloads;
|
|
3661
|
+
|
|
3662
|
+
declare type PlayerHeight = number;
|
|
3663
|
+
|
|
3664
|
+
/**
|
|
3665
|
+
* @public
|
|
3666
|
+
*/
|
|
3667
|
+
export declare type PlayerIMAConfig = {
|
|
3668
|
+
NumRedirects?: number;
|
|
3669
|
+
/**
|
|
3670
|
+
* Defines how long to wait for ad response from the network in milliseconds. Default value is 5000.
|
|
3671
|
+
*/
|
|
3672
|
+
timeout?: number;
|
|
3673
|
+
/**
|
|
3674
|
+
* Defines how long to wait for both the ad response and the loading of the video ad in milliseconds. Default value is undefined.
|
|
3675
|
+
*/
|
|
3676
|
+
total_loading_timeout?: number;
|
|
3677
|
+
/**
|
|
3678
|
+
* Shows all ad breaks between current time and new seek position when the viewer seeks ahead in the timeline. Default value is true.
|
|
3679
|
+
*/
|
|
3680
|
+
show_all_ads_on_seek?: boolean;
|
|
3681
|
+
/**
|
|
3682
|
+
* Defines a list of ads to display.
|
|
3683
|
+
*/
|
|
3684
|
+
ads: TimeBasedAd[];
|
|
3685
|
+
/**
|
|
3686
|
+
* Sets the locale. This is proxied to the {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.ImaSdkSettings#setLocale|setLocale()} method
|
|
3687
|
+
*/
|
|
3688
|
+
Locale?: string;
|
|
3689
|
+
/**
|
|
3690
|
+
* Injects custom Ad Macro parameters into the {@link https://developer.wowza.com/docs/wowza-flowplayer/plugins/advertising/#pass-metadata-with-macros|Macro replacement engine}.
|
|
3691
|
+
*/
|
|
3692
|
+
parameters?: MacrosMap;
|
|
3693
|
+
/**
|
|
3694
|
+
* Determines if ads should automatically pause when the player is out of the viewport. Default value is true.
|
|
3695
|
+
*/
|
|
3696
|
+
autopause?: boolean;
|
|
3697
|
+
};
|
|
3698
|
+
|
|
3699
|
+
declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
|
|
3700
|
+
|
|
3701
|
+
declare type PlayerNativeEventsDetailMap = HTMLVideoElementEventMap;
|
|
3702
|
+
|
|
3703
|
+
declare type PlayerNativeEventsOverloads = {
|
|
3704
|
+
on<K extends keyof PlayerNativeEventsDetailMap>(event: K, handler: (ev: PlayerNativeEventsDetailMap[K]) => void): Player;
|
|
3705
|
+
};
|
|
3706
|
+
|
|
3707
|
+
/**
|
|
3708
|
+
* @public
|
|
3709
|
+
* The root element of the video player. This is the immediate parent element of the video tag.
|
|
3710
|
+
*/
|
|
3711
|
+
declare type PlayerRoot = HTMLElement & {
|
|
3712
|
+
/* Excluded from this release type: prevWidth */
|
|
3713
|
+
};
|
|
3714
|
+
|
|
3715
|
+
/**
|
|
3716
|
+
* @public
|
|
3717
|
+
*/
|
|
3718
|
+
declare type PlayerState = FlowplayerStates[keyof FlowplayerStates];
|
|
3719
|
+
|
|
3720
|
+
/* Excluded from this release type: _PlayerState */
|
|
3721
|
+
|
|
3722
|
+
/* Excluded from this release type: PlayerStates */
|
|
3723
|
+
|
|
3724
|
+
declare type PlayerWidth = number;
|
|
3725
|
+
|
|
3726
|
+
/**
|
|
3727
|
+
* @public
|
|
3728
|
+
*/
|
|
3729
|
+
declare type PlayerWith<T> = T & Player;
|
|
3730
|
+
|
|
3731
|
+
declare type PlayerWithOpts<PluginPlayer extends Player = Player, PluginConfig extends Config = Config> = {
|
|
3732
|
+
/* Excluded from this release type: on */
|
|
3733
|
+
} & Omit<PluginPlayer, "opts" | "setOpts"> & {
|
|
3734
|
+
opts: PluginConfig;
|
|
3735
|
+
setOpts: (config: PluginConfig) => void;
|
|
3736
|
+
};
|
|
3737
|
+
|
|
3738
|
+
declare const PLAYING = "is-playing";
|
|
3739
|
+
|
|
3740
|
+
/**
|
|
3741
|
+
* @public
|
|
3742
|
+
*/
|
|
3743
|
+
declare const /**
|
|
3744
|
+
@public
|
|
3745
|
+
* when a new player is inserted into the HTML
|
|
3746
|
+
*/ /**
|
|
3747
|
+
* @public
|
|
3748
|
+
*/
|
|
3749
|
+
PLAYING_2 = "playing";
|
|
3750
|
+
|
|
3751
|
+
/**
|
|
3752
|
+
* @public
|
|
3753
|
+
*/
|
|
3754
|
+
declare interface Plugin_2<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
3755
|
+
/**
|
|
3756
|
+
* a plugin must always implement the init method so a player instance knows how to initialize it
|
|
3757
|
+
*/
|
|
3758
|
+
init(config: PluginConfig, container: PlayerRoot, player: PluginPlayer): void;
|
|
3759
|
+
}
|
|
3760
|
+
|
|
3761
|
+
/* Excluded from this release type: PLUGIN_REGISTERED */
|
|
3762
|
+
|
|
3763
|
+
/**
|
|
3764
|
+
* @public
|
|
3765
|
+
*/
|
|
3766
|
+
declare interface PluginCtor<PluginConfig extends Config = Config, PluginPlayer extends Player = Player> {
|
|
3767
|
+
new (umd: FlowplayerUMD, player: Player): Plugin_2<PluginConfig, PluginPlayer>;
|
|
3768
|
+
pluginName: string;
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
/* Excluded from this release type: PluginRegisteredEventDetail */
|
|
3772
|
+
|
|
3773
|
+
declare type PluginStates = string;
|
|
3774
|
+
|
|
3775
|
+
/**
|
|
3776
|
+
* @public
|
|
3777
|
+
*/
|
|
3778
|
+
declare const /**
|
|
3779
|
+
@public
|
|
3780
|
+
* when a new player is inserted into the HTML
|
|
3781
|
+
*/ /**
|
|
3782
|
+
* @public
|
|
3783
|
+
*/
|
|
3784
|
+
PORTRAIT = "portrait";
|
|
3785
|
+
|
|
3786
|
+
/**
|
|
3787
|
+
* @public
|
|
3788
|
+
* Represents a bidder configuration for Prebid.js.
|
|
3789
|
+
*/
|
|
3790
|
+
export declare type PrebidBidder = {
|
|
3791
|
+
/**
|
|
3792
|
+
* the bidder name as documented in: https://docs.prebid.org/dev-docs/bidders.html
|
|
3793
|
+
*/
|
|
3794
|
+
bidder: string;
|
|
3795
|
+
/**
|
|
3796
|
+
* these are received from the specific ad network bidder and are different for every one!
|
|
3797
|
+
* each bidder's parameters can be found here: https://docs.prebid.org/dev-docs/bidders.html
|
|
3798
|
+
*/
|
|
3799
|
+
params: Record<string, any>;
|
|
3800
|
+
};
|
|
3801
|
+
|
|
3802
|
+
/**
|
|
3803
|
+
* @public
|
|
3804
|
+
* Configuration for Prebid.js integration.
|
|
3805
|
+
*/
|
|
3806
|
+
export declare type PrebidConfig = {
|
|
3807
|
+
/**
|
|
3808
|
+
* @public
|
|
3809
|
+
* Defines a list of multiple bidders. Each object within the array represents a single bidder and the parameters required to request the bid.
|
|
3810
|
+
*/
|
|
3811
|
+
bidders: Array<PrebidBidder>;
|
|
3812
|
+
/**
|
|
3813
|
+
* @public
|
|
3814
|
+
* Determines the timing of ad breaks within the video content. Represented as an array of time values in seconds.
|
|
3815
|
+
*/
|
|
3816
|
+
breaks: Array<number>;
|
|
3817
|
+
/**
|
|
3818
|
+
* @public
|
|
3819
|
+
* Passes a set of key value pairs as custom parameters when requesting bids from an ad network.
|
|
3820
|
+
*/
|
|
3821
|
+
custom_params?: Record<string, string>;
|
|
3822
|
+
/**
|
|
3823
|
+
* @public
|
|
3824
|
+
* Enables the configuration of top-level {@link https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html|pbjs.setConfig} options that overwrite supplied values. Some bidders require this top-level configuration.
|
|
3825
|
+
*/
|
|
3826
|
+
pbjs?: Record<string, any>;
|
|
3827
|
+
/* Excluded from this release type: code */
|
|
3828
|
+
/* Excluded from this release type: iu */
|
|
3829
|
+
/* Excluded from this release type: video */
|
|
3830
|
+
};
|
|
3831
|
+
|
|
3832
|
+
/* Excluded from this release type: PrebidVideoInfo */
|
|
3833
|
+
|
|
3834
|
+
/**
|
|
3835
|
+
* @public
|
|
3836
|
+
*/
|
|
3837
|
+
declare const /**
|
|
3838
|
+
@public
|
|
3839
|
+
* when a new player is inserted into the HTML
|
|
3840
|
+
*/ /**
|
|
3841
|
+
* @public
|
|
3842
|
+
*/
|
|
3843
|
+
PROGRESS = "progress";
|
|
3844
|
+
|
|
3845
|
+
/**
|
|
3846
|
+
* @public
|
|
3847
|
+
*/
|
|
3848
|
+
declare type QselOption = (Level & {
|
|
3849
|
+
level: number;
|
|
3850
|
+
}) | Representation | {
|
|
3851
|
+
name: string | number;
|
|
3852
|
+
encodingId: string;
|
|
3853
|
+
spatialLayerId: number;
|
|
3854
|
+
temporalLayerId: number;
|
|
3855
|
+
maxSpatialLayerId: number;
|
|
3856
|
+
maxTemporalLayerId: number;
|
|
3857
|
+
height: number;
|
|
3858
|
+
width: number;
|
|
3859
|
+
};
|
|
3860
|
+
|
|
3861
|
+
/**
|
|
3862
|
+
* @public
|
|
3863
|
+
* emitted whenever a list of qualities has been made available
|
|
3864
|
+
* when index 0 is the highest quality and index 0+N is the lowest
|
|
3865
|
+
*/
|
|
3866
|
+
declare const /**
|
|
3867
|
+
@public
|
|
3868
|
+
* when a new player is inserted into the HTML
|
|
3869
|
+
*/ /**
|
|
3870
|
+
* @public
|
|
3871
|
+
* emitted whenever a list of qualities has been made available
|
|
3872
|
+
* when index 0 is the highest quality and index 0+N is the lowest
|
|
3873
|
+
*/
|
|
3874
|
+
QUALITIES = "qualities";
|
|
3875
|
+
|
|
3876
|
+
/**
|
|
3877
|
+
* @public
|
|
3878
|
+
*/
|
|
3879
|
+
declare type QualitiesEventDetail = QselOption[];
|
|
3880
|
+
|
|
3881
|
+
/**
|
|
3882
|
+
* @public
|
|
3883
|
+
* emitted whenever the media changes quality
|
|
3884
|
+
*/
|
|
3885
|
+
declare const /**
|
|
3886
|
+
@public
|
|
3887
|
+
* when a new player is inserted into the HTML
|
|
3888
|
+
*/ /**
|
|
3889
|
+
* @public
|
|
3890
|
+
* emitted whenever the media changes quality
|
|
3891
|
+
*/
|
|
3892
|
+
QUALITY_CHANGE = "qualitychange";
|
|
3893
|
+
|
|
3894
|
+
/**
|
|
3895
|
+
* @public
|
|
3896
|
+
*/
|
|
3897
|
+
declare type QualityChangeEventDetail = {
|
|
3898
|
+
before?: (Level & {
|
|
3899
|
+
level?: number;
|
|
3900
|
+
}) | Representation;
|
|
3901
|
+
after: (Level & {
|
|
3902
|
+
level?: number;
|
|
3903
|
+
}) | Representation;
|
|
3904
|
+
plugin: string;
|
|
3905
|
+
automatic: boolean;
|
|
3906
|
+
/* Excluded from this release type: downscale */
|
|
3907
|
+
};
|
|
3908
|
+
|
|
3909
|
+
declare enum QualityOpts {
|
|
3910
|
+
LOW = 1,
|
|
3911
|
+
MEDIUM = 2,
|
|
3912
|
+
HIGH = 4
|
|
3913
|
+
}
|
|
3914
|
+
|
|
3915
|
+
/**
|
|
3916
|
+
* @public
|
|
3917
|
+
* emitted when it is safe to clean up a fp instance
|
|
3918
|
+
*/
|
|
3919
|
+
declare const /**
|
|
3920
|
+
@public
|
|
3921
|
+
* when a new player is inserted into the HTML
|
|
3922
|
+
*/ /**
|
|
3923
|
+
* @public
|
|
3924
|
+
* emitted when it is safe to clean up a fp instance
|
|
3925
|
+
*/
|
|
3926
|
+
REAP = "reap";
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* @public
|
|
3930
|
+
*/
|
|
3931
|
+
declare type ReapEventDetail = null;
|
|
3932
|
+
|
|
3933
|
+
/**
|
|
3934
|
+
* @public
|
|
3935
|
+
*/
|
|
3936
|
+
declare type RecommendationItem = {
|
|
3937
|
+
poster?: string;
|
|
3938
|
+
src?: UnsafeSource;
|
|
3939
|
+
title?: string;
|
|
3940
|
+
description?: string;
|
|
3941
|
+
metadata: OVPMetadata;
|
|
3942
|
+
chapters?: {
|
|
3943
|
+
src: string;
|
|
3944
|
+
};
|
|
3945
|
+
thumbnails?: {
|
|
3946
|
+
src: string;
|
|
3947
|
+
};
|
|
3948
|
+
subtitles?: string[];
|
|
3949
|
+
};
|
|
3950
|
+
|
|
3951
|
+
/**
|
|
3952
|
+
* @public
|
|
3953
|
+
*/
|
|
3954
|
+
declare const /**
|
|
3955
|
+
@public
|
|
3956
|
+
* when a new player is inserted into the HTML
|
|
3957
|
+
*/ /**
|
|
3958
|
+
* @deprecated please use Endscreen.events.RECOMMENDATIONS_READY / flowplayer.endscreen.events.RECOMMENDATIONS_READY
|
|
3959
|
+
**/
|
|
3960
|
+
/**
|
|
3961
|
+
* @public
|
|
3962
|
+
*/
|
|
3963
|
+
RECOMMENDATIONS_READY = "recommendationsready";
|
|
3964
|
+
|
|
3965
|
+
/**
|
|
3966
|
+
* @public
|
|
3967
|
+
*/
|
|
3968
|
+
declare type RecommendationsReadyEventDetail = {
|
|
3969
|
+
playlist: RecommendationItem[];
|
|
3970
|
+
};
|
|
3971
|
+
|
|
3972
|
+
/**
|
|
3973
|
+
* @public
|
|
3974
|
+
* emitted when an Error recovery is attempted
|
|
3975
|
+
*/
|
|
3976
|
+
declare const /**
|
|
3977
|
+
@public
|
|
3978
|
+
* when a new player is inserted into the HTML
|
|
3979
|
+
*/ /**
|
|
3980
|
+
* @public
|
|
3981
|
+
* emitted when an Error recovery is attempted
|
|
3982
|
+
*/
|
|
3983
|
+
RECOVER = "recover";
|
|
3984
|
+
|
|
3985
|
+
/**
|
|
3986
|
+
* @public
|
|
3987
|
+
*/
|
|
3988
|
+
declare type RecoverEventDetail = null;
|
|
3989
|
+
|
|
3990
|
+
declare const RELOAD_AD_REQUESTED = "reload-ad-requested";
|
|
3991
|
+
|
|
3992
|
+
/**
|
|
3993
|
+
* @public
|
|
3994
|
+
*/
|
|
3995
|
+
export declare type ReloadAdRequestedEventDetail = boolean;
|
|
3996
|
+
|
|
3997
|
+
declare const REMAINING_TIME: number;
|
|
3998
|
+
|
|
3999
|
+
/* Excluded from this release type: REMOTE_SESSION_ENDED */
|
|
4000
|
+
|
|
4001
|
+
/* Excluded from this release type: REMOTE_SESSION_STARTED */
|
|
4002
|
+
|
|
4003
|
+
/* Excluded from this release type: RENDER_PLUGIN */
|
|
4004
|
+
|
|
4005
|
+
/**
|
|
4006
|
+
* @public
|
|
4007
|
+
*/
|
|
4008
|
+
declare type RenderPluginEventDetail = HTMLElement;
|
|
4009
|
+
|
|
4010
|
+
/**
|
|
4011
|
+
* used by ui elements to toggle mute / unmute
|
|
4012
|
+
*/
|
|
4013
|
+
declare const REQUEST_AD_MUTE_UNMUTE = "request/ad/muteunmute";
|
|
4014
|
+
|
|
4015
|
+
/**
|
|
4016
|
+
* used by ui elements to signal to the ads controller that the current ad should be paused by the adapter
|
|
4017
|
+
*/
|
|
4018
|
+
declare const REQUEST_AD_PAUSE = "request/ad/pause";
|
|
4019
|
+
|
|
4020
|
+
/**
|
|
4021
|
+
* used by ui elements to signal to the ads controller that the current ad playback should be resumed by the adapter
|
|
4022
|
+
*/
|
|
4023
|
+
declare const REQUEST_AD_PLAY = "request/ad/play";
|
|
4024
|
+
|
|
4025
|
+
/**
|
|
4026
|
+
* @public
|
|
4027
|
+
*/
|
|
4028
|
+
export declare type RequestAdMuteUnmuteEventDetail = null;
|
|
4029
|
+
|
|
4030
|
+
/**
|
|
4031
|
+
* @public
|
|
4032
|
+
*/
|
|
4033
|
+
export declare type RequestAdPauseEventDetail = null;
|
|
4034
|
+
|
|
4035
|
+
/**
|
|
4036
|
+
* @public
|
|
4037
|
+
*/
|
|
4038
|
+
export declare type RequestAdPlayEventDetail = null;
|
|
4039
|
+
|
|
4040
|
+
/**
|
|
4041
|
+
* @public
|
|
4042
|
+
*/
|
|
4043
|
+
declare const /**
|
|
4044
|
+
@public
|
|
4045
|
+
* when a new player is inserted into the HTML
|
|
4046
|
+
*/ /**
|
|
4047
|
+
* @public
|
|
4048
|
+
*/
|
|
4049
|
+
RESIZE = "resize";
|
|
4050
|
+
|
|
4051
|
+
declare type ResizeInfo = {
|
|
4052
|
+
width: number;
|
|
4053
|
+
height: number;
|
|
4054
|
+
linear: boolean;
|
|
4055
|
+
silent: boolean;
|
|
4056
|
+
resize_non_linear: boolean;
|
|
4057
|
+
};
|
|
4058
|
+
|
|
4059
|
+
/**
|
|
4060
|
+
* @public
|
|
4061
|
+
*/
|
|
4062
|
+
declare const /**
|
|
4063
|
+
@public
|
|
4064
|
+
* when a new player is inserted into the HTML
|
|
4065
|
+
*/ /**
|
|
4066
|
+
* @public
|
|
4067
|
+
*/
|
|
4068
|
+
RETRY = "retry";
|
|
4069
|
+
|
|
4070
|
+
/**
|
|
4071
|
+
* @public
|
|
4072
|
+
*/
|
|
4073
|
+
declare type RetryEventDetail = FlowplayerErrorEventDetail;
|
|
4074
|
+
|
|
4075
|
+
declare const RetryMap: {
|
|
4076
|
+
readonly ON: "on";
|
|
4077
|
+
readonly WITHOUT_RECOVERY: "without_recovery";
|
|
4078
|
+
readonly OFF: "off";
|
|
4079
|
+
};
|
|
4080
|
+
|
|
4081
|
+
declare const RTL = "is-rtl";
|
|
4082
|
+
|
|
4083
|
+
declare const SampleRate: {
|
|
4084
|
+
/**
|
|
4085
|
+
* for new features with low adoption rates, or features that are likely to not be used frequently, will include every single instance in the sample.
|
|
4086
|
+
*/
|
|
4087
|
+
readonly All: 1;
|
|
4088
|
+
/**
|
|
4089
|
+
* for events we anticipate receive a lot of usage and maybe happen frequently per session
|
|
4090
|
+
*/
|
|
4091
|
+
readonly High: 0.1;
|
|
4092
|
+
/**
|
|
4093
|
+
* for events that can happen quickly, but not in massive amounts
|
|
4094
|
+
*/
|
|
4095
|
+
readonly Medium: 0.01;
|
|
4096
|
+
/**
|
|
4097
|
+
* for very high volume events where you only want to sample a low amount of them (think volumechange | timeupdate)
|
|
4098
|
+
*/
|
|
4099
|
+
readonly Low: 0.001;
|
|
4100
|
+
/**
|
|
4101
|
+
* placeholder for never sampling something, useful in situations where we want to add code to sample, but maybe not turn it on just yet.
|
|
4102
|
+
*/
|
|
4103
|
+
readonly None: 0;
|
|
4104
|
+
};
|
|
4105
|
+
|
|
4106
|
+
/**
|
|
4107
|
+
* @public
|
|
4108
|
+
*/
|
|
4109
|
+
declare const /**
|
|
4110
|
+
@public
|
|
4111
|
+
* when a new player is inserted into the HTML
|
|
4112
|
+
*/ /**
|
|
4113
|
+
* @public
|
|
4114
|
+
*/
|
|
4115
|
+
SCROLL = "scroll";
|
|
4116
|
+
|
|
4117
|
+
declare const SEAMLESS = "is-seamless";
|
|
4118
|
+
|
|
4119
|
+
/* Excluded from this release type: SEEK_CANCEL */
|
|
4120
|
+
|
|
4121
|
+
/* Excluded from this release type: SEEK_QUEUED */
|
|
4122
|
+
|
|
4123
|
+
declare const SEEKABLE = "is-seekable";
|
|
4124
|
+
|
|
4125
|
+
/* Excluded from this release type: SeekCancelEventDetail */
|
|
4126
|
+
|
|
4127
|
+
/**
|
|
4128
|
+
* @public
|
|
4129
|
+
*/
|
|
4130
|
+
declare const /**
|
|
4131
|
+
@public
|
|
4132
|
+
* when a new player is inserted into the HTML
|
|
4133
|
+
*/ /**
|
|
4134
|
+
* @public
|
|
4135
|
+
*/
|
|
4136
|
+
SEEKED = "seeked";
|
|
4137
|
+
|
|
4138
|
+
declare const SEEKING = "is-seeking";
|
|
4139
|
+
|
|
4140
|
+
/**
|
|
4141
|
+
* @public
|
|
4142
|
+
*/
|
|
4143
|
+
declare const /**
|
|
4144
|
+
@public
|
|
4145
|
+
* when a new player is inserted into the HTML
|
|
4146
|
+
*/ /**
|
|
4147
|
+
* @public
|
|
4148
|
+
*/
|
|
4149
|
+
SEEKING_2 = "seeking";
|
|
4150
|
+
|
|
4151
|
+
/* Excluded from this release type: SeekQueuedEventDetail */
|
|
4152
|
+
|
|
4153
|
+
/**
|
|
4154
|
+
* @public
|
|
4155
|
+
* @deprecated please use Qsel.events.SET_QUALITY
|
|
4156
|
+
*/
|
|
4157
|
+
declare const /**
|
|
4158
|
+
@public
|
|
4159
|
+
* when a new player is inserted into the HTML
|
|
4160
|
+
*/ /**
|
|
4161
|
+
* @public
|
|
4162
|
+
* @deprecated please use Qsel.events.SET_QUALITY
|
|
4163
|
+
*/
|
|
4164
|
+
SET_QUALITY = "quality:set";
|
|
4165
|
+
|
|
4166
|
+
declare const SMALL = "is-small";
|
|
4167
|
+
|
|
4168
|
+
/**
|
|
4169
|
+
* @public
|
|
4170
|
+
* emitted when a valid source is found prior to mounting
|
|
4171
|
+
*/
|
|
4172
|
+
declare const /**
|
|
4173
|
+
@public
|
|
4174
|
+
* when a new player is inserted into the HTML
|
|
4175
|
+
*/ /**
|
|
4176
|
+
* @public
|
|
4177
|
+
* emitted when a valid source is found prior to mounting
|
|
4178
|
+
*/
|
|
4179
|
+
SOURCE = "src";
|
|
4180
|
+
|
|
4181
|
+
/**
|
|
4182
|
+
* @public
|
|
4183
|
+
*/
|
|
4184
|
+
declare type SourceEventDetail = SourceObj;
|
|
4185
|
+
|
|
4186
|
+
/**
|
|
4187
|
+
* @public
|
|
4188
|
+
*/
|
|
4189
|
+
declare type SourceObj<T = unknown> = {
|
|
4190
|
+
src?: SourceStr;
|
|
4191
|
+
/**
|
|
4192
|
+
* the MIME type (example `video/mp4` or `application/x-mpegurl`)
|
|
4193
|
+
*/
|
|
4194
|
+
type?: string;
|
|
4195
|
+
} & T;
|
|
4196
|
+
|
|
4197
|
+
/**
|
|
4198
|
+
* @public
|
|
4199
|
+
*/
|
|
4200
|
+
declare type SourceStr = string;
|
|
4201
|
+
|
|
4202
|
+
/**
|
|
4203
|
+
* @public
|
|
4204
|
+
*/
|
|
4205
|
+
declare type SourceWith<T> = SourceObj & T;
|
|
4206
|
+
|
|
4207
|
+
/**
|
|
4208
|
+
* @public
|
|
4209
|
+
* emitted to handle playback related errors
|
|
4210
|
+
*/
|
|
4211
|
+
declare const /**
|
|
4212
|
+
@public
|
|
4213
|
+
* when a new player is inserted into the HTML
|
|
4214
|
+
*/ /**
|
|
4215
|
+
* @public
|
|
4216
|
+
* emitted to handle playback related errors
|
|
4217
|
+
*/
|
|
4218
|
+
STANDARD_ERROR = "flowplayer:error";
|
|
4219
|
+
|
|
4220
|
+
declare const STARTING = "is-starting";
|
|
4221
|
+
|
|
4222
|
+
/* Excluded from this release type: STATE */
|
|
4223
|
+
|
|
4224
|
+
/* Excluded from this release type: StateEventDetail */
|
|
4225
|
+
|
|
4226
|
+
declare namespace states {
|
|
4227
|
+
export {
|
|
4228
|
+
PLAYING,
|
|
4229
|
+
FULLSCREEN,
|
|
4230
|
+
PAUSED,
|
|
4231
|
+
MUTED,
|
|
4232
|
+
LOADED,
|
|
4233
|
+
LOADING,
|
|
4234
|
+
STARTING,
|
|
4235
|
+
SEEKING,
|
|
4236
|
+
GRABBING,
|
|
4237
|
+
DISABLED,
|
|
4238
|
+
SMALL,
|
|
4239
|
+
TINY,
|
|
4240
|
+
RTL,
|
|
4241
|
+
TV,
|
|
4242
|
+
ENDED,
|
|
4243
|
+
LIVE_2 as LIVE,
|
|
4244
|
+
ERRORED,
|
|
4245
|
+
WAITING,
|
|
4246
|
+
AUTOPLAY,
|
|
4247
|
+
SEAMLESS,
|
|
4248
|
+
TOGGLING,
|
|
4249
|
+
LIVE_SEEKED,
|
|
4250
|
+
NO_DVR,
|
|
4251
|
+
HAS_POSTER,
|
|
4252
|
+
WILL_PLAY,
|
|
4253
|
+
WILL_PAUSE,
|
|
4254
|
+
MENU_OPENED,
|
|
4255
|
+
TOUCHED,
|
|
4256
|
+
HOVERED,
|
|
4257
|
+
TOUCH_DEVICE,
|
|
4258
|
+
WILL_SEEK,
|
|
4259
|
+
SEEKABLE,
|
|
4260
|
+
IN_VIEWPORT,
|
|
4261
|
+
NO_CONTROLS,
|
|
4262
|
+
DESTROYED,
|
|
4263
|
+
IS_SOURCE_PROCESSING
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4267
|
+
declare const STICKY_CONTROLS: number;
|
|
4268
|
+
|
|
4269
|
+
/**
|
|
4270
|
+
* @public
|
|
4271
|
+
*/
|
|
4272
|
+
declare const /**
|
|
4273
|
+
@public
|
|
4274
|
+
* when a new player is inserted into the HTML
|
|
4275
|
+
*/ /**
|
|
4276
|
+
* @public
|
|
4277
|
+
*/
|
|
4278
|
+
TIME_UPDATE = "timeupdate";
|
|
4279
|
+
|
|
4280
|
+
/**
|
|
4281
|
+
* @public
|
|
4282
|
+
* Configuration for a time-based ad.
|
|
4283
|
+
*/
|
|
4284
|
+
export declare type TimeBasedAd = BaseAdObj & {
|
|
4285
|
+
/**
|
|
4286
|
+
* Specifies a time to show the adTag: 0 is a pre-roll, -1 is post-roll. Values above 0 set the ad time in seconds.
|
|
4287
|
+
*/
|
|
4288
|
+
time: number;
|
|
4289
|
+
};
|
|
4290
|
+
|
|
4291
|
+
declare const TINY = "is-tiny";
|
|
4292
|
+
|
|
4293
|
+
/**
|
|
4294
|
+
* placeholder for todo types that we can use our editors to easily trace
|
|
4295
|
+
*/
|
|
4296
|
+
declare type Todo = any;
|
|
4297
|
+
|
|
4298
|
+
declare const TOGGLING = "is-toggling";
|
|
4299
|
+
|
|
4300
|
+
/**
|
|
4301
|
+
* @public
|
|
4302
|
+
*/
|
|
4303
|
+
declare const /**
|
|
4304
|
+
@public
|
|
4305
|
+
* when a new player is inserted into the HTML
|
|
4306
|
+
*/ /**
|
|
4307
|
+
* @public
|
|
4308
|
+
*/
|
|
4309
|
+
TOUCH_CANCEL = "touchcancel";
|
|
4310
|
+
|
|
4311
|
+
declare const TOUCH_DEVICE = "is-touch-device";
|
|
4312
|
+
|
|
4313
|
+
/**
|
|
4314
|
+
* @public
|
|
4315
|
+
*/
|
|
4316
|
+
declare const /**
|
|
4317
|
+
@public
|
|
4318
|
+
* when a new player is inserted into the HTML
|
|
4319
|
+
*/ /**
|
|
4320
|
+
* @public
|
|
4321
|
+
*/
|
|
4322
|
+
TOUCH_END = "touchend";
|
|
4323
|
+
|
|
4324
|
+
/**
|
|
4325
|
+
* @public
|
|
4326
|
+
*/
|
|
4327
|
+
declare const /**
|
|
4328
|
+
@public
|
|
4329
|
+
* when a new player is inserted into the HTML
|
|
4330
|
+
*/ /**
|
|
4331
|
+
* @public
|
|
4332
|
+
*/
|
|
4333
|
+
TOUCH_MOVE = "touchmove";
|
|
4334
|
+
|
|
4335
|
+
/**
|
|
4336
|
+
* @public
|
|
4337
|
+
*/
|
|
4338
|
+
declare const /**
|
|
4339
|
+
@public
|
|
4340
|
+
* when a new player is inserted into the HTML
|
|
4341
|
+
*/ /**
|
|
4342
|
+
* @public
|
|
4343
|
+
*/
|
|
4344
|
+
TOUCH_START = "touchstart";
|
|
4345
|
+
|
|
4346
|
+
declare const TOUCHED = "is-touched";
|
|
4347
|
+
|
|
4348
|
+
/**
|
|
4349
|
+
* @public
|
|
4350
|
+
* All possible full paths to each translation, i.e. "core.mute"| "core.play" | "ads.ad" etc.
|
|
4351
|
+
* This type is useful for developers using translation querying based on path, like in lodash's get()
|
|
4352
|
+
*/
|
|
4353
|
+
declare type TranslationKey = Paths<Translation, {
|
|
4354
|
+
leavesOnly: true;
|
|
4355
|
+
}>;
|
|
4356
|
+
|
|
4357
|
+
declare type TSampleRate = typeof SampleRate;
|
|
4358
|
+
|
|
4359
|
+
declare const TV = "is-tv";
|
|
4360
|
+
|
|
4361
|
+
/**
|
|
4362
|
+
* @public
|
|
4363
|
+
*/
|
|
4364
|
+
declare type UnsafeSource<SrcMixin = unknown> = SourceStr | SourceObj<SrcMixin> | Array<SourceStr | SourceObj<SrcMixin>>;
|
|
4365
|
+
|
|
4366
|
+
declare type ValidSampleRate = TSampleRate[keyof TSampleRate];
|
|
4367
|
+
|
|
4368
|
+
/**
|
|
4369
|
+
* @public
|
|
4370
|
+
* emitted when a video track is selected
|
|
4371
|
+
*/
|
|
4372
|
+
declare const /**
|
|
4373
|
+
@public
|
|
4374
|
+
* when a new player is inserted into the HTML
|
|
4375
|
+
*/ /**
|
|
4376
|
+
* @public
|
|
4377
|
+
* emitted when a video track is selected
|
|
4378
|
+
*/
|
|
4379
|
+
VIDEO_TRACK_SELECT = "tracks:video:select";
|
|
4380
|
+
|
|
4381
|
+
/**
|
|
4382
|
+
* @public
|
|
4383
|
+
* emitted whenever multiple video tracks are detected
|
|
4384
|
+
*/
|
|
4385
|
+
declare const /**
|
|
4386
|
+
@public
|
|
4387
|
+
* when a new player is inserted into the HTML
|
|
4388
|
+
*/ /**
|
|
4389
|
+
* @public
|
|
4390
|
+
* emitted whenever multiple video tracks are detected
|
|
4391
|
+
*/
|
|
4392
|
+
VIDEO_TRACKS = "videoTracks";
|
|
4393
|
+
|
|
4394
|
+
/**
|
|
4395
|
+
* @public
|
|
4396
|
+
* when a player enters the viewpoint
|
|
4397
|
+
*/
|
|
4398
|
+
declare const /**
|
|
4399
|
+
@public
|
|
4400
|
+
* when a new player is inserted into the HTML
|
|
4401
|
+
*/ /**
|
|
4402
|
+
* @public
|
|
4403
|
+
* when a player enters the viewpoint
|
|
4404
|
+
*/
|
|
4405
|
+
VIEW_ENTER = "viewenter";
|
|
4406
|
+
|
|
4407
|
+
/**
|
|
4408
|
+
* @public
|
|
4409
|
+
* when a player leaves the viewport
|
|
4410
|
+
*/
|
|
4411
|
+
declare const /**
|
|
4412
|
+
@public
|
|
4413
|
+
* when a new player is inserted into the HTML
|
|
4414
|
+
*/ /**
|
|
4415
|
+
* @public
|
|
4416
|
+
* when a player leaves the viewport
|
|
4417
|
+
*/
|
|
4418
|
+
VIEW_LEAVE = "viewleave";
|
|
4419
|
+
|
|
4420
|
+
/**
|
|
4421
|
+
* @public
|
|
4422
|
+
*/
|
|
4423
|
+
declare type ViewEnterEventDetail = null;
|
|
4424
|
+
|
|
4425
|
+
/**
|
|
4426
|
+
* @public
|
|
4427
|
+
*/
|
|
4428
|
+
declare type ViewLeaveEventDetail = null;
|
|
4429
|
+
|
|
4430
|
+
declare const VOLUME_BAR: number;
|
|
4431
|
+
|
|
4432
|
+
/**
|
|
4433
|
+
* @public
|
|
4434
|
+
*/
|
|
4435
|
+
declare const /**
|
|
4436
|
+
@public
|
|
4437
|
+
* when a new player is inserted into the HTML
|
|
4438
|
+
*/ /**
|
|
4439
|
+
* @public
|
|
4440
|
+
*/
|
|
4441
|
+
VOLUME_CHANGE = "volumechange";
|
|
4442
|
+
|
|
4443
|
+
/* Excluded from this release type: VPAID_INIT */
|
|
4444
|
+
|
|
4445
|
+
/* Excluded from this release type: VpaidInitEventDetail */
|
|
4446
|
+
|
|
4447
|
+
declare const WAITING = "is-waiting";
|
|
4448
|
+
|
|
4449
|
+
/**
|
|
4450
|
+
* @public
|
|
4451
|
+
*/
|
|
4452
|
+
declare const /**
|
|
4453
|
+
@public
|
|
4454
|
+
* when a new player is inserted into the HTML
|
|
4455
|
+
*/ /**
|
|
4456
|
+
* @public
|
|
4457
|
+
*/
|
|
4458
|
+
WAITING_2 = "waiting";
|
|
4459
|
+
|
|
4460
|
+
/* Excluded from this release type: WEBKIT_NEEDKEY */
|
|
4461
|
+
|
|
4462
|
+
declare const WILL_PAUSE = "will-pause";
|
|
4463
|
+
|
|
4464
|
+
declare const WILL_PLAY = "will-play";
|
|
4465
|
+
|
|
4466
|
+
declare const WILL_SEEK = "will-seek";
|
|
4467
|
+
|
|
4468
|
+
export { }
|