@theoplayer/extended 3.4.0 → 3.6.1

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.1 (3.4.0)
5
+ * Version: 2022.3.0 (3.6.1)
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
@@ -7885,6 +7984,18 @@ declare interface TextTrack_2 extends Track, EventDispatcher<TextTrackEventMap_2
7885
7984
  }
7886
7985
  export { TextTrack_2 as TextTrack }
7887
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
+
7888
7999
  /**
7889
8000
  * Represents a cue of a text track.
7890
8001
  *
@@ -7929,6 +8040,30 @@ declare interface TextTrackCue_2 extends EventDispatcher<TextTrackCueEventMap_2>
7929
8040
  }
7930
8041
  export { TextTrackCue_2 as TextTrackCue }
7931
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
+
7932
8067
  /**
7933
8068
  * The events fired by the {@link TextTrackCue}.
7934
8069
  *
@@ -7938,18 +8073,30 @@ declare interface TextTrackCueEventMap_2 {
7938
8073
  /**
7939
8074
  * Fired when the cue is entered.
7940
8075
  */
7941
- enter: Event_2<'enter'>;
8076
+ enter: TextTrackCueEnterEvent;
7942
8077
  /**
7943
8078
  * Fired when the cue is exited.
7944
8079
  */
7945
- exit: Event_2<'exit'>;
8080
+ exit: TextTrackCueExitEvent;
7946
8081
  /**
7947
8082
  * Fired when the cue is updated.
7948
8083
  */
7949
- update: Event_2<'update'>;
8084
+ update: TextTrackCueUpdateEvent;
7950
8085
  }
7951
8086
  export { TextTrackCueEventMap_2 as TextTrackCueEventMap }
7952
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
+
7953
8100
  /**
7954
8101
  * List of text track cues.
7955
8102
  *
@@ -7974,6 +8121,18 @@ declare interface TextTrackCueList_2 extends ReadonlyArray<TextTrackCue_2> {
7974
8121
  }
7975
8122
  export { TextTrackCueList_2 as TextTrackCueList }
7976
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
+
7977
8136
  /**
7978
8137
  * Describes the configuration of a side-loaded text track.
7979
8138
  *
@@ -8035,6 +8194,18 @@ export declare interface TextTrackDescription {
8035
8194
 
8036
8195
  }
8037
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
+
8038
8209
  /**
8039
8210
  * An error thrown by a text track.
8040
8211
  *
@@ -8083,31 +8254,31 @@ declare interface TextTrackEventMap_2 extends TrackEventMap {
8083
8254
  /**
8084
8255
  * Fired when a cue is added to the track.
8085
8256
  */
8086
- addcue: Event_2<'addcue'>;
8257
+ addcue: TextTrackAddCueEvent;
8087
8258
  /**
8088
8259
  * Fired when a cue of the track is removed.
8089
8260
  */
8090
- removecue: Event_2<'removecue'>;
8261
+ removecue: TextTrackRemoveCueEvent;
8091
8262
  /**
8092
8263
  * Fired when a cue of the track enters.
8093
8264
  */
8094
- entercue: Event_2<'entercue'>;
8265
+ entercue: TextTrackEnterCueEvent;
8095
8266
  /**
8096
8267
  * Fired when a cue of the track exits.
8097
8268
  */
8098
- exitcue: Event_2<'exitcue'>;
8269
+ exitcue: TextTrackExitCueEvent;
8099
8270
  /**
8100
- * Fired when a cue of the track changes.
8271
+ * Fired when the displaying cues of the text track changes.
8101
8272
  */
8102
- cuechange: Event_2<'cuechange'>;
8273
+ cuechange: TextTrackCueChangeEvent;
8103
8274
  /**
8104
8275
  * Fired when the text track's {@link TextTrack.readyState | ready state} changes.
8105
8276
  */
8106
- readystatechange: Event_2<'readystatechange'>;
8277
+ readystatechange: TextTrackReadyStateChangeEvent;
8107
8278
  /**
8108
8279
  * Fired when the text track's {@link TextTrack."type" | type} changes.
8109
8280
  */
8110
- typechange: Event_2<'typechange'>;
8281
+ typechange: TextTrackTypeChangeEvent;
8111
8282
  /**
8112
8283
  * Fired when an error occurred while loading or parsing the track.
8113
8284
  */
@@ -8115,6 +8286,18 @@ declare interface TextTrackEventMap_2 extends TrackEventMap {
8115
8286
  }
8116
8287
  export { TextTrackEventMap_2 as TextTrackEventMap }
8117
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
+
8118
8301
  /**
8119
8302
  * The ready state of a text track, represented by a value from the following list:
8120
8303
  * <br/> - `0`: Indicates that the text track's cues have not been obtained.
@@ -8126,6 +8309,34 @@ export { TextTrackEventMap_2 as TextTrackEventMap }
8126
8309
  */
8127
8310
  export declare type TextTrackReadyState = 0 | 1 | 2 | 3;
8128
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
+
8129
8340
  /**
8130
8341
  * List of text tracks.
8131
8342
  *
@@ -8241,6 +8452,18 @@ export declare interface TextTrackStyleEventMap {
8241
8452
  */
8242
8453
  export declare type TextTrackType = 'srt' | 'ttml' | 'webvtt' | 'emsg' | 'eventstream' | 'id3' | 'cea608' | 'daterange' | '';
8243
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
+
8244
8467
  /**
8245
8468
  * Describes an ad break request.
8246
8469
  *