@castlabs/prestoplay 6.17.1 → 6.19.0
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/CHANGELOG.md +55 -0
- package/cjs/cl.adobe.js +3 -3
- package/cjs/cl.airplay.js +3 -3
- package/cjs/cl.broadpeak.js +7 -7
- package/cjs/cl.cast.js +115 -114
- package/cjs/cl.conviva.js +33 -33
- package/cjs/cl.core.js +575 -565
- package/cjs/cl.crypto.js +9 -9
- package/cjs/cl.dash.js +77 -74
- package/cjs/cl.externs.js +175 -293
- package/cjs/cl.freewheel.js +24 -24
- package/cjs/cl.hls.js +70 -69
- package/cjs/cl.hlssmpte.js +6 -6
- package/cjs/cl.htmlcue.js +29 -29
- package/cjs/cl.ima.js +24 -24
- package/cjs/cl.mse.js +315 -314
- package/cjs/cl.muxdata.js +15 -15
- package/cjs/cl.onboard.js +3 -3
- package/cjs/cl.persistent.js +14 -14
- package/cjs/cl.playlist.js +6 -6
- package/cjs/cl.sessions.js +16 -15
- package/cjs/cl.simid.js +15 -15
- package/cjs/cl.smooth.js +72 -72
- package/cjs/cl.thumbnails.js +26 -26
- package/cjs/cl.tizen.js +71 -71
- package/cjs/cl.ttml.js +29 -28
- package/cjs/cl.verimatrix.js +5 -5
- package/cjs/cl.vimond.js +13 -13
- package/cjs/cl.vr.js +19 -19
- package/cjs/cl.vtt.js +14 -14
- package/cjs/cl.youbora.js +18 -18
- package/cl.adobe.js +3 -3
- package/cl.airplay.js +3 -3
- package/cl.broadpeak.js +5 -5
- package/cl.cast.js +90 -89
- package/cl.conviva.js +27 -27
- package/cl.core.js +473 -466
- package/cl.crypto.js +9 -9
- package/cl.dash.js +72 -70
- package/cl.externs.js +172 -294
- package/cl.freewheel.js +19 -19
- package/cl.hls.js +74 -72
- package/cl.hlssmpte.js +5 -5
- package/cl.htmlcue.js +26 -26
- package/cl.ima.js +17 -17
- package/cl.mse.js +276 -273
- package/cl.muxdata.js +13 -13
- package/cl.onboard.js +4 -4
- package/cl.persistent.js +11 -11
- package/cl.playlist.js +5 -5
- package/cl.sessions.js +10 -10
- package/cl.simid.js +13 -13
- package/cl.smooth.js +59 -59
- package/cl.thumbnails.js +19 -19
- package/cl.tizen.js +57 -57
- package/cl.ttml.js +22 -22
- package/cl.verimatrix.js +4 -4
- package/cl.vimond.js +8 -8
- package/cl.vr.js +15 -15
- package/cl.vtt.js +12 -12
- package/cl.youbora.js +15 -15
- package/clpp.styles.css +14 -0
- package/package.json +2 -2
- package/typings.d.ts +406 -377
package/typings.d.ts
CHANGED
|
@@ -183,6 +183,9 @@ export namespace clpp {
|
|
|
183
183
|
create(config: clpp.PlayerConfiguration): clpp.PlayerPlugin|null;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Adaptive Bitrate Streaming (ABR) configuration.
|
|
188
|
+
*/
|
|
186
189
|
export type AbrConfiguration = {
|
|
187
190
|
/**
|
|
188
191
|
* The largest fraction of the estimated bandwidth we should use. We should
|
|
@@ -209,7 +212,7 @@ export namespace clpp {
|
|
|
209
212
|
enabled: boolean;
|
|
210
213
|
/**
|
|
211
214
|
* Restrictions used only for initial ABR selection. This can be used i.e.
|
|
212
|
-
* in DRM multikey scenarios, to ensure that first selected track will be
|
|
215
|
+
* in DRM multikey scenarios, to ensure that the first selected track will be
|
|
213
216
|
* playable on any platform. Restrictions are applied on every playback
|
|
214
217
|
* attempt if defined.
|
|
215
218
|
*/
|
|
@@ -219,23 +222,26 @@ export namespace clpp {
|
|
|
219
222
|
* Any track that fails to meet these restrictions will not be selected
|
|
220
223
|
* automatically, but will still appear in the track list and can be selected
|
|
221
224
|
* via {@link clpp.TrackManager#setVideoTrack}. If no tracks meet these
|
|
222
|
-
* restrictions,
|
|
223
|
-
* or low-bandwidth variant instead.
|
|
225
|
+
* restrictions, the ABR Manager should not fail but should choose
|
|
226
|
+
* a low-resolution or low-bandwidth variant instead.
|
|
224
227
|
*/
|
|
225
|
-
restrictions
|
|
228
|
+
restrictions?: clpp.Restrictions;
|
|
226
229
|
/**
|
|
227
230
|
* The minimum amount of time that must pass between switches, in
|
|
228
231
|
* seconds. This keeps us from changing too often and annoying the user.
|
|
229
232
|
*/
|
|
230
233
|
switchInterval: number;
|
|
231
234
|
/**
|
|
232
|
-
* Defaults to
|
|
235
|
+
* Defaults to true.
|
|
233
236
|
*
|
|
234
|
-
* Enables reading CMSD (Common Media Server Data) of
|
|
237
|
+
* Enables reading CMSD (Common Media Server Data) of requests
|
|
235
238
|
* and use it for ABR decisions.
|
|
236
|
-
* estimatedThroughputKbps(etp)
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
+
* estimatedThroughputKbps (etp)
|
|
240
|
+
* When property is present as part of CMSD-Dynamic header
|
|
241
|
+
* its value is used as a bandwidth estimate.
|
|
242
|
+
* maxSuggestedBitrateKbps (mb)
|
|
243
|
+
* When property is present as part of CMSD-Dynamic header
|
|
244
|
+
* its value is used as a maximum bandwidth limit.
|
|
239
245
|
*/
|
|
240
246
|
useCmsd: boolean;
|
|
241
247
|
/**
|
|
@@ -246,6 +252,16 @@ export namespace clpp {
|
|
|
246
252
|
useSwitchIntervalForInitialSwitch: boolean;
|
|
247
253
|
}
|
|
248
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Configuration for ads.
|
|
257
|
+
*/
|
|
258
|
+
export type AdsConfiguration = {
|
|
259
|
+
/**
|
|
260
|
+
* Configuration for ads based on HLS interstitials.
|
|
261
|
+
*/
|
|
262
|
+
hls?: clpp.HlsAdsConfiguration;
|
|
263
|
+
}
|
|
264
|
+
|
|
249
265
|
/**
|
|
250
266
|
* Broadpeak plugin configuration.
|
|
251
267
|
*/
|
|
@@ -437,6 +453,12 @@ export namespace clpp {
|
|
|
437
453
|
* By default player tries to setup most secure system on given platform.
|
|
438
454
|
*/
|
|
439
455
|
preferredDrmSystem?: clpp.drm.KeySystem;
|
|
456
|
+
/**
|
|
457
|
+
* The version of the Widevine key system. This option may be used in order
|
|
458
|
+
* to enable experimental versions of the Widevine key system such as
|
|
459
|
+
* "com.widevine.alpha.experiment" or "com.widevine.alpha.experiment2".
|
|
460
|
+
*/
|
|
461
|
+
widevineVersion?: string;
|
|
440
462
|
}
|
|
441
463
|
|
|
442
464
|
/**
|
|
@@ -690,6 +712,21 @@ export namespace clpp {
|
|
|
690
712
|
type: clpp.ads.PodType;
|
|
691
713
|
}
|
|
692
714
|
|
|
715
|
+
/**
|
|
716
|
+
* Configuration for ads based on HLS interstitials.
|
|
717
|
+
*/
|
|
718
|
+
export type HlsAdsConfiguration = {
|
|
719
|
+
/**
|
|
720
|
+
* If true enable support.
|
|
721
|
+
*/
|
|
722
|
+
enable?: boolean;
|
|
723
|
+
/**
|
|
724
|
+
* How many seconds ahead of an interstitial date range should its
|
|
725
|
+
* interstitial assets or asset lists be requested and preloaded.
|
|
726
|
+
*/
|
|
727
|
+
resolutionOffsetSec?: number;
|
|
728
|
+
}
|
|
729
|
+
|
|
693
730
|
/**
|
|
694
731
|
* HLS-SMPTE plugin configuration.
|
|
695
732
|
*/
|
|
@@ -883,6 +920,10 @@ export namespace clpp {
|
|
|
883
920
|
* Supported values: `4.0.0.0`, `4.1.0.0`, `4.2.0.0`, `4.3.0.0`.
|
|
884
921
|
*/
|
|
885
922
|
playreadyVersion: string;
|
|
923
|
+
/**
|
|
924
|
+
* Configuration of the timeline.
|
|
925
|
+
*/
|
|
926
|
+
timeline?: clpp.TimelineConfiguration;
|
|
886
927
|
/**
|
|
887
928
|
* If true, xlink-related errors will result in a fallback to the tag's
|
|
888
929
|
* existing contents. If false, xlink-related errors will be propagated
|
|
@@ -897,15 +938,14 @@ export namespace clpp {
|
|
|
897
938
|
*/
|
|
898
939
|
export type MediaSourceConfiguration = {
|
|
899
940
|
/**
|
|
900
|
-
* The switching
|
|
901
|
-
*
|
|
902
|
-
*
|
|
903
|
-
*
|
|
904
|
-
*
|
|
905
|
-
*
|
|
906
|
-
* switching, whether through ABR or user selection.
|
|
941
|
+
* The switching strategy determines how to handle codec changes during
|
|
942
|
+
* playback. The `SMOOTH` strategy uses `SourceBuffer.changeType()` - if
|
|
943
|
+
* it’s available and reliably supported on a device - to dynamically switch
|
|
944
|
+
* between streams encoded with different codecs. The `PREVENT` strategy,
|
|
945
|
+
* which is the default, actively tries to prevent scenarios where different
|
|
946
|
+
* codecs are available for switching, whether through ABR or user selection.
|
|
907
947
|
*/
|
|
908
|
-
codecSwitchingStrategy
|
|
948
|
+
codecSwitchingStrategy?: clpp.CodecSwitchingStrategy;
|
|
909
949
|
}
|
|
910
950
|
|
|
911
951
|
/**
|
|
@@ -1123,6 +1163,10 @@ export namespace clpp {
|
|
|
1123
1163
|
* ABR configuration and settings.
|
|
1124
1164
|
*/
|
|
1125
1165
|
abr?: Partial<clpp.AbrConfiguration>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Ads configuration.
|
|
1168
|
+
*/
|
|
1169
|
+
ads?: Partial<clpp.AdsConfiguration>;
|
|
1126
1170
|
/**
|
|
1127
1171
|
* Configures the autoplay behavior.
|
|
1128
1172
|
*/
|
|
@@ -1185,7 +1229,7 @@ export namespace clpp {
|
|
|
1185
1229
|
*/
|
|
1186
1230
|
id?: string;
|
|
1187
1231
|
/**
|
|
1188
|
-
*
|
|
1232
|
+
* Google IMA ads plugin configuration.
|
|
1189
1233
|
*/
|
|
1190
1234
|
ima?: Partial<clpp.ImaConfiguration>;
|
|
1191
1235
|
/**
|
|
@@ -1210,7 +1254,7 @@ export namespace clpp {
|
|
|
1210
1254
|
*/
|
|
1211
1255
|
manifest?: Partial<clpp.ManifestConfiguration>;
|
|
1212
1256
|
/**
|
|
1213
|
-
* Media source configuration
|
|
1257
|
+
* Media source configuration.
|
|
1214
1258
|
*/
|
|
1215
1259
|
mediaSource?: Partial<clpp.MediaSourceConfiguration>;
|
|
1216
1260
|
/**
|
|
@@ -1236,13 +1280,8 @@ export namespace clpp {
|
|
|
1236
1280
|
*/
|
|
1237
1281
|
playlist?: Partial<clpp.PlaylistConfiguration>;
|
|
1238
1282
|
/**
|
|
1239
|
-
*
|
|
1240
|
-
*
|
|
1241
|
-
* If `true`, a forced text track is preferred. If the content has no text
|
|
1242
|
-
* tracks marked as forced and the value is `true`, no text track is chosen.
|
|
1243
|
-
* If `true` and the `preferredTextLanguage` is set, and the specified
|
|
1244
|
-
* language is available for the forced text track, the forced text track will
|
|
1245
|
-
* be preferred over the non-forced subtitles and be enabled at startup.
|
|
1283
|
+
* If `true`, the forced text track is preferred during automatic
|
|
1284
|
+
* track selection.
|
|
1246
1285
|
*/
|
|
1247
1286
|
preferForcedSubtitles?: boolean;
|
|
1248
1287
|
/**
|
|
@@ -1325,7 +1364,7 @@ export namespace clpp {
|
|
|
1325
1364
|
*/
|
|
1326
1365
|
sessions?: Partial<clpp.SessionsConfiguration>;
|
|
1327
1366
|
/**
|
|
1328
|
-
* SIMID plugin configuration
|
|
1367
|
+
* SIMID plugin configuration.
|
|
1329
1368
|
*/
|
|
1330
1369
|
simid?: Partial<clpp.SimidConfiguration>;
|
|
1331
1370
|
/**
|
|
@@ -1339,7 +1378,7 @@ export namespace clpp {
|
|
|
1339
1378
|
*/
|
|
1340
1379
|
startTime?: number|null;
|
|
1341
1380
|
/**
|
|
1342
|
-
* The streaming configuration
|
|
1381
|
+
* The streaming configuration.
|
|
1343
1382
|
*/
|
|
1344
1383
|
streaming?: Partial<clpp.StreamingConfiguration>;
|
|
1345
1384
|
/**
|
|
@@ -1642,7 +1681,7 @@ export namespace clpp {
|
|
|
1642
1681
|
*/
|
|
1643
1682
|
export type Restrictions = {
|
|
1644
1683
|
/**
|
|
1645
|
-
* The
|
|
1684
|
+
* The maximum bandwidth of a track in bit/sec.
|
|
1646
1685
|
*/
|
|
1647
1686
|
maxBandwidth: number;
|
|
1648
1687
|
/**
|
|
@@ -2321,6 +2360,21 @@ export namespace clpp {
|
|
|
2321
2360
|
url: string;
|
|
2322
2361
|
}
|
|
2323
2362
|
|
|
2363
|
+
/**
|
|
2364
|
+
* Configuration of the timeline.
|
|
2365
|
+
*/
|
|
2366
|
+
export type TimelineConfiguration = {
|
|
2367
|
+
/**
|
|
2368
|
+
* This option applies only to DASH, otherwise it is ignored.
|
|
2369
|
+
* If type is 'startover' it is possible to seek to the very start of
|
|
2370
|
+
* the stream even though it is live and the timeline
|
|
2371
|
+
* is updated based on the manifest without interpolation.
|
|
2372
|
+
* Note: the 'startover' type is compatible with manifests based on
|
|
2373
|
+
* SegmentTimeline or SegmentList.
|
|
2374
|
+
*/
|
|
2375
|
+
type?: string;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2324
2378
|
/**
|
|
2325
2379
|
* Contains information about a cue in the timeline that will cause an event
|
|
2326
2380
|
* to be raised when the playhead enters or exits it. In DASH this is the
|
|
@@ -3180,6 +3234,14 @@ export namespace clpp {
|
|
|
3180
3234
|
* Triggered when an ad pod ended.
|
|
3181
3235
|
*/
|
|
3182
3236
|
AD_BREAK_STOPPED = "ad-break-stopped",
|
|
3237
|
+
/**
|
|
3238
|
+
* Triggered when the X-ASSET-LIST request is sent.
|
|
3239
|
+
*/
|
|
3240
|
+
AD_HLS_ASSET_LIST_REQUEST = "ad-hls-asset-list-request",
|
|
3241
|
+
/**
|
|
3242
|
+
* Triggered when the X-ASSET-LIST response is received.
|
|
3243
|
+
*/
|
|
3244
|
+
AD_HLS_ASSET_LIST_RESPONSE = "ad-hls-asset-list-response",
|
|
3183
3245
|
/**
|
|
3184
3246
|
* Triggered when a SIMID Ad started.
|
|
3185
3247
|
*/
|
|
@@ -3213,7 +3275,7 @@ export namespace clpp {
|
|
|
3213
3275
|
*/
|
|
3214
3276
|
AIRPLAY_CASTING_ENDED = "airplay-casting-ended",
|
|
3215
3277
|
/**
|
|
3216
|
-
* Triggered a new cue
|
|
3278
|
+
* Triggered when a new cue has been added to the timeline.
|
|
3217
3279
|
*/
|
|
3218
3280
|
TIMELINE_CUE_ADDED = "timeline-cue-added",
|
|
3219
3281
|
/**
|
|
@@ -3224,6 +3286,10 @@ export namespace clpp {
|
|
|
3224
3286
|
* Triggered when a timeline cue is exited.
|
|
3225
3287
|
*/
|
|
3226
3288
|
TIMELINE_CUE_EXIT = "timeline-cue-exit",
|
|
3289
|
+
/**
|
|
3290
|
+
* Triggered when timeline cues have changed.
|
|
3291
|
+
*/
|
|
3292
|
+
TIMELINE_CUES_CHANGED = "timeline-cues-changed",
|
|
3227
3293
|
/**
|
|
3228
3294
|
* Triggered when a MPD type has changed from dynamic to static.
|
|
3229
3295
|
* Note: You can also listen to the {@link clpp.events.LIVE_TURNED_STATIC}
|
|
@@ -3280,6 +3346,10 @@ export namespace clpp {
|
|
|
3280
3346
|
* Online status changed.
|
|
3281
3347
|
*/
|
|
3282
3348
|
ONLINE_STATUS_CHANGED = "online-status-changed",
|
|
3349
|
+
/**
|
|
3350
|
+
* Triggered when CMSD headers were detected as part of a network response.
|
|
3351
|
+
*/
|
|
3352
|
+
CMSD_EVENT = "cmsd-event",
|
|
3283
3353
|
}
|
|
3284
3354
|
|
|
3285
3355
|
/**
|
|
@@ -3474,9 +3544,9 @@ export namespace clpp {
|
|
|
3474
3544
|
destroy(): Promise<void>;
|
|
3475
3545
|
/**
|
|
3476
3546
|
* Returns the ads manager or null if not available.
|
|
3477
|
-
* The ads manager is available when {@clpp.Player.load} is resolved.
|
|
3547
|
+
* The ads manager is available when {@link clpp.Player.load} is resolved.
|
|
3478
3548
|
*/
|
|
3479
|
-
getAdsManager(): clpp.ads.IAdsManager;
|
|
3549
|
+
getAdsManager(): clpp.ads.IAdsManager|null;
|
|
3480
3550
|
/**
|
|
3481
3551
|
* Returns an instance of {@link clpp.BufferInfo} which is an extended version
|
|
3482
3552
|
* of the native {@link TimeRanges} from the browser and adds some utility
|
|
@@ -4554,6 +4624,10 @@ export namespace clpp {
|
|
|
4554
4624
|
* An error raised when the play is not allowed.
|
|
4555
4625
|
*/
|
|
4556
4626
|
PLAY_NOT_ALLOWED = 3200,
|
|
4627
|
+
/**
|
|
4628
|
+
* An error raised when the player fails to be paused.
|
|
4629
|
+
*/
|
|
4630
|
+
PAUSE_FAILED = 3201,
|
|
4557
4631
|
/**
|
|
4558
4632
|
* The Player was unable to guess the manifest type based on file extension
|
|
4559
4633
|
* or MIME type. To fix, try one of the following:
|
|
@@ -4819,6 +4893,10 @@ export namespace clpp {
|
|
|
4819
4893
|
* transition, it will pause, waiting for the audio stream.
|
|
4820
4894
|
*/
|
|
4821
4895
|
INVALID_STREAMS_CHOSEN = 5005,
|
|
4896
|
+
/**
|
|
4897
|
+
* An error occurred while streaming the content.
|
|
4898
|
+
*/
|
|
4899
|
+
STREAMING_ERROR = 5006,
|
|
4822
4900
|
/**
|
|
4823
4901
|
* The manifest indicated protected content, but the manifest parser was
|
|
4824
4902
|
* unable to determine what key systems should be used.
|
|
@@ -5361,6 +5439,10 @@ export namespace clpp {
|
|
|
5361
5439
|
* The type of the ad pod.
|
|
5362
5440
|
*/
|
|
5363
5441
|
getPodType(): clpp.ads.PodType;
|
|
5442
|
+
/**
|
|
5443
|
+
* The playback position of the ad.
|
|
5444
|
+
*/
|
|
5445
|
+
getPosition(): number;
|
|
5364
5446
|
/**
|
|
5365
5447
|
* The position of the ad within the ad pod.
|
|
5366
5448
|
*/
|
|
@@ -5409,63 +5491,33 @@ export namespace clpp {
|
|
|
5409
5491
|
|
|
5410
5492
|
export interface IAdsManager {
|
|
5411
5493
|
/**
|
|
5412
|
-
* Gets the current time of the
|
|
5413
|
-
* If the ad is not loaded yet or has finished playing, the API would return
|
|
5414
|
-
* -1.
|
|
5494
|
+
* Gets the current time of the currently playing ad.
|
|
5415
5495
|
*/
|
|
5416
5496
|
getPosition(): number;
|
|
5417
5497
|
/**
|
|
5418
|
-
* Gets the volume
|
|
5498
|
+
* Gets the audio volume of the current ad.
|
|
5419
5499
|
*/
|
|
5420
5500
|
getVolume(): number;
|
|
5421
5501
|
/**
|
|
5422
|
-
* Pauses the
|
|
5423
|
-
* This function will be no-op when the ad is not loaded yet or is done
|
|
5424
|
-
* playing.
|
|
5502
|
+
* Pauses the currently playing ad.
|
|
5425
5503
|
*/
|
|
5426
5504
|
pause(): void;
|
|
5427
5505
|
/**
|
|
5428
|
-
* Resumes the
|
|
5429
|
-
* This function will be no-op when the ad is not loaded yet or is done
|
|
5430
|
-
* playing.
|
|
5506
|
+
* Resumes playback of the ad if it is paused.
|
|
5431
5507
|
*/
|
|
5432
5508
|
resume(): void;
|
|
5433
5509
|
/**
|
|
5434
|
-
* Sets the volume for the current ad.
|
|
5510
|
+
* Sets the audio volume for the current ad.
|
|
5435
5511
|
*
|
|
5436
|
-
* @param volume The volume to set, from 0
|
|
5512
|
+
* @param volume The volume to set, from 0 to 1.
|
|
5437
5513
|
*/
|
|
5438
5514
|
setVolume(volume: number): void;
|
|
5439
5515
|
/**
|
|
5440
|
-
* Skips the current ad
|
|
5441
|
-
* When called under other circumstances, skip has no effect.
|
|
5442
|
-
* After the skip is completed the AdsManager fires
|
|
5443
|
-
* an {@link clpp.events.AD_SKIPPED} event.
|
|
5516
|
+
* Skips the current ad if allowed by {@link clpp.ads.IAd.getSkipTimeOffset}.
|
|
5444
5517
|
*/
|
|
5445
5518
|
skip(): void;
|
|
5446
5519
|
}
|
|
5447
5520
|
|
|
5448
|
-
export interface IAdsManagerFactory {
|
|
5449
|
-
/**
|
|
5450
|
-
* Creates an ads manager.
|
|
5451
|
-
*
|
|
5452
|
-
* @param player The proxy player.
|
|
5453
|
-
*/
|
|
5454
|
-
create(player: clpp.Player): clpp.ads.IAdsManager;
|
|
5455
|
-
/**
|
|
5456
|
-
* Checks if this factory creates an ads manager that can play specified
|
|
5457
|
-
* ads.
|
|
5458
|
-
*
|
|
5459
|
-
* @param player Player instance
|
|
5460
|
-
* @param config The player configuration.
|
|
5461
|
-
*/
|
|
5462
|
-
isSupported(player: clpp.Player, config: clpp.PlayerConfiguration): boolean;
|
|
5463
|
-
/**
|
|
5464
|
-
* The factory name.
|
|
5465
|
-
*/
|
|
5466
|
-
name(): string;
|
|
5467
|
-
}
|
|
5468
|
-
|
|
5469
5521
|
export interface IAdsTimeline {
|
|
5470
5522
|
/**
|
|
5471
5523
|
* An array of offsets in seconds indicating
|
|
@@ -5534,6 +5586,10 @@ export namespace clpp {
|
|
|
5534
5586
|
* 1 - Server side
|
|
5535
5587
|
*/
|
|
5536
5588
|
SERVER_SIDE = 1,
|
|
5589
|
+
/**
|
|
5590
|
+
* 2 - Server guided
|
|
5591
|
+
*/
|
|
5592
|
+
SERVER_GUIDED = 2,
|
|
5537
5593
|
}
|
|
5538
5594
|
}
|
|
5539
5595
|
|
|
@@ -5745,6 +5801,12 @@ export namespace clpp {
|
|
|
5745
5801
|
* broadcasted to all connected senders.
|
|
5746
5802
|
*/
|
|
5747
5803
|
sendMessage(message: any, senderId?: string): void;
|
|
5804
|
+
/**
|
|
5805
|
+
* Set a Cast metadata object to be displayed on the Cast receiver and
|
|
5806
|
+
* broadcast it to all senders. This will overwrite any existing metadata or
|
|
5807
|
+
* remove it if `null` is passed.
|
|
5808
|
+
*/
|
|
5809
|
+
setContentMetadata(metadata: clpp.cast.utils.ReceiverMetadataObject|null): void;
|
|
5748
5810
|
/**
|
|
5749
5811
|
* Gives a possibility to intercept a `LoadRequestData` instance before
|
|
5750
5812
|
* passing it to Chromecast. Interceptor function takes load request data as
|
|
@@ -5820,6 +5882,15 @@ export namespace clpp {
|
|
|
5820
5882
|
* Shutdown receiver application and removes bound player instance.
|
|
5821
5883
|
*/
|
|
5822
5884
|
stop(): void;
|
|
5885
|
+
/**
|
|
5886
|
+
* Updates the Cast metadata object with new values. Any existing metadata
|
|
5887
|
+
* properties will be updated or replaced with the values provided in the
|
|
5888
|
+
* `metadata` object. If the `metadata` object is `null` or not provided, the
|
|
5889
|
+
* current metadata will remain unchanged. If no metadata is currently set,
|
|
5890
|
+
* and a valid `metadata` object is provided, it will initialize the metadata
|
|
5891
|
+
* with the given values.
|
|
5892
|
+
*/
|
|
5893
|
+
updateContentMetadata(metadata: clpp.cast.utils.ReceiverMetadataObject|null): void;
|
|
5823
5894
|
}
|
|
5824
5895
|
|
|
5825
5896
|
namespace utils {
|
|
@@ -6183,7 +6254,6 @@ export namespace clpp {
|
|
|
6183
6254
|
|
|
6184
6255
|
/**
|
|
6185
6256
|
* DRMtoday Widevine Server Certificates.
|
|
6186
|
-
*
|
|
6187
6257
|
* Use these constants to specify a specific DRMtoday Widevine Server
|
|
6188
6258
|
* Certificate to be used.
|
|
6189
6259
|
*/
|
|
@@ -6197,7 +6267,8 @@ export namespace clpp {
|
|
|
6197
6267
|
*/
|
|
6198
6268
|
V1_STAGING = "V1_STAGING",
|
|
6199
6269
|
/**
|
|
6200
|
-
* The DRMtoday widevine certificate version 2
|
|
6270
|
+
* The DRMtoday widevine certificate version 2 (latest version for both
|
|
6271
|
+
* prod and staging)
|
|
6201
6272
|
*/
|
|
6202
6273
|
V2 = "V2",
|
|
6203
6274
|
}
|
|
@@ -6299,6 +6370,133 @@ export namespace clpp {
|
|
|
6299
6370
|
reason: number;
|
|
6300
6371
|
}
|
|
6301
6372
|
|
|
6373
|
+
/**
|
|
6374
|
+
* CMSD Dynamic values.
|
|
6375
|
+
* Keys whose values apply only to the next transmission hop.
|
|
6376
|
+
* Typically a new CMSD-Dynamic header instance will be added
|
|
6377
|
+
* by each intermediary participating in the delivery.
|
|
6378
|
+
*/
|
|
6379
|
+
export type CmsdDynamic = {
|
|
6380
|
+
/**
|
|
6381
|
+
* Key is included without a value if the server is under duress,
|
|
6382
|
+
* due to cpu, memory, disk IO, network IO or other reasons.
|
|
6383
|
+
* Header-Key: du
|
|
6384
|
+
*/
|
|
6385
|
+
duress?: boolean;
|
|
6386
|
+
/**
|
|
6387
|
+
* The throughput between the server and the client over the currently
|
|
6388
|
+
* negotiated transport as estimated by the server at the start
|
|
6389
|
+
* of the response. The value is expressed in units of kilobits per second.
|
|
6390
|
+
* Header-Key: etp
|
|
6391
|
+
*/
|
|
6392
|
+
estimatedThroughputKbps?: number;
|
|
6393
|
+
/**
|
|
6394
|
+
* The maximum bitrate value that the player
|
|
6395
|
+
* SHOULD play in its Adaptive Bit Rate (ABR) ladder.
|
|
6396
|
+
* Header-Key: mb
|
|
6397
|
+
*/
|
|
6398
|
+
maxSuggestedBitrateKbps?: number;
|
|
6399
|
+
/**
|
|
6400
|
+
* The time elapsed between the receipt of the request
|
|
6401
|
+
* and when the first byte of the body becomes available to send to the client.
|
|
6402
|
+
* Header-Key: rd
|
|
6403
|
+
*/
|
|
6404
|
+
responseDelay?: number;
|
|
6405
|
+
/**
|
|
6406
|
+
* Estimated round trip time between client and server.
|
|
6407
|
+
* This estimate may be derived from the transport handshake.
|
|
6408
|
+
* Header-Key: rtt
|
|
6409
|
+
*/
|
|
6410
|
+
roundTripTime?: number;
|
|
6411
|
+
}
|
|
6412
|
+
|
|
6413
|
+
/**
|
|
6414
|
+
* CMSD Static values.
|
|
6415
|
+
* Keys whose values persist over multiple requests for the object.
|
|
6416
|
+
*/
|
|
6417
|
+
export type CmsdStatic = {
|
|
6418
|
+
/**
|
|
6419
|
+
* The wallclock time at which the first byte of this object
|
|
6420
|
+
* became available at the origin for successful request.
|
|
6421
|
+
* The time is expressed as integer milliseconds since the Unix Epoch.
|
|
6422
|
+
* Header-Key: at
|
|
6423
|
+
*/
|
|
6424
|
+
availabilityTime?: number;
|
|
6425
|
+
/**
|
|
6426
|
+
* The encoded bitrate of the audio or video object being requested.
|
|
6427
|
+
* Header-Key: br
|
|
6428
|
+
*/
|
|
6429
|
+
encodedBitrateKbps?: number;
|
|
6430
|
+
/**
|
|
6431
|
+
* The number of milliseconds that this response was held back by
|
|
6432
|
+
* an origin before returning.
|
|
6433
|
+
* Header-Key: ht
|
|
6434
|
+
*/
|
|
6435
|
+
heldTime?: number;
|
|
6436
|
+
/**
|
|
6437
|
+
* An identifier for the processing server.
|
|
6438
|
+
* Header-Key: n
|
|
6439
|
+
*/
|
|
6440
|
+
intermediaryIdentifier?: string;
|
|
6441
|
+
/**
|
|
6442
|
+
* The URL-encoded relative path to one or more objects which can
|
|
6443
|
+
* reasonably be expected to be requested by a client.
|
|
6444
|
+
* Header-Key: nor
|
|
6445
|
+
*/
|
|
6446
|
+
nextObjectResponse?: string;
|
|
6447
|
+
/**
|
|
6448
|
+
* If the next response will be a partial object response,
|
|
6449
|
+
* then this string denotes the byte range that will be returned.
|
|
6450
|
+
* Header-Key: nrr
|
|
6451
|
+
*/
|
|
6452
|
+
nextRangeResponse?: string;
|
|
6453
|
+
/**
|
|
6454
|
+
* The playback duration in milliseconds of the object.
|
|
6455
|
+
* Header-Key: d
|
|
6456
|
+
*/
|
|
6457
|
+
objectDuration?: number;
|
|
6458
|
+
/**
|
|
6459
|
+
* The media role of the current object being returned:
|
|
6460
|
+
* m = text file, such as a manifest or playlist
|
|
6461
|
+
* a = audio only
|
|
6462
|
+
* v = video only
|
|
6463
|
+
* av = muxed audio and video
|
|
6464
|
+
* i = init segment
|
|
6465
|
+
* c = caption or subtitle
|
|
6466
|
+
* tt = ISOBMFF timed text track
|
|
6467
|
+
* k = cryptographic key, license or certificate.
|
|
6468
|
+
* o = other
|
|
6469
|
+
* Header-Key: ot
|
|
6470
|
+
*/
|
|
6471
|
+
objectType?: string;
|
|
6472
|
+
/**
|
|
6473
|
+
* It should approximate the starting buffer of the intended players.
|
|
6474
|
+
* Header-Key: su
|
|
6475
|
+
*/
|
|
6476
|
+
startup?: boolean;
|
|
6477
|
+
/**
|
|
6478
|
+
* v = all segments are available – e.g., VoD.
|
|
6479
|
+
* l = segments become available over time – e.g., live.
|
|
6480
|
+
* Header-Key: st
|
|
6481
|
+
*/
|
|
6482
|
+
streamType?: string;
|
|
6483
|
+
/**
|
|
6484
|
+
* The streaming format that defines the current response.
|
|
6485
|
+
* d = MPEG DASH
|
|
6486
|
+
* h = HTTP Live Streaming (HLS)
|
|
6487
|
+
* s = Smooth Streaming
|
|
6488
|
+
* o = other
|
|
6489
|
+
* Header-Key: sf
|
|
6490
|
+
*/
|
|
6491
|
+
streamingFormat?: string;
|
|
6492
|
+
/**
|
|
6493
|
+
* The version of this specification used
|
|
6494
|
+
* for interpreting the defined key names and values.
|
|
6495
|
+
* Header-Key: v
|
|
6496
|
+
*/
|
|
6497
|
+
version?: number;
|
|
6498
|
+
}
|
|
6499
|
+
|
|
6302
6500
|
/**
|
|
6303
6501
|
* Container object that is send with state change events.
|
|
6304
6502
|
*/
|
|
@@ -6467,312 +6665,6 @@ export namespace clpp {
|
|
|
6467
6665
|
}
|
|
6468
6666
|
}
|
|
6469
6667
|
|
|
6470
|
-
namespace interstitial {
|
|
6471
|
-
/**
|
|
6472
|
-
* A function that can be used to modify the metadata of an interstitial cue.
|
|
6473
|
-
* It receives one argument of type {@link clpp.interstitial.PlaylistItem} and
|
|
6474
|
-
* returns a modified {@link clpp.interstitial.PlaylistItem}.
|
|
6475
|
-
*/
|
|
6476
|
-
export type AssetConverter = Function;
|
|
6477
|
-
|
|
6478
|
-
/**
|
|
6479
|
-
* Configuration options of the interstitial player.
|
|
6480
|
-
*/
|
|
6481
|
-
export type Options = {
|
|
6482
|
-
/**
|
|
6483
|
-
* The HTML element to be used as a container for video elements created
|
|
6484
|
-
* by the interstitial player. Typically this would be a div element.
|
|
6485
|
-
*/
|
|
6486
|
-
anchorEl: HTMLElement;
|
|
6487
|
-
/**
|
|
6488
|
-
* The configuration of the HLS asset to be played.
|
|
6489
|
-
*/
|
|
6490
|
-
config: clpp.PlayerConfiguration;
|
|
6491
|
-
/**
|
|
6492
|
-
* A function that can be used to modify the metadata of an interstitial cue.
|
|
6493
|
-
*/
|
|
6494
|
-
interstitialAssetConverter?: clpp.interstitial.AssetConverter;
|
|
6495
|
-
/**
|
|
6496
|
-
* A preroll margin. If an interstitial cue is within this many seconds of
|
|
6497
|
-
* the beginning of the playlist timeline, it is considered to be a preroll.
|
|
6498
|
-
*/
|
|
6499
|
-
prerollMarginSec?: number;
|
|
6500
|
-
/**
|
|
6501
|
-
* How many seconds on the timeline before the interstitial cue should
|
|
6502
|
-
* the cue be resolved and preloaded.
|
|
6503
|
-
*/
|
|
6504
|
-
resolutionOffsetSec?: number;
|
|
6505
|
-
/**
|
|
6506
|
-
* Configuration options of the Yospace plugin.
|
|
6507
|
-
*/
|
|
6508
|
-
yospace?: clpp.interstitial.YospacePluginOptions;
|
|
6509
|
-
}
|
|
6510
|
-
|
|
6511
|
-
/**
|
|
6512
|
-
* A MultiController item.
|
|
6513
|
-
* It consists of an asset/config, a player instance selected
|
|
6514
|
-
* to play this asset and the underlying video element to which the player is
|
|
6515
|
-
* attached.
|
|
6516
|
-
*/
|
|
6517
|
-
export type PlayerItem = {
|
|
6518
|
-
/**
|
|
6519
|
-
* Source configuration.
|
|
6520
|
-
*/
|
|
6521
|
-
config: clpp.PlayerConfiguration;
|
|
6522
|
-
/**
|
|
6523
|
-
* A unique ID.
|
|
6524
|
-
*/
|
|
6525
|
-
id: number;
|
|
6526
|
-
/**
|
|
6527
|
-
* A player instance.
|
|
6528
|
-
*/
|
|
6529
|
-
player: clpp.Player|null;
|
|
6530
|
-
/**
|
|
6531
|
-
* Whether the item is a primary item.
|
|
6532
|
-
*/
|
|
6533
|
-
primary?: boolean;
|
|
6534
|
-
/**
|
|
6535
|
-
* The role of the item.
|
|
6536
|
-
*/
|
|
6537
|
-
role: string;
|
|
6538
|
-
/**
|
|
6539
|
-
* The state of the item (e.g. 'preloading', 'preloaded', 'preload-failed',
|
|
6540
|
-
* 'loading', 'loaded', 'playing', 'idle').
|
|
6541
|
-
*/
|
|
6542
|
-
state: string;
|
|
6543
|
-
}
|
|
6544
|
-
|
|
6545
|
-
/**
|
|
6546
|
-
* A playable item of the interstitial player.
|
|
6547
|
-
* It can represent either the primary content or an interstitial asset.
|
|
6548
|
-
* This type extends {@link clpp.interstitial.MultiControllerInputItem}
|
|
6549
|
-
*/
|
|
6550
|
-
export type PlaylistItem = {
|
|
6551
|
-
/**
|
|
6552
|
-
* Configuration of the interstitial asset.
|
|
6553
|
-
*/
|
|
6554
|
-
config: clpp.PlayerConfiguration;
|
|
6555
|
-
/**
|
|
6556
|
-
* Sum of durations of this asset and all previous to it in the same list.
|
|
6557
|
-
*/
|
|
6558
|
-
cumulativeDuration: number;
|
|
6559
|
-
/**
|
|
6560
|
-
* Duration of the asset.
|
|
6561
|
-
*/
|
|
6562
|
-
duration: number;
|
|
6563
|
-
/**
|
|
6564
|
-
* ID of the interstitial asset.
|
|
6565
|
-
*/
|
|
6566
|
-
id: string;
|
|
6567
|
-
/**
|
|
6568
|
-
* ID of the interstitial to which this asset belongs.
|
|
6569
|
-
*/
|
|
6570
|
-
interstitialId: string;
|
|
6571
|
-
}
|
|
6572
|
-
|
|
6573
|
-
/**
|
|
6574
|
-
* A timeline cue representing one interstitial EXT-X-DATERANGE tag.
|
|
6575
|
-
*/
|
|
6576
|
-
export type UiCue = {
|
|
6577
|
-
/**
|
|
6578
|
-
* ID of the cue.
|
|
6579
|
-
*/
|
|
6580
|
-
cueId: string;
|
|
6581
|
-
/**
|
|
6582
|
-
* End time of the interstitial in seconds.
|
|
6583
|
-
*/
|
|
6584
|
-
endTime: number;
|
|
6585
|
-
/**
|
|
6586
|
-
* Duration of the primary content in seconds.
|
|
6587
|
-
*/
|
|
6588
|
-
primaryDuration: number;
|
|
6589
|
-
/**
|
|
6590
|
-
* Start time of the interstitial in seconds.
|
|
6591
|
-
*/
|
|
6592
|
-
startTime: number;
|
|
6593
|
-
}
|
|
6594
|
-
|
|
6595
|
-
/**
|
|
6596
|
-
* Configuration options of the Yospace plugin.
|
|
6597
|
-
*/
|
|
6598
|
-
export type YospacePluginOptions = {
|
|
6599
|
-
/**
|
|
6600
|
-
* True to enable the Yospace plugin.
|
|
6601
|
-
*/
|
|
6602
|
-
enabled: boolean;
|
|
6603
|
-
}
|
|
6604
|
-
|
|
6605
|
-
/**
|
|
6606
|
-
* Events fired by interstitial player.
|
|
6607
|
-
*/
|
|
6608
|
-
export enum Event {
|
|
6609
|
-
/**
|
|
6610
|
-
* Triggered when the resolution/preloading of an interstitial started.
|
|
6611
|
-
* In case of X-ASSET-LIST this is the same as x-asset-list-request-started,
|
|
6612
|
-
* in case of X-ASSET-URI this is the time when the media of the interstitial
|
|
6613
|
-
* asset started preloading.
|
|
6614
|
-
*/
|
|
6615
|
-
RESOLUTION_STARTED = "interstitial-preload-started",
|
|
6616
|
-
/**
|
|
6617
|
-
* Triggered when the X-ASSET-LIST request started.
|
|
6618
|
-
*/
|
|
6619
|
-
ASSET_LIST_STARTED = "x-asset-list-request-started",
|
|
6620
|
-
/**
|
|
6621
|
-
* Triggered when the X-ASSET-LIST request ended (even if it failed).
|
|
6622
|
-
*/
|
|
6623
|
-
ASSET_LIST_ENDED = "x-asset-list-request-ended",
|
|
6624
|
-
/**
|
|
6625
|
-
* Triggered when an interstitial ad break has been scheduled to be played.
|
|
6626
|
-
* This happens several seconds before the playback position reaches
|
|
6627
|
-
* interstitial date range. In case of preroll this happens immediately.
|
|
6628
|
-
*/
|
|
6629
|
-
SCHEDULED = "interstitial-scheduled",
|
|
6630
|
-
/**
|
|
6631
|
-
* Triggered when an interstitial break started.
|
|
6632
|
-
* One break contains one or more interstitial assets.
|
|
6633
|
-
*/
|
|
6634
|
-
STARTED = "interstitial-started",
|
|
6635
|
-
/**
|
|
6636
|
-
* Triggered when an interstitial break ended.
|
|
6637
|
-
*/
|
|
6638
|
-
ENDED = "interstitial-ended",
|
|
6639
|
-
/**
|
|
6640
|
-
* Triggered when the playback of one interstitial item started.
|
|
6641
|
-
* One interstitial ad break (one EXT-X-DATERANGE) can contain multiple
|
|
6642
|
-
* interstitial items.
|
|
6643
|
-
*/
|
|
6644
|
-
ITEM_STARTED = "interstitial-item-started",
|
|
6645
|
-
/**
|
|
6646
|
-
* Triggered when the primary player changed.
|
|
6647
|
-
* (Deprecated.)
|
|
6648
|
-
*/
|
|
6649
|
-
PRIMARY_PLAYER_CHANGED = "primary-player-changed",
|
|
6650
|
-
/**
|
|
6651
|
-
* Triggered when a new/different item started playing.
|
|
6652
|
-
* This could be either the first time something started playing or
|
|
6653
|
-
* a transition between primary and interstitial content or a transition
|
|
6654
|
-
* between two interstitial items.
|
|
6655
|
-
*/
|
|
6656
|
-
ITEM_CHANGED = "item-changed",
|
|
6657
|
-
/**
|
|
6658
|
-
* Triggered when playback started. The content which started playing can
|
|
6659
|
-
* either by primary content or an interstitial preroll.
|
|
6660
|
-
* In contrast {@link clpp.interstitial.Event.PRIMARY_STARTED} is triggered
|
|
6661
|
-
* when the primary content started playing which can be after a preroll.
|
|
6662
|
-
*/
|
|
6663
|
-
PLAYBACK_STARTED = "playback-started",
|
|
6664
|
-
/**
|
|
6665
|
-
* Triggered when primary content playback started.
|
|
6666
|
-
*/
|
|
6667
|
-
PRIMARY_STARTED = "primary-started",
|
|
6668
|
-
/**
|
|
6669
|
-
* Triggered when primary content playback ended.
|
|
6670
|
-
*/
|
|
6671
|
-
PRIMARY_ENDED = "primary-ended",
|
|
6672
|
-
/**
|
|
6673
|
-
* Triggered when interstitial cues changed.
|
|
6674
|
-
* For VOD this is triggered only once during load.
|
|
6675
|
-
*/
|
|
6676
|
-
CUES_CHANGED = "cues-changed",
|
|
6677
|
-
}
|
|
6678
|
-
|
|
6679
|
-
/**
|
|
6680
|
-
* A player that plays HLS assets containing interstitials.
|
|
6681
|
-
* It fires the following events {@link clpp.interstitial.Event}.
|
|
6682
|
-
* Supported parts for the HLS spec:
|
|
6683
|
-
*
|
|
6684
|
-
* X-ASSET-LIST, X-ASSET-URI, X-RESUME-OFFSET, X-PLAYOUT-LIMIT
|
|
6685
|
-
*
|
|
6686
|
-
* Limitations:
|
|
6687
|
-
*
|
|
6688
|
-
* Only supports VOD.
|
|
6689
|
-
* Interstitials must not be too close to each other.
|
|
6690
|
-
* Interstitials cannot overlap.
|
|
6691
|
-
* No error handling (for when some asset/list fails to load).
|
|
6692
|
-
* No support for #EXT-X-DATERANGE.CUE
|
|
6693
|
-
* No support for X-RESTRICT
|
|
6694
|
-
* No support for _HLS_start_offset query in live (because no support
|
|
6695
|
-
* for live)
|
|
6696
|
-
* No support for _HLS_primary_id
|
|
6697
|
-
*
|
|
6698
|
-
*/
|
|
6699
|
-
export class Player {
|
|
6700
|
-
/**
|
|
6701
|
-
* A player that plays HLS assets containing interstitials.
|
|
6702
|
-
* It fires the following events {@link clpp.interstitial.Event}.
|
|
6703
|
-
* Supported parts for the HLS spec:
|
|
6704
|
-
*
|
|
6705
|
-
* X-ASSET-LIST, X-ASSET-URI, X-RESUME-OFFSET, X-PLAYOUT-LIMIT
|
|
6706
|
-
*
|
|
6707
|
-
* Limitations:
|
|
6708
|
-
*
|
|
6709
|
-
* Only supports VOD.
|
|
6710
|
-
* Interstitials must not be too close to each other.
|
|
6711
|
-
* Interstitials cannot overlap.
|
|
6712
|
-
* No error handling (for when some asset/list fails to load).
|
|
6713
|
-
* No support for #EXT-X-DATERANGE.CUE
|
|
6714
|
-
* No support for X-RESTRICT
|
|
6715
|
-
* No support for _HLS_start_offset query in live (because no support
|
|
6716
|
-
* for live)
|
|
6717
|
-
* No support for _HLS_primary_id
|
|
6718
|
-
*
|
|
6719
|
-
*
|
|
6720
|
-
* @param options configuration options
|
|
6721
|
-
*/
|
|
6722
|
-
constructor(options: clpp.interstitial.Options);
|
|
6723
|
-
/**
|
|
6724
|
-
* Request that this object be destroyed, releasing all resources and shutting
|
|
6725
|
-
* down all operations. Returns a Promise which is resolved when destruction
|
|
6726
|
-
* is complete. This Promise should never be rejected.
|
|
6727
|
-
*/
|
|
6728
|
-
destroy(): Promise<void>;
|
|
6729
|
-
/**
|
|
6730
|
-
* Get interstitial cues of the loaded asset.
|
|
6731
|
-
*/
|
|
6732
|
-
getCues(): Array<clpp.interstitial.UiCue>;
|
|
6733
|
-
/**
|
|
6734
|
-
* Get the current item.
|
|
6735
|
-
*/
|
|
6736
|
-
getCurrentItem(): clpp.interstitial.PlayerItem|null;
|
|
6737
|
-
/**
|
|
6738
|
-
* Get the current player.
|
|
6739
|
-
*/
|
|
6740
|
-
getCurrentPlayer(): clpp.Player|null;
|
|
6741
|
-
/**
|
|
6742
|
-
* Get the current playback position.
|
|
6743
|
-
* This is either of the position in the primary content or in
|
|
6744
|
-
* the interstitial asset depending on which one is currently playing.
|
|
6745
|
-
*/
|
|
6746
|
-
getPosition(): number|null;
|
|
6747
|
-
/**
|
|
6748
|
-
* Get the Yospace Ad Management session created by the last {@link load} or
|
|
6749
|
-
* {@link loadPaused} call.
|
|
6750
|
-
* This is only available if the Yospace plugin is enabled.
|
|
6751
|
-
*/
|
|
6752
|
-
getYospaceSession(): any;
|
|
6753
|
-
/**
|
|
6754
|
-
* Load and play the asset.
|
|
6755
|
-
*
|
|
6756
|
-
* @param config configuration of the HLS asset
|
|
6757
|
-
*/
|
|
6758
|
-
load(config: clpp.PlayerConfiguration): Promise<void>;
|
|
6759
|
-
/**
|
|
6760
|
-
* Load the asset and keep it paused.
|
|
6761
|
-
*
|
|
6762
|
-
* @param config configuration of the HLS asset
|
|
6763
|
-
*/
|
|
6764
|
-
loadPaused(config: clpp.PlayerConfiguration): Promise<void>;
|
|
6765
|
-
/**
|
|
6766
|
-
* Unload the source and release resources.
|
|
6767
|
-
*/
|
|
6768
|
-
unload(): Promise<void>;
|
|
6769
|
-
/**
|
|
6770
|
-
* Unpause the playback.
|
|
6771
|
-
*/
|
|
6772
|
-
unpause(): Promise<void>;
|
|
6773
|
-
}
|
|
6774
|
-
}
|
|
6775
|
-
|
|
6776
6668
|
namespace log {
|
|
6777
6669
|
/**
|
|
6778
6670
|
* Implement an interceptor and add it using {@link clpp.log#addInterceptor}
|
|
@@ -8044,6 +7936,20 @@ export namespace clpp {
|
|
|
8044
7936
|
}
|
|
8045
7937
|
}
|
|
8046
7938
|
|
|
7939
|
+
namespace polyfill {
|
|
7940
|
+
/**
|
|
7941
|
+
* Install all polyfills.
|
|
7942
|
+
*/
|
|
7943
|
+
function installAll(): void;
|
|
7944
|
+
/**
|
|
7945
|
+
* Registers a new polyfill to be installed.
|
|
7946
|
+
*
|
|
7947
|
+
* @param polyfill
|
|
7948
|
+
* @param priority An optional number priority. Higher priorities
|
|
7949
|
+
* will be executed before lower priority ones. Default is 0.
|
|
7950
|
+
*/
|
|
7951
|
+
function register(polyfill: Function, priority?: number): void;}
|
|
7952
|
+
|
|
8047
7953
|
namespace smooth {
|
|
8048
7954
|
export class SmoothComponent {
|
|
8049
7955
|
|
|
@@ -8753,6 +8659,129 @@ export namespace clpp {
|
|
|
8753
8659
|
|
|
8754
8660
|
}
|
|
8755
8661
|
}
|
|
8662
|
+
|
|
8663
|
+
namespace dom {
|
|
8664
|
+
/**
|
|
8665
|
+
* Creates an element, and cast the type from Element to HTMLElement.
|
|
8666
|
+
*/
|
|
8667
|
+
function createHTMLElement(tagName: string): HTMLElement;}
|
|
8668
|
+
|
|
8669
|
+
namespace media {
|
|
8670
|
+
/**
|
|
8671
|
+
* Tries to detect the media type from the URL.
|
|
8672
|
+
* i.e. detecting whether it is an MP4, DASH or HLS, manifest URL.
|
|
8673
|
+
*
|
|
8674
|
+
* @param url The source URL
|
|
8675
|
+
*/
|
|
8676
|
+
function detectType(url: string): clpp.Type|null;}
|
|
8677
|
+
|
|
8678
|
+
namespace obj {
|
|
8679
|
+
/**
|
|
8680
|
+
* Clones the given object.
|
|
8681
|
+
* This creates a copy for primitives or plain objects.
|
|
8682
|
+
*
|
|
8683
|
+
* @param item The item to clone
|
|
8684
|
+
*/
|
|
8685
|
+
function cloneItem<T>(item: T): T;
|
|
8686
|
+
/**
|
|
8687
|
+
* Merge multiple plain objects from left to right.
|
|
8688
|
+
* This copies over primitive values, plain Objects,
|
|
8689
|
+
* functions, DOM Elements and arrays.
|
|
8690
|
+
* If an item is null of undefined, it is ignored.
|
|
8691
|
+
*
|
|
8692
|
+
* @param args two or more objects to be merged
|
|
8693
|
+
*/
|
|
8694
|
+
function merge(...args: any[]): Record<string,any>|null;}
|
|
8695
|
+
|
|
8696
|
+
namespace strings {
|
|
8697
|
+
/**
|
|
8698
|
+
* Takes a bitrate and returns a string representation.
|
|
8699
|
+
* Units are in bps, Kbps, Mbps.
|
|
8700
|
+
*
|
|
8701
|
+
* @param bps The bitrate in bps
|
|
8702
|
+
*/
|
|
8703
|
+
function bitrateToString(bps: number|string|null|undefined): string;
|
|
8704
|
+
/**
|
|
8705
|
+
* Translates a duration in seconds to a human readable format.
|
|
8706
|
+
* You can use the following format specifiers:
|
|
8707
|
+
*
|
|
8708
|
+
* `%h` for Hours
|
|
8709
|
+
* `%m` for Minutes
|
|
8710
|
+
* `%s` for Seconds
|
|
8711
|
+
*
|
|
8712
|
+
* The formatters can be repeated to pad the output.
|
|
8713
|
+
* For example, `'%m'` will return '1' if you pass 60 seconds,
|
|
8714
|
+
* while `'%mm'` will left pad the output and return '01'.
|
|
8715
|
+
*
|
|
8716
|
+
* @param duration The duration in seconds
|
|
8717
|
+
* @param opt_format The output format
|
|
8718
|
+
*/
|
|
8719
|
+
function durationToString(duration: number, opt_format?: string): string;
|
|
8720
|
+
/**
|
|
8721
|
+
* Returns true if the given string ends with the given query.
|
|
8722
|
+
*
|
|
8723
|
+
* @param str The source string which we search in
|
|
8724
|
+
* @param query The target string that we search for
|
|
8725
|
+
*/
|
|
8726
|
+
function endsWith(str: string, query: string): boolean;
|
|
8727
|
+
/**
|
|
8728
|
+
* Creates a string from the given buffer, auto-detecting the encoding.
|
|
8729
|
+
* If it cannot detect the encoding, it will throw an exception.
|
|
8730
|
+
*/
|
|
8731
|
+
function fromBytesAutoDetect(sourceData: BufferSource|string, escapeStr?: boolean): string;
|
|
8732
|
+
/**
|
|
8733
|
+
* Creates a string from the given buffer as UTF-8 encoding.
|
|
8734
|
+
*
|
|
8735
|
+
* @param data binary data encoded as UTF-8
|
|
8736
|
+
*/
|
|
8737
|
+
function fromUtf8(data: BufferSource|null): string;
|
|
8738
|
+
/**
|
|
8739
|
+
* Generate the hash code from the given input.
|
|
8740
|
+
*
|
|
8741
|
+
* @param str the input string
|
|
8742
|
+
*/
|
|
8743
|
+
function hashCode(str: string): number;
|
|
8744
|
+
/**
|
|
8745
|
+
* Returns true if the given string starts with the given query.
|
|
8746
|
+
*
|
|
8747
|
+
* @param str The source string which we search in
|
|
8748
|
+
* @param query The target string that we search for
|
|
8749
|
+
*/
|
|
8750
|
+
function startsWith(str: string, query: string): boolean;
|
|
8751
|
+
/**
|
|
8752
|
+
* Converts an ASCII string to a byte array.
|
|
8753
|
+
* ASCII is converted using the specified number of bytes per character.
|
|
8754
|
+
*
|
|
8755
|
+
* @param s The string
|
|
8756
|
+
* @param opt_size Number of bytes per character
|
|
8757
|
+
*/
|
|
8758
|
+
function toByteArray(s: string, opt_size?: number): ArrayBuffer;
|
|
8759
|
+
/**
|
|
8760
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
8761
|
+
*/
|
|
8762
|
+
function toUtf16(str: string, littleEndian: boolean): ArrayBuffer;
|
|
8763
|
+
/**
|
|
8764
|
+
* Creates a Uint8Array from the given string, converting to UTF-8 encoding.
|
|
8765
|
+
*/
|
|
8766
|
+
function toUtf8(str: string): Uint8Array;}
|
|
8767
|
+
|
|
8768
|
+
namespace url {
|
|
8769
|
+
/**
|
|
8770
|
+
* Encodes the given dictionary to URL query parameters. Both keys and
|
|
8771
|
+
* values will be URI encoded so they should be provided un-encoded.
|
|
8772
|
+
* You can optionally specify an array of keys that should be included. If
|
|
8773
|
+
* specified, only those keys will be included in the resulting query string.
|
|
8774
|
+
* Please note that unless filter keys are specified, the keys will be
|
|
8775
|
+
* appended in sort order. This is necessary to ensure consistent results
|
|
8776
|
+
* across browsers.
|
|
8777
|
+
*
|
|
8778
|
+
* @param queryParams The query parameters
|
|
8779
|
+
* @param opt_ignoreQuestionMark If true, the result will not start
|
|
8780
|
+
* with a '?'
|
|
8781
|
+
* @param opt_keys Optionally only contain the keys in this
|
|
8782
|
+
* array. All other query parameters will be omitted
|
|
8783
|
+
*/
|
|
8784
|
+
function queryString(queryParams: Record<string, string>, opt_ignoreQuestionMark?: boolean, opt_keys?: Array<string>): string;}
|
|
8756
8785
|
}
|
|
8757
8786
|
|
|
8758
8787
|
namespace verimatrix {
|