@theoplayer/extended 3.3.0 → 3.6.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/THEOplayer.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * THEOplayer
3
3
  * https://www.theoplayer.com
4
4
  *
5
- * Version: 2022.2.0 (3.3.0)
5
+ * Version: 2022.3.0 (3.6.0)
6
6
  */
7
7
 
8
8
  /**
@@ -1101,6 +1101,15 @@ export declare interface BaseSource {
1101
1101
  * <br/> - Used for DASH and LL-HLS streams.
1102
1102
  */
1103
1103
  abr?: SourceAbrConfiguration;
1104
+ /**
1105
+ * Whether this source should be played using the LCEVC sdk.
1106
+ *
1107
+ * @remarks
1108
+ * <br/> - Requires the LCEVC feature to be enabled.
1109
+ * <br/> - Requires the V-Nova LCEVC SDK to be loaded on the page.
1110
+ * <br/> - Only available for DASH and HLS streams.
1111
+ */
1112
+ lcevc?: boolean;
1104
1113
  }
1105
1114
 
1106
1115
  /**
@@ -2101,6 +2110,10 @@ export declare class ChromelessPlayer implements EventDispatcher<PlayerEventMap>
2101
2110
  * <br/> - Volume is represented by a floating point number between `0.0` and `1.0`.
2102
2111
  */
2103
2112
  volume: number;
2113
+ /**
2114
+ * The latency manager for low latency live playback.
2115
+ */
2116
+ latency: LatencyManager;
2104
2117
  /**
2105
2118
  * The canvas of the player.
2106
2119
  */
@@ -4121,6 +4134,8 @@ export declare interface HespApi extends EventDispatcher<HespApiEventMap> {
4121
4134
  /**
4122
4135
  * Can be set to change the latency of the player.
4123
4136
  * A HespLatencyConfiguration object which gives latency configuration of the player.
4137
+ *
4138
+ * @deprecated use {@link ChromelessPlayer.latency} instead
4124
4139
  */
4125
4140
  latency: HespLatencyConfiguration;
4126
4141
  /**
@@ -4852,6 +4867,12 @@ export declare interface IMAAdDescription extends AdDescription {
4852
4867
  * <br/> - VAST, VMAP and VPAID are supported.
4853
4868
  */
4854
4869
  sources: string | AdSource;
4870
+ /**
4871
+ * Optional settings object for mapping verification vendors (google.ima.OmidVerificationVendor) to OMID Access Modes (google.ima.OmidAccessMode).
4872
+ */
4873
+ omidAccessModeRules?: {
4874
+ [key: number]: string;
4875
+ };
4855
4876
  }
4856
4877
 
4857
4878
  /**
@@ -5389,6 +5410,84 @@ export declare interface KeySystemConfiguration {
5389
5410
  */
5390
5411
  export declare type KeySystemId = 'widevine' | 'fairplay' | 'playready';
5391
5412
 
5413
+ /**
5414
+ * The latency configuration for managing the live offset of the player.
5415
+ *
5416
+ * @public
5417
+ */
5418
+ export declare interface LatencyConfiguration {
5419
+ /**
5420
+ * The start of the target live window.
5421
+ * If the live offset becomes smaller than this value, the player will slow down in order to increase the latency.
5422
+ */
5423
+ minimumOffset: number;
5424
+ /**
5425
+ * The end of the target live window.
5426
+ * If the live offset becomes higher than this value, the player will speed down in order to decrease the latency.
5427
+ */
5428
+ maximumOffset: number;
5429
+ /**
5430
+ * The live offset that the player will aim for. When correcting the offset by tuning the playbackRate,
5431
+ * the player will stop correcting when it reaches this value.
5432
+ */
5433
+ targetOffset: number;
5434
+ /**
5435
+ * The live offset at which the player will automatically trigger a live seek.
5436
+ */
5437
+ forceSeekOffset: number;
5438
+ /**
5439
+ * Indicates the minimum playbackRate used to slow down the player.
5440
+ */
5441
+ minimumPlaybackRate: number;
5442
+ /**
5443
+ * Indicates the maximum playbackRate used to speed down the player.
5444
+ */
5445
+ maximumPlaybackRate: number;
5446
+ /**
5447
+ * Updates multiple values of the current configuration.
5448
+ * @param configuration - The partial configuration with the replacement values.
5449
+ */
5450
+ update(configuration: Partial<LatencyConfiguration>): void;
5451
+ }
5452
+
5453
+ /**
5454
+ * The latency manager, used to control low-latency live playback.
5455
+ *
5456
+ * @public
5457
+ */
5458
+ export declare interface LatencyManager {
5459
+ /**
5460
+ * Whether the latency manager is enabled and is chasing live playback.
5461
+ *
5462
+ * @remarks
5463
+ * <br/> - Can only be enabled during live playback.
5464
+ * <br/> - Only available for HESP sources.
5465
+ */
5466
+ enabled: boolean;
5467
+ /**
5468
+ * The current latency.
5469
+ *
5470
+ * @remarks
5471
+ * <br/> - Only available during live playback.
5472
+ */
5473
+ readonly currentLatency: number | undefined;
5474
+ /**
5475
+ * The LatencyConfiguration of the current source, if available.
5476
+ *
5477
+ * @remarks
5478
+ * <br/> - Only available during live playback.
5479
+ */
5480
+ readonly streamConfiguration: Partial<Readonly<LatencyConfiguration>> | undefined;
5481
+ /**
5482
+ * Can be used to set a custom values for chasing live playback.
5483
+ *
5484
+ * @remarks
5485
+ * <br/> - The player might change the set values based on the streamConfiguration.
5486
+ * <br/> - This configuration is reset every time the player source changes.
5487
+ */
5488
+ readonly configuration: LatencyConfiguration;
5489
+ }
5490
+
5392
5491
  /**
5393
5492
  * A request for a license.
5394
5493
  * @public
@@ -7414,6 +7513,14 @@ export declare interface SourceConfiguration {
7414
7513
  * @defaultValue `false`
7415
7514
  */
7416
7515
  blockContentIfAdError?: boolean;
7516
+ /**
7517
+ * If set, only allow ads to play that are scheduled after this time.
7518
+ *
7519
+ * @remarks
7520
+ * <br/> - This setting is strictly after - e.g. setting `playAdsAfterTime` to 15 will cause the player to ignore an ad break scheduled to play at 15s.
7521
+ *
7522
+ */
7523
+ playAdsAfterTime?: number;
7417
7524
  /**
7418
7525
  * Content protection configuration.
7419
7526
  */
@@ -7537,10 +7644,11 @@ export declare interface SourceDescription extends SourceConfiguration {
7537
7644
  /**
7538
7645
  * The integration identifier of a source specific to a pre-integration, represented by a value from the following list:
7539
7646
  * <br/> - `'verizon-media'`: The source is a {@link VerizonMediaSource}
7647
+ * <br/> - `'mediatailor'`: The source contains the MediaTailor initialization url
7540
7648
  *
7541
7649
  * @public
7542
7650
  */
7543
- export declare type SourceIntegrationId = 'verizon-media';
7651
+ export declare type SourceIntegrationId = 'verizon-media' | 'mediatailor';
7544
7652
 
7545
7653
  /**
7546
7654
  * A media resource or list of media resources.
@@ -7876,6 +7984,18 @@ declare interface TextTrack_2 extends Track, EventDispatcher<TextTrackEventMap_2
7876
7984
  }
7877
7985
  export { TextTrack_2 as TextTrack }
7878
7986
 
7987
+ /**
7988
+ * Fired when a cue is added to the text track.
7989
+ *
7990
+ * @public
7991
+ */
7992
+ export declare interface TextTrackAddCueEvent extends Event_2<'addcue'> {
7993
+ /**
7994
+ * The cue that is added to the text track.
7995
+ */
7996
+ readonly cue: TextTrackCue_2;
7997
+ }
7998
+
7879
7999
  /**
7880
8000
  * Represents a cue of a text track.
7881
8001
  *
@@ -7920,6 +8040,30 @@ declare interface TextTrackCue_2 extends EventDispatcher<TextTrackCueEventMap_2>
7920
8040
  }
7921
8041
  export { TextTrackCue_2 as TextTrackCue }
7922
8042
 
8043
+ /**
8044
+ * Fired when the displaying cues of the text track has changed.
8045
+ *
8046
+ * @public
8047
+ */
8048
+ export declare interface TextTrackCueChangeEvent extends Event_2<'cuechange'> {
8049
+ /**
8050
+ * The text track which displaying cues has changed.
8051
+ */
8052
+ readonly track: TextTrack_2;
8053
+ }
8054
+
8055
+ /**
8056
+ * Fired when a text track cue is entered.
8057
+ *
8058
+ * @public
8059
+ */
8060
+ export declare interface TextTrackCueEnterEvent extends Event_2<'enter'> {
8061
+ /**
8062
+ * The text track cue that is entered.
8063
+ */
8064
+ readonly cue: TextTrackCue_2;
8065
+ }
8066
+
7923
8067
  /**
7924
8068
  * The events fired by the {@link TextTrackCue}.
7925
8069
  *
@@ -7929,18 +8073,30 @@ declare interface TextTrackCueEventMap_2 {
7929
8073
  /**
7930
8074
  * Fired when the cue is entered.
7931
8075
  */
7932
- enter: Event_2<'enter'>;
8076
+ enter: TextTrackCueEnterEvent;
7933
8077
  /**
7934
8078
  * Fired when the cue is exited.
7935
8079
  */
7936
- exit: Event_2<'exit'>;
8080
+ exit: TextTrackCueExitEvent;
7937
8081
  /**
7938
8082
  * Fired when the cue is updated.
7939
8083
  */
7940
- update: Event_2<'update'>;
8084
+ update: TextTrackCueUpdateEvent;
7941
8085
  }
7942
8086
  export { TextTrackCueEventMap_2 as TextTrackCueEventMap }
7943
8087
 
8088
+ /**
8089
+ * Fired when a text track cue is exited.
8090
+ *
8091
+ * @public
8092
+ */
8093
+ export declare interface TextTrackCueExitEvent extends Event_2<'exit'> {
8094
+ /**
8095
+ * The text track cue that is exited.
8096
+ */
8097
+ readonly cue: TextTrackCue_2;
8098
+ }
8099
+
7944
8100
  /**
7945
8101
  * List of text track cues.
7946
8102
  *
@@ -7965,6 +8121,18 @@ declare interface TextTrackCueList_2 extends ReadonlyArray<TextTrackCue_2> {
7965
8121
  }
7966
8122
  export { TextTrackCueList_2 as TextTrackCueList }
7967
8123
 
8124
+ /**
8125
+ * Fired when a text track cue is updated.
8126
+ *
8127
+ * @public
8128
+ */
8129
+ export declare interface TextTrackCueUpdateEvent extends Event_2<'update'> {
8130
+ /**
8131
+ * The text track cue that is updated.
8132
+ */
8133
+ readonly cue: TextTrackCue_2;
8134
+ }
8135
+
7968
8136
  /**
7969
8137
  * Describes the configuration of a side-loaded text track.
7970
8138
  *
@@ -8026,6 +8194,18 @@ export declare interface TextTrackDescription {
8026
8194
 
8027
8195
  }
8028
8196
 
8197
+ /**
8198
+ * Fired when a cue of the text track has entered.
8199
+ *
8200
+ * @public
8201
+ */
8202
+ export declare interface TextTrackEnterCueEvent extends Event_2<'entercue'> {
8203
+ /**
8204
+ * The cue from the text track that has entered.
8205
+ */
8206
+ readonly cue: TextTrackCue_2;
8207
+ }
8208
+
8029
8209
  /**
8030
8210
  * An error thrown by a text track.
8031
8211
  *
@@ -8074,31 +8254,31 @@ declare interface TextTrackEventMap_2 extends TrackEventMap {
8074
8254
  /**
8075
8255
  * Fired when a cue is added to the track.
8076
8256
  */
8077
- addcue: Event_2<'addcue'>;
8257
+ addcue: TextTrackAddCueEvent;
8078
8258
  /**
8079
8259
  * Fired when a cue of the track is removed.
8080
8260
  */
8081
- removecue: Event_2<'removecue'>;
8261
+ removecue: TextTrackRemoveCueEvent;
8082
8262
  /**
8083
8263
  * Fired when a cue of the track enters.
8084
8264
  */
8085
- entercue: Event_2<'entercue'>;
8265
+ entercue: TextTrackEnterCueEvent;
8086
8266
  /**
8087
8267
  * Fired when a cue of the track exits.
8088
8268
  */
8089
- exitcue: Event_2<'exitcue'>;
8269
+ exitcue: TextTrackExitCueEvent;
8090
8270
  /**
8091
- * Fired when a cue of the track changes.
8271
+ * Fired when the displaying cues of the text track changes.
8092
8272
  */
8093
- cuechange: Event_2<'cuechange'>;
8273
+ cuechange: TextTrackCueChangeEvent;
8094
8274
  /**
8095
8275
  * Fired when the text track's {@link TextTrack.readyState | ready state} changes.
8096
8276
  */
8097
- readystatechange: Event_2<'readystatechange'>;
8277
+ readystatechange: TextTrackReadyStateChangeEvent;
8098
8278
  /**
8099
8279
  * Fired when the text track's {@link TextTrack."type" | type} changes.
8100
8280
  */
8101
- typechange: Event_2<'typechange'>;
8281
+ typechange: TextTrackTypeChangeEvent;
8102
8282
  /**
8103
8283
  * Fired when an error occurred while loading or parsing the track.
8104
8284
  */
@@ -8106,6 +8286,18 @@ declare interface TextTrackEventMap_2 extends TrackEventMap {
8106
8286
  }
8107
8287
  export { TextTrackEventMap_2 as TextTrackEventMap }
8108
8288
 
8289
+ /**
8290
+ * Fired when a cue of the text track has exited.
8291
+ *
8292
+ * @public
8293
+ */
8294
+ export declare interface TextTrackExitCueEvent extends Event_2<'exitcue'> {
8295
+ /**
8296
+ * The cue from the text track that has exited.
8297
+ */
8298
+ readonly cue: TextTrackCue_2;
8299
+ }
8300
+
8109
8301
  /**
8110
8302
  * The ready state of a text track, represented by a value from the following list:
8111
8303
  * <br/> - `0`: Indicates that the text track's cues have not been obtained.
@@ -8117,6 +8309,34 @@ export { TextTrackEventMap_2 as TextTrackEventMap }
8117
8309
  */
8118
8310
  export declare type TextTrackReadyState = 0 | 1 | 2 | 3;
8119
8311
 
8312
+ /**
8313
+ * Fired when the {@link TextTrack.readyState | ready state} of the text track has changed.
8314
+ *
8315
+ * @public
8316
+ */
8317
+ export declare interface TextTrackReadyStateChangeEvent extends Event_2<'readystatechange'> {
8318
+ /**
8319
+ * The text track which ready state has changed.
8320
+ */
8321
+ readonly track: TextTrack_2;
8322
+ /**
8323
+ * The new {@link TextTrack.readyState | ready state} of the text track.
8324
+ */
8325
+ readonly readyState: TextTrackReadyState;
8326
+ }
8327
+
8328
+ /**
8329
+ * Fired when a cue is removed from the text track.
8330
+ *
8331
+ * @public
8332
+ */
8333
+ export declare interface TextTrackRemoveCueEvent extends Event_2<'removecue'> {
8334
+ /**
8335
+ * The cue that is removed from the text track.
8336
+ */
8337
+ readonly cue: TextTrackCue_2;
8338
+ }
8339
+
8120
8340
  /**
8121
8341
  * List of text tracks.
8122
8342
  *
@@ -8232,6 +8452,18 @@ export declare interface TextTrackStyleEventMap {
8232
8452
  */
8233
8453
  export declare type TextTrackType = 'srt' | 'ttml' | 'webvtt' | 'emsg' | 'eventstream' | 'id3' | 'cea608' | 'daterange' | '';
8234
8454
 
8455
+ /**
8456
+ * Fired when the {@link TextTrack."type" | type} of the text track has changed.
8457
+ *
8458
+ * @public
8459
+ */
8460
+ export declare interface TextTrackTypeChangeEvent extends Event_2<'typechange'> {
8461
+ /**
8462
+ * The text track which type has changed.
8463
+ */
8464
+ readonly track: TextTrack_2;
8465
+ }
8466
+
8235
8467
  /**
8236
8468
  * Describes an ad break request.
8237
8469
  *
@@ -10571,6 +10803,12 @@ export declare interface VerizonMediaSource extends BaseSource {
10571
10803
  * <br/> - The order of a list of asset identifiers is the order their corresponding assets will be played in.
10572
10804
  */
10573
10805
  id: VerizonMediaAssetId | VerizonMediaAssetId[] | VerizonMediaExternalId;
10806
+ /**
10807
+ * The prefix to use for Verizon Media Preplay API and Asset Info API requests.
10808
+ *
10809
+ * @defaultValue `'https://content.uplynk.com'`
10810
+ */
10811
+ prefix?: string;
10574
10812
  /**
10575
10813
  * The query string parameters added to Verizon Media Preplay requests.
10576
10814
  *