@theoplayer/extended 4.3.1 → 4.4.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.4.1 (4.3.1)
5
+ * Version: 2022.4.2 (4.4.0)
6
6
  */
7
7
 
8
8
  /**
@@ -102,23 +102,6 @@ export declare interface ABRStrategyConfiguration {
102
102
  */
103
103
  export declare type ABRStrategyType = 'performance' | 'quality' | 'bandwidth';
104
104
 
105
- /**
106
- * @public
107
- */
108
- export declare interface ActiveTrackInfoLabel extends MetricLabel {
109
- readonly audioSwitchingSetId: string;
110
- readonly audioTrackId: string;
111
- readonly videoSwitchingSetId: string;
112
- readonly videoTrackId: string;
113
- }
114
-
115
- /**
116
- * @public
117
- */
118
- export declare interface ActiveTrackLabeledMetric extends Metric {
119
- readonly labelData: ActiveTrackInfoLabel;
120
- }
121
-
122
105
  /**
123
106
  * Represents a VAST creative. It is either a linear or non-linear ad.
124
107
  *
@@ -869,32 +852,6 @@ export declare type AgamaStreamType = 'live' | 'vod';
869
852
  export declare interface AirPlay extends VendorCast {
870
853
  }
871
854
 
872
- /**
873
- * @public
874
- */
875
- export declare type Analytic = AnalyticMap[keyof AnalyticMap];
876
-
877
- /**
878
- * @public
879
- */
880
- export declare interface AnalyticBase<N extends AnalyticType, V> {
881
- readonly name: N;
882
- readonly value: V;
883
- readonly unit: string;
884
- readonly description: string;
885
- }
886
-
887
- /**
888
- * @public
889
- */
890
- export declare interface AnalyticMap {
891
- [AnalyticType.LIVE_OFFSET]: AnalyticBase<AnalyticType.LIVE_OFFSET, number>;
892
- [AnalyticType.TRACK_BYTES_DOWNLOADED]: AnalyticBase<AnalyticType.TRACK_BYTES_DOWNLOADED, TrackBytesDownloadedData>;
893
- [AnalyticType.ESTIMATED_TRACK_NETWORK_BANDWIDTH]: AnalyticBase<AnalyticType.ESTIMATED_TRACK_NETWORK_BANDWIDTH, number>;
894
- [AnalyticType.ESTIMATED_TRACK_MEDIA_DATA_BANDWIDTH]: AnalyticBase<AnalyticType.ESTIMATED_TRACK_MEDIA_DATA_BANDWIDTH, number>;
895
- [AnalyticType.SEGMENT_RECEIVE_INTERVAL]: AnalyticBase<AnalyticType.SEGMENT_RECEIVE_INTERVAL, SegmentReceiveIntervalData>;
896
- }
897
-
898
855
  /**
899
856
  * The analytics API.
900
857
  *
@@ -935,17 +892,6 @@ export declare interface AnalyticsDescription {
935
892
  */
936
893
  export declare type AnalyticsIntegrationID = 'agama' | 'conviva' | 'youbora' | 'moat' | 'streamone' | 'smartsight';
937
894
 
938
- /**
939
- * @public
940
- */
941
- export declare enum AnalyticType {
942
- LIVE_OFFSET = "liveoffset",
943
- TRACK_BYTES_DOWNLOADED = "trackbytesdownloaded",
944
- ESTIMATED_TRACK_NETWORK_BANDWIDTH = "estimatedtracknetworkbandwidth",
945
- ESTIMATED_TRACK_MEDIA_DATA_BANDWIDTH = "estimatedtrackmediadatabandwidth",
946
- SEGMENT_RECEIVE_INTERVAL = "segmentreceiveinterval"
947
- }
948
-
949
895
  /**
950
896
  * Represents a quality of an audio track.
951
897
  *
@@ -1151,13 +1097,6 @@ export declare interface BaseSource {
1151
1097
  lcevc?: boolean;
1152
1098
  }
1153
1099
 
1154
- /**
1155
- * @public
1156
- */
1157
- export declare interface BaseUriLabel extends MetricLabel {
1158
- baseUri: string;
1159
- }
1160
-
1161
1100
  /**
1162
1101
  * A boundary can be one of 3 possible types:
1163
1102
  * <br/> - c3: An ad that is relevant for up to 3 days after the original airing.
@@ -3035,13 +2974,6 @@ export declare interface DashPlaybackConfiguration {
3035
2974
  needsTimescaleShifting?: boolean | null;
3036
2975
  }
3037
2976
 
3038
- /**
3039
- * @public
3040
- */
3041
- export declare interface DataEvent<TType extends string, DataType> extends Event_2<TType> {
3042
- readonly data: DataType;
3043
- }
3044
-
3045
2977
  /**
3046
2978
  * Represents a cue of a HLS date range metadata text track.
3047
2979
  *
@@ -3610,11 +3542,6 @@ declare interface ErrorEvent_2 extends Event_2<'error'> {
3610
3542
  }
3611
3543
  export { ErrorEvent_2 as ErrorEvent }
3612
3544
 
3613
- /**
3614
- * @public
3615
- */
3616
- export declare type ErrorType = string;
3617
-
3618
3545
  /**
3619
3546
  * Fired when an event occurs.
3620
3547
  *
@@ -3777,21 +3704,6 @@ export declare interface FairPlayKeySystemConfiguration extends KeySystemConfigu
3777
3704
  */
3778
3705
  export declare const features: string;
3779
3706
 
3780
- /**
3781
- * @public
3782
- */
3783
- export declare interface FirstResponseLabel extends MetricLabel {
3784
- readonly uri: string;
3785
- readonly type: HespRequestType;
3786
- }
3787
-
3788
- /**
3789
- * @public
3790
- */
3791
- export declare interface FirstResponseMetric extends Metric {
3792
- labelData: FirstResponseLabel;
3793
- }
3794
-
3795
3707
  /**
3796
3708
  * Describes a FreeWheel ad break request.
3797
3709
  *
@@ -3982,6 +3894,12 @@ export declare interface GoogleDAI {
3982
3894
  * @param time - The content time without any ads (in seconds).
3983
3895
  */
3984
3896
  streamTimeForContentTime(time: number): number;
3897
+ /**
3898
+ * Replaces all the ad tag parameters used for upcoming ad requests for a live stream.
3899
+ *
3900
+ * @param adTagParameters - The new ad tag parameters.
3901
+ */
3902
+ replaceAdTagParameters(adTagParameters?: Record<string, string>): void;
3985
3903
  /**
3986
3904
  * Whether snapback is enabled. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.
3987
3905
  */
@@ -4240,12 +4158,6 @@ export declare interface HespApi extends EventDispatcher<HespApiEventMap> {
4240
4158
  * <br/> - Undefined if no HESP source is configured.
4241
4159
  */
4242
4160
  readonly manifest: Object | undefined;
4243
- /**
4244
- * A HespMetricsApi object which gives player metrics.
4245
- * @remarks
4246
- * <br/> - Undefined if no HESP source is configured.
4247
- */
4248
- readonly metrics: HespMetricsApi | undefined;
4249
4161
  }
4250
4162
 
4251
4163
  /**
@@ -4258,22 +4170,10 @@ export declare interface HespApi extends EventDispatcher<HespApiEventMap> {
4258
4170
  * @public
4259
4171
  */
4260
4172
  export declare interface HespApiEventMap {
4261
- /**
4262
- * Fired when a new analytic sample is available.
4263
- */
4264
- analytic: DataEvent<'analytic', Analytic>;
4265
4173
  /**
4266
4174
  * Fired when the player enters the HESP live playback mode.
4267
4175
  */
4268
4176
  golive: Event_2<'golive'>;
4269
- /**
4270
- * Fired when the player exits the HESP live playback mode, e.g. when going into DVR playback mode.
4271
- */
4272
- nogolive: Event_2<'nogolive'>;
4273
- /**
4274
- * Fired whenever the player buffer changes.
4275
- */
4276
- bufferedchange: Event_2<'bufferedchange'>;
4277
4177
  }
4278
4178
 
4279
4179
  /**
@@ -4313,66 +4213,6 @@ export declare interface HespLatencyConfiguration {
4313
4213
  */
4314
4214
  export declare type HespMediaType = 'audio' | 'video' | 'metadata';
4315
4215
 
4316
- /**
4317
- * HESP metrics.
4318
- * @remarks
4319
- * <br/> - Note: This API is in an experimental stage and may be subject to breaking changes.
4320
- * <br/> - Only available with the feature `'hesp'`.
4321
- * <br/> - Only applies to HESP streams.
4322
- *
4323
- * @public
4324
- */
4325
- export declare interface HespMetricMap {
4326
- totalTimePlayed: TotalTimePlayedMetric;
4327
- totalTimeStalled: ActiveTrackLabeledMetric;
4328
- totalTimePaused: UnlabeledMetric;
4329
- numberOfStalls: UnlabeledMetric;
4330
- numberOfWifiSleeps: UnlabeledMetric;
4331
- numberOfPlayPauseToggle: UnlabeledMetric;
4332
- numberOfAbrChanges: QualityChangeMetric;
4333
- qualityActive: ActiveTrackLabeledMetric;
4334
- numberOfErrors: TypedMetric<ErrorType>;
4335
- numberOfLiveSeeks: UnlabeledMetric;
4336
- totalTimeSeeking: TypedMetric<SeekReason>;
4337
- droppedVideoFrames: ActiveTrackLabeledMetric;
4338
- totalVideoFrames: ActiveTrackLabeledMetric;
4339
- timeToFirstFrame: UnlabeledMetric;
4340
- timeToFirstResponse: FirstResponseMetric;
4341
- timeToGoLive: HistogramMetric;
4342
- numberOfImpressions: StreamLabeledMetric;
4343
- numberOfRateChanges: UnlabeledMetric;
4344
- segmentIntervals: HistogramTrackLabeledMetric;
4345
- }
4346
-
4347
- /**
4348
- * The names of HESP metrics.
4349
- * @remarks
4350
- * <br/> - Note: This API is in an experimental stage and may be subject to breaking changes.
4351
- * <br/> - Only available with the feature `'hesp'`.
4352
- * <br/> - Only applies to HESP streams.
4353
- *
4354
- * @public
4355
- */
4356
- export declare type HespMetricName = StringKeyOf<HespMetricMap>;
4357
-
4358
- /**
4359
- * An object with {@link HespMetricName} as key and {@link Metric} as value.
4360
- * @remarks
4361
- * <br/> - Note: This API is in an experimental stage and may be subject to breaking changes.
4362
- * <br/> - Only available with the feature `'hesp'`.
4363
- * <br/> - Only applies to HESP streams.
4364
- *
4365
- * @public
4366
- */
4367
- export declare type HespMetricsApi = {
4368
- readonly [name in HespMetricName]: Array<HespMetricMap[name]>;
4369
- };
4370
-
4371
- /**
4372
- * @public
4373
- */
4374
- export declare type HespRequestType = 'manifest' | 'stream' | 'keyframe';
4375
-
4376
4216
  /**
4377
4217
  * Specific source configuration for an HESP media resource.
4378
4218
  * @remarks
@@ -4406,28 +4246,6 @@ export declare interface HespTypedSource extends TypedSource {
4406
4246
  hesp?: HespSourceConfiguration;
4407
4247
  }
4408
4248
 
4409
- /**
4410
- * @public
4411
- */
4412
- export declare interface HistogramLabel extends MetricLabel {
4413
- readonly upperBound: number;
4414
- readonly lowerBound: number;
4415
- }
4416
-
4417
- /**
4418
- * @public
4419
- */
4420
- export declare interface HistogramMetric extends Metric {
4421
- readonly labelData: HistogramLabel;
4422
- }
4423
-
4424
- /**
4425
- * @public
4426
- */
4427
- export declare interface HistogramTrackLabeledMetric extends Metric {
4428
- readonly labelData: HistogramLabel & TrackInfoLabel;
4429
- }
4430
-
4431
4249
  /**
4432
4250
  * The strategy for aligning HLS discontinuities, represented by a value from the following list:
4433
4251
  * <br/> - `'playlist'`: The first segment after a discontinuity is aligned with the segment's start time according to the HLS playlist,
@@ -5297,13 +5115,6 @@ export declare type IrdetoIntegrationID = 'irdeto';
5297
5115
  */
5298
5116
  export declare type JoinStrategy = 'auto' | 'manual' | 'disabled';
5299
5117
 
5300
- /**
5301
- * @public
5302
- */
5303
- export declare interface KeyFrameLabel extends MetricLabel {
5304
- readonly keyFrame: boolean;
5305
- }
5306
-
5307
5118
  /**
5308
5119
  * Describes the configuration of the KeyOS DRM integration
5309
5120
  *
@@ -5938,31 +5749,6 @@ export declare interface MetadataDescription {
5938
5749
  readonly title?: string;
5939
5750
  }
5940
5751
 
5941
- /**
5942
- * @public
5943
- */
5944
- export declare interface Metric<MN extends HespMetricName = HespMetricName> {
5945
- /**
5946
- * A metric name which will be one of {@link HespMetricName}.
5947
- */
5948
- readonly name: MN;
5949
- /**
5950
- * The value of metric.
5951
- */
5952
- readonly value: number;
5953
- /**
5954
- * A label data as an additional information of Metric.
5955
- */
5956
- readonly labelData: MetricLabel;
5957
- }
5958
-
5959
- /**
5960
- * @public
5961
- */
5962
- export declare interface MetricLabel {
5963
- [key: string]: string | number | boolean;
5964
- }
5965
-
5966
5752
  /**
5967
5753
  * The metrics API which can be used to gather information related to the quality-of-service and video playback experience.
5968
5754
  *
@@ -6520,13 +6306,6 @@ export declare interface PiPConfiguration {
6520
6306
  */
6521
6307
  export declare type PiPPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
6522
6308
 
6523
- /**
6524
- * @public
6525
- */
6526
- export declare interface PlayBackRateLabel {
6527
- readonly playbackRate: number;
6528
- }
6529
-
6530
6309
  /**
6531
6310
  * The player API extended with UI functionality.
6532
6311
  *
@@ -7093,18 +6872,6 @@ export declare interface Quality extends EventDispatcher<QualityEventMap> {
7093
6872
  readonly available: boolean;
7094
6873
  }
7095
6874
 
7096
- /**
7097
- * @public
7098
- */
7099
- export declare interface QualityChangeMetric extends Metric {
7100
- labelData: ReasonLabel;
7101
- }
7102
-
7103
- /**
7104
- * @public
7105
- */
7106
- export declare type QualityChangeReason = 'automatic' | 'manual';
7107
-
7108
6875
  /**
7109
6876
  * An quality-related event fired by a {@link MediaTrack}.
7110
6877
  *
@@ -7176,13 +6943,6 @@ export declare interface ReadyStateChangeEvent extends Event_2<'readystatechange
7176
6943
  readonly readyState: number;
7177
6944
  }
7178
6945
 
7179
- /**
7180
- * @public
7181
- */
7182
- export declare interface ReasonLabel extends MetricLabel {
7183
- reason: QualityChangeReason;
7184
- }
7185
-
7186
6946
  /**
7187
6947
  * Register a content protection integration
7188
6948
  *
@@ -7668,10 +7428,14 @@ export { ResponseType_2 as ResponseType }
7668
7428
  * <br/> - `'always'`: The player always uses a seamless switch, and never uses a hard switch.
7669
7429
  * Use this if you notice that the player never preloads the next period, even though you know that the current platform
7670
7430
  * should support it.
7431
+ * <br/> - `'clear-only'`: The player only uses a seamless switch when no content protection is used in the current and next period. Otherwise
7432
+ * it always uses a hard switch.
7433
+ * Use this if you notice that the player is attempting but failing to preload the next period on the current platform only when
7434
+ * content protection is involved.
7671
7435
  *
7672
7436
  * @public
7673
7437
  */
7674
- export declare type SeamlessPeriodSwitchStrategy = 'auto' | 'always' | 'never';
7438
+ export declare type SeamlessPeriodSwitchStrategy = 'auto' | 'always' | 'never' | 'clear-only';
7675
7439
 
7676
7440
  /**
7677
7441
  * Fired when `ChromelessPlayer.seeking` changes to `false` after the current playback position was changed.
@@ -7697,19 +7461,6 @@ export declare interface SeekingEvent extends Event_2<'seeking'> {
7697
7461
  readonly currentTime: number;
7698
7462
  }
7699
7463
 
7700
- /**
7701
- * @public
7702
- */
7703
- export declare type SeekReason = 'user' | 'golive' | 'init';
7704
-
7705
- /**
7706
- * @public
7707
- */
7708
- export declare interface SegmentReceiveIntervalData {
7709
- time: number;
7710
- mediaType: HespMediaType;
7711
- }
7712
-
7713
7464
  /**
7714
7465
  * Represents a configuration for server-side ad insertion (SSAI).
7715
7466
  *
@@ -8188,13 +7939,6 @@ export declare type StateChangeEvent = Event_2<'statechange'>;
8188
7939
  */
8189
7940
  export declare type StereoChangeEvent = Event_2<'stereochange'>;
8190
7941
 
8191
- /**
8192
- * @public
8193
- */
8194
- export declare interface StreamLabeledMetric extends Metric {
8195
- readonly labelData: BaseUriLabel;
8196
- }
8197
-
8198
7942
  /**
8199
7943
  * The identifier of the Stream One integration.
8200
7944
  *
@@ -9097,13 +8841,6 @@ export declare interface TokenBasedTitaniumDRMConfiguration extends TitaniumDRMC
9097
8841
  authToken: string;
9098
8842
  }
9099
8843
 
9100
- /**
9101
- * @public
9102
- */
9103
- export declare interface TotalTimePlayedMetric extends ActiveTrackLabeledMetric {
9104
- readonly labelData: ActiveTrackInfoLabel & MetricLabel & PlayBackRateLabel;
9105
- }
9106
-
9107
8844
  /**
9108
8845
  * Represents a track of a media resource.
9109
8846
  *
@@ -9145,15 +8882,6 @@ export declare interface Track extends EventDispatcher<TrackEventMap> {
9145
8882
  language: string;
9146
8883
  }
9147
8884
 
9148
- /**
9149
- * @public
9150
- */
9151
- export declare interface TrackBytesDownloadedData {
9152
- date: Date;
9153
- newBytes: number;
9154
- trackInfo: TrackInfoLabel;
9155
- }
9156
-
9157
8885
  /**
9158
8886
  * Fired when a track has been changed.
9159
8887
  *
@@ -9185,15 +8913,6 @@ export declare interface TrackEventMap {
9185
8913
  update: TrackUpdateEvent;
9186
8914
  }
9187
8915
 
9188
- /**
9189
- * @public
9190
- */
9191
- export declare interface TrackInfoLabel extends MetricLabel {
9192
- readonly mediaType: HespMediaType;
9193
- readonly switchingSetId: string;
9194
- readonly trackId: string;
9195
- }
9196
-
9197
8916
  /**
9198
8917
  * List of tracks.
9199
8918
  *
@@ -9278,13 +8997,6 @@ export declare interface TTMLCue extends TextTrackCue_2 {
9278
8997
  metadata: any;
9279
8998
  }
9280
8999
 
9281
- /**
9282
- * @public
9283
- */
9284
- export declare interface TypedMetric<T extends string> extends Metric {
9285
- labelData: TypeLabel<T>;
9286
- }
9287
-
9288
9000
  /**
9289
9001
  * Represents a media resource characterized by a URL to the resource and optionally information about the resource.
9290
9002
  *
@@ -9333,13 +9045,6 @@ export declare interface TypedSource extends BaseSource {
9333
9045
 
9334
9046
  }
9335
9047
 
9336
- /**
9337
- * @public
9338
- */
9339
- export declare interface TypeLabel<T extends string> extends MetricLabel {
9340
- type: T;
9341
- }
9342
-
9343
9048
  /**
9344
9049
  * Describes the UI configuration of the player.
9345
9050
  *
@@ -9536,13 +9241,6 @@ export declare interface UniversalAdId {
9536
9241
  adIdValue: string;
9537
9242
  }
9538
9243
 
9539
- /**
9540
- * @public
9541
- */
9542
- export declare interface UnlabeledMetric extends Metric {
9543
- readonly labelData: Exclude<{}, MetricLabel>;
9544
- }
9545
-
9546
9244
  /**
9547
9245
  * Fired when the quality updates.
9548
9246
  *