@theoplayer/extended 3.6.0 → 4.0.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.3.0 (3.6.0)
5
+ * Version: 2022.3.2 (4.0.0)
6
6
  */
7
7
 
8
8
  /**
@@ -41,6 +41,15 @@ export declare interface ABRConfiguration {
41
41
  * @defaultValue `30`
42
42
  */
43
43
  bufferLookbackWindow?: number;
44
+ /**
45
+ * The maximum length of the player's buffer, in seconds.
46
+ *
47
+ * The player will initially buffer up to {@link ABRConfiguration.targetBuffer} seconds of media data.
48
+ * If the player detects that the decoder is unable to hold so much data,
49
+ * it will reduce `maxBufferLength` and restrict `targetBuffer` to be less than
50
+ * this maximum.
51
+ */
52
+ readonly maxBufferLength: number;
44
53
  }
45
54
 
46
55
  /**
@@ -435,6 +444,13 @@ export declare interface Ads extends EventDispatcher<AdsEventMap> {
435
444
  * @deprecated Superseded by {@link Ads.scheduledAdBreaks}.
436
445
  */
437
446
  readonly scheduledAds: Ad[];
447
+ /**
448
+ * The Google DAI API.
449
+ *
450
+ * @remarks
451
+ * <br/> - Only available with the feature `'google-dai'`.
452
+ */
453
+ readonly dai?: GoogleDAI;
438
454
  /**
439
455
  * Add an ad break request.
440
456
  *
@@ -3164,13 +3180,6 @@ export declare interface DRMConfiguration {
3164
3180
  preferredKeySystems?: Array<KeySystemId | string>;
3165
3181
  }
3166
3182
 
3167
- /**
3168
- * A function which processes DRM data.
3169
- *
3170
- * @public
3171
- */
3172
- export declare type DRMProcessor = (arrayBuffer: ArrayBuffer) => ArrayBuffer;
3173
-
3174
3183
  /**
3175
3184
  * Describes the configuration of the DRM Today DRM integration.
3176
3185
  *
@@ -3909,6 +3918,33 @@ export declare interface GlobalChromecast {
3909
3918
  endSession(): void;
3910
3919
  }
3911
3920
 
3921
+ /**
3922
+ * The Google DAI API.
3923
+ *
3924
+ * @remarks
3925
+ * <br/> - Available since v3.7.0.
3926
+ *
3927
+ * @public
3928
+ */
3929
+ export declare interface GoogleDAI {
3930
+ /**
3931
+ * Returns the content time without ads for a given stream time. Returns the given stream time for live streams.
3932
+ *
3933
+ * @param time - The stream time with inserted ads (in seconds).
3934
+ */
3935
+ contentTimeForStreamTime(time: number): number;
3936
+ /**
3937
+ * Returns the stream time with ads for a given content time. Returns the given content time for live streams.
3938
+ *
3939
+ * @param time - The content time without any ads (in seconds).
3940
+ */
3941
+ streamTimeForContentTime(time: number): number;
3942
+ /**
3943
+ * 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.
3944
+ */
3945
+ snapback: boolean;
3946
+ }
3947
+
3912
3948
  /**
3913
3949
  * Represents a configuration for server-side ad insertion with the Google DAI pre-integration.
3914
3950
  *
@@ -4367,7 +4403,7 @@ export declare interface HistogramTrackLabeledMetric extends Metric {
4367
4403
  export declare type HlsDiscontinuityAlignment = 'auto' | 'playlist' | 'media';
4368
4404
 
4369
4405
  /**
4370
- * Represents a configuration for controlling playback of an MPEG-DASH stream.
4406
+ * Represents a configuration for controlling playback of an HLS stream.
4371
4407
  *
4372
4408
  * @remarks
4373
4409
  * <br/> - Available since v2.82.0.
@@ -4381,6 +4417,19 @@ export declare interface HlsPlaybackConfiguration {
4381
4417
  * @defaultValue `'auto'`
4382
4418
  */
4383
4419
  discontinuityAlignment?: HlsDiscontinuityAlignment;
4420
+ /**
4421
+ * Whether this source should be played using the legacy HLS pipeline.
4422
+ *
4423
+ * <br/> - If set to `true`, always use the legacy HLS pipeline.
4424
+ * <br/> - If set to `false`, never use the legacy HLS pipeline.
4425
+ * <br/> - If set to `undefined` (default), use the modern HLS pipeline if available, otherwise fall back to the legacy HLS pipeline.
4426
+ *
4427
+ * @defaultValue `undefined`
4428
+ *
4429
+ * @remarks
4430
+ * <br/> - Available since v4.0.0.
4431
+ */
4432
+ useLegacy?: boolean;
4384
4433
  }
4385
4434
 
4386
4435
  /**
@@ -5377,30 +5426,6 @@ export declare interface KeySystemConfiguration {
5377
5426
  * The certificate for the key system. This can be either an ArrayBuffer or Uint8Array containing the raw certificate bytes or a base64-encoded variant of this.
5378
5427
  */
5379
5428
  certificate?: BufferSource_2 | string;
5380
- /**
5381
- * Process the certificate's request.
5382
- *
5383
- * @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onCertificateRequest} instead.
5384
- */
5385
- certificateRequestProcessor?: DRMProcessor;
5386
- /**
5387
- * Process the certificate's response.
5388
- *
5389
- * @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onCertificateResponse} instead.
5390
- */
5391
- certificateResponseProcessor?: DRMProcessor;
5392
- /**
5393
- * Process the license's request.
5394
- *
5395
- * @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onLicenseRequest} instead.
5396
- */
5397
- licenseRequestProcessor?: DRMProcessor;
5398
- /**
5399
- * Process the license's response.
5400
- *
5401
- * @deprecated Please use {@link registerContentProtectionIntegration} and {@link ContentProtectionIntegration.onLicenseResponse} instead.
5402
- */
5403
- licenseResponseProcessor?: DRMProcessor;
5404
5429
  }
5405
5430
 
5406
5431
  /**