@vindral/web-sdk 4.1.1 → 4.1.2-10-g30d188ef

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/react.d.ts CHANGED
@@ -284,6 +284,20 @@ interface DrmOptions {
284
284
  * Query parameters to be added to requests to license servers
285
285
  */
286
286
  queryParams?: Record<string, string>;
287
+ /**
288
+ * Widevine options to override default behaviour
289
+ */
290
+ widevine?: {
291
+ videoRobustness?: string[];
292
+ audioRobustness?: string[];
293
+ };
294
+ /**
295
+ * Playready options to override default behaviour
296
+ */
297
+ playready?: {
298
+ videoRobustness?: string[];
299
+ audioRobustness?: string[];
300
+ };
287
301
  }
288
302
  type Media = "audio" | "video" | "audio+video";
289
303
  interface Options {
@@ -983,11 +997,20 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
983
997
  */
984
998
  get channelCurrentTime(): number;
985
999
  /**
986
- * The current target buffer time in milliseconds
1000
+ * The current target buffer time in milliseconds.
1001
+ *
1002
+ * Initially, this will always be equal to `minBufferTime`.
1003
+ * Only when using a separate `maxBufferTime`, the `targetBufferTime` will be able to vary between min and max.
1004
+ *
987
1005
  */
988
1006
  get targetBufferTime(): number;
989
1007
  /**
990
- * Set the current target buffer time in milliseconds
1008
+ * Set the current target buffer time in milliseconds.
1009
+ *
1010
+ * Note that setting this will not respect min/max buffer time values.
1011
+ * For instance with `{ minBufferTime: 500, maxBufferTime: 3000 }, you can still set `targetBufferTime` to 100 ms.`
1012
+ * The dynamic buffer will still work in respect to the originally set values when needed. Therefore we recommend
1013
+ * setting targetBufferTime within that range for consistancy if using both min/max.
991
1014
  */
992
1015
  set targetBufferTime(bufferTimeMs: number);
993
1016
  /**
@@ -1534,6 +1557,7 @@ declare class AirPlaySender extends Emitter<AirPlaySenderEvents> {
1534
1557
  private hlsUrl;
1535
1558
  private element;
1536
1559
  private connectingTimeout?;
1560
+ private castingAvailable;
1537
1561
  constructor(config: AirPlayConfig);
1538
1562
  /**
1539
1563
  * True if the instance is casting right now.
@@ -1545,8 +1569,9 @@ declare class AirPlaySender extends Emitter<AirPlaySenderEvents> {
1545
1569
  set channelId(channelId: string);
1546
1570
  /**
1547
1571
  * Update authentication token on an already established and authenticated connection.
1572
+ * Note: When casting to AirPlay, this will interrupt the current session to apply the new token.
1548
1573
  */
1549
- updateAuthenticationToken: (_token: string) => void;
1574
+ updateAuthenticationToken: (token: string) => void;
1550
1575
  /**
1551
1576
  * Fully unloads the instance. This disconnects the current listeners.
1552
1577
  */
@@ -1561,6 +1586,7 @@ declare class AirPlaySender extends Emitter<AirPlaySenderEvents> {
1561
1586
  static isAirPlaySupported(): boolean;
1562
1587
  private onAirPlayAvailable;
1563
1588
  private onAirPlayPlaybackChanged;
1589
+ private getHlsUrl;
1564
1590
  private checkHlsUrl;
1565
1591
  }
1566
1592
  type ControllerAttributes = (typeof Controller.observedAttributes)[number];
@@ -1592,6 +1618,10 @@ declare class Controller extends HTMLElement {
1592
1618
  "advanced",
1593
1619
  "drm-headers",
1594
1620
  "drm-queryparams",
1621
+ "drm-widevine-video-robustness",
1622
+ "drm-widevine-audio-robustness",
1623
+ "drm-playready-video-robustness",
1624
+ "drm-playready-audio-robustness",
1595
1625
  "webtransport-enabled",
1596
1626
  "reconnect-retries",
1597
1627
  "auto-instance-enabled",
@@ -1690,7 +1720,7 @@ declare class PlayButton extends VindralButton {
1690
1720
  type PlayerAttributes = (typeof Player.observedAttributes)[number];
1691
1721
  declare class Player extends HTMLElement {
1692
1722
  #private;
1693
- static observedAttributes: readonly ("title" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "user-interacting" | "is-casting" | "cast-available" | "cast-receiver-name" | "ui-locked" | "hide-ui-on-pause" | "is-fullscreen" | "is-fullscreen-fallback" | "rendition-levels" | "rendition-level" | "max-video-bit-rate" | "channel-id" | "channel-group-id" | "pip-available" | "is-pip" | "airplay-available" | "is-airplaying" | "media" | "languages" | "text-tracks" | "text-track" | "needs-user-input-video" | "needs-user-input-audio" | "authentication-token" | "volume-level" | "cast" | "airplay" | "pip" | "fullscreen" | "vu-meter" | "poster-src" | "url" | "offline" | "edge-url" | "target-buffer-time" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "min-buffer-time" | "max-buffer-time" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "ios-media-element-enabled" | "abr-enabled" | "size-based-resolution-cap-enabled" | "telemetry-enabled" | "video-codecs" | "drm-headers" | "drm-queryparams" | "webtransport-enabled" | "reconnect-retries" | "auto-instance-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
1723
+ static observedAttributes: readonly ("title" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "user-interacting" | "is-casting" | "cast-available" | "cast-receiver-name" | "ui-locked" | "hide-ui-on-pause" | "is-fullscreen" | "is-fullscreen-fallback" | "rendition-levels" | "rendition-level" | "max-video-bit-rate" | "channel-id" | "channel-group-id" | "pip-available" | "is-pip" | "airplay-available" | "is-airplaying" | "media" | "languages" | "text-tracks" | "text-track" | "needs-user-input-video" | "needs-user-input-audio" | "authentication-token" | "volume-level" | "cast" | "airplay" | "pip" | "fullscreen" | "vu-meter" | "poster-src" | "url" | "offline" | "edge-url" | "target-buffer-time" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "min-buffer-time" | "max-buffer-time" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "ios-media-element-enabled" | "abr-enabled" | "size-based-resolution-cap-enabled" | "telemetry-enabled" | "video-codecs" | "drm-headers" | "drm-queryparams" | "drm-widevine-video-robustness" | "drm-widevine-audio-robustness" | "drm-playready-video-robustness" | "drm-playready-audio-robustness" | "webtransport-enabled" | "reconnect-retries" | "auto-instance-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
1694
1724
  constructor();
1695
1725
  connectedCallback(): void;
1696
1726
  disconnectedCallback(): void;