@vindral/web-sdk 4.5.0 → 4.5.1-10-g5556eb794

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.5.0",
2
+ "version": "4.5.1-10-g5556eb794",
3
3
  "name": "@vindral/web-sdk",
4
4
  "main": "./legacy.umd.js",
5
5
  "module": "./legacy.es.js",
package/player.d.ts CHANGED
@@ -253,11 +253,20 @@ interface Options {
253
253
  */
254
254
  mseOpusEnabled?: boolean;
255
255
  /**
256
- * Enable or disable support for playing audio in the background for iOS devices.
256
+ * Keep playback running while the page is in the background. Enabled by default.
257
+ * When disabled, the session disconnects while hidden and reconnects when visible.
257
258
  *
258
- * Is false (disabled) by default.
259
+ * Browser media policies still apply; iOS Safari pauses hidden video regardless.
260
+ * Call `play()` again from a user gesture or media-control action to resume.
259
261
  *
260
- * Note: This may be enabled by default in a future (major) release
262
+ * When enabled, hidden sessions that are muted outside Picture-in-Picture or browser-paused
263
+ * are disconnected after the inactivity timeout; an explicit `pause()` disconnects at once.
264
+ */
265
+ backgroundPlayEnabled?: boolean;
266
+ /**
267
+ * @deprecated Use `backgroundPlayEnabled` instead.
268
+ *
269
+ * Legacy alias kept for backwards compatibility.
261
270
  */
262
271
  iosBackgroundPlayEnabled?: boolean;
263
272
  /**
@@ -1015,8 +1024,8 @@ type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["getUserAge
1015
1024
  declare class Vindral extends Emitter<PublicVindralEvents> {
1016
1025
  #private;
1017
1026
  private static MAX_POOL_SIZE;
1018
- private static DISCONNECT_TIMEOUT;
1019
1027
  private static REMOVE_CUE_THRESHOLD;
1028
+ private static BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT;
1020
1029
  /**
1021
1030
  * Picture in picture
1022
1031
  */
@@ -1059,6 +1068,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1059
1068
  private offscreenCanvasElement?;
1060
1069
  private webCodecsRenditionSupport;
1061
1070
  private hasCalledConnect;
1071
+ private isUserPaused;
1062
1072
  private latestEmittedLanguages;
1063
1073
  private wakeLock;
1064
1074
  private pool;
@@ -1073,7 +1083,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1073
1083
  private readonly unextractableSamplesWarned;
1074
1084
  private sizes;
1075
1085
  private isSuspended;
1076
- private disconnectTimeout;
1086
+ private inactivityDisconnectInterval;
1077
1087
  private offscreenSubtitleInterval?;
1078
1088
  constructor(options: Options);
1079
1089
  /**
@@ -1436,8 +1446,14 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1436
1446
  */
1437
1447
  getStatistics: () => Statistics;
1438
1448
  private resetModules;
1449
+ private disconnectForInactivePage;
1450
+ private scheduleInactivityDisconnect;
1451
+ private clearInactivityDisconnect;
1452
+ private isHiddenWithBackgroundPlayback;
1453
+ private isHiddenWithBackgroundPlayDisabled;
1439
1454
  private suspend;
1440
1455
  private unsuspend;
1456
+ private resumeModules;
1441
1457
  private getRuntimeInfo;
1442
1458
  private getPlaybackBufferState;
1443
1459
  private onMediaElementBufferState;
@@ -1461,6 +1477,8 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1461
1477
  * is the optimal rendering path for WebCodecs (worker renders VideoFrames directly).
1462
1478
  */
1463
1479
  private shouldUseOffscreenCanvas;
1480
+ private isBackgroundPlayEnabled;
1481
+ private shouldAllowBackgroundPlayback;
1464
1482
  }
1465
1483
  interface TelemetryModuleStatistics {
1466
1484
  /**
@@ -1613,7 +1631,8 @@ interface PublicVindralEvents {
1613
1631
  * Is emitted during connection whether the channel is live or not.
1614
1632
  *
1615
1633
  * If the channel is not live, the Vindral instance will try to reconnect until the `reconnectHandler`
1616
- * determines that no more retries should be made.
1634
+ * determines that no more retries should be made. Each attempt also emits a non-fatal `error` with
1635
+ * the code `channel_not_live`.
1617
1636
  *
1618
1637
  * Note: If the web-sdk is instantiated at the same time as you are starting the stream it is possible
1619
1638
  * that this emits false until the started state has propagated through the system.
@@ -1916,6 +1935,7 @@ export declare class Controller extends HTMLElement {
1916
1935
  "burst-enabled",
1917
1936
  "mse-enabled",
1918
1937
  "mse-opus-enabled",
1938
+ "background-play-enabled",
1919
1939
  "ios-background-play-enabled",
1920
1940
  "ios-wake-lock-enabled",
1921
1941
  "stream-to-media-element-enabled",
@@ -2033,7 +2053,7 @@ export declare class PlayButton extends VindralButton {
2033
2053
  */
2034
2054
  export declare class Player extends HTMLElement {
2035
2055
  #private;
2036
- static observedAttributes: readonly ("title" | "offline" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "duration" | "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" | "max-initial-bit-rate" | "abr-enabled" | "size-based-resolution-cap-enabled" | "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" | "double-click-fullscreen" | "vu-meter" | "timeshift" | "timeshift-position" | "timeline-markers" | "poster-src" | "debug-panel-open" | "target-buffer-time" | "drift" | "playback-latency" | "connection-state" | "url" | "decoders" | "min-buffer-time" | "max-buffer-time" | "edge-url" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "stream-to-media-element-enabled" | "ios-media-element-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" | "webcodecs-hardware-acceleration" | "offscreen-canvas-enabled" | "reconnect-retries" | "auto-instance-enabled" | "advanced-rendition-menu-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
2056
+ static observedAttributes: readonly ("title" | "offline" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "duration" | "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" | "max-initial-bit-rate" | "abr-enabled" | "size-based-resolution-cap-enabled" | "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" | "double-click-fullscreen" | "vu-meter" | "timeshift" | "timeshift-position" | "timeline-markers" | "poster-src" | "debug-panel-open" | "target-buffer-time" | "drift" | "playback-latency" | "connection-state" | "url" | "decoders" | "min-buffer-time" | "max-buffer-time" | "edge-url" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "background-play-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "stream-to-media-element-enabled" | "ios-media-element-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" | "webcodecs-hardware-acceleration" | "offscreen-canvas-enabled" | "reconnect-retries" | "auto-instance-enabled" | "advanced-rendition-menu-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
2037
2057
  constructor();
2038
2058
  connectedCallback(): void;
2039
2059
  disconnectedCallback(): void;
package/player.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./C2-H3s2r.js";
2
- import "./zRKuZnIT.js";
3
- import { t } from "./C02TEUyE.js";
1
+ import { t as e } from "./DbdwBdhd.js";
2
+ import "./D25qKlGC.js";
3
+ import { t } from "./CeMkNC0l.js";
4
4
  export { t as registerComponents, e as registerDebugComponents };
package/react.d.ts CHANGED
@@ -255,11 +255,20 @@ interface Options {
255
255
  */
256
256
  mseOpusEnabled?: boolean;
257
257
  /**
258
- * Enable or disable support for playing audio in the background for iOS devices.
258
+ * Keep playback running while the page is in the background. Enabled by default.
259
+ * When disabled, the session disconnects while hidden and reconnects when visible.
259
260
  *
260
- * Is false (disabled) by default.
261
+ * Browser media policies still apply; iOS Safari pauses hidden video regardless.
262
+ * Call `play()` again from a user gesture or media-control action to resume.
261
263
  *
262
- * Note: This may be enabled by default in a future (major) release
264
+ * When enabled, hidden sessions that are muted outside Picture-in-Picture or browser-paused
265
+ * are disconnected after the inactivity timeout; an explicit `pause()` disconnects at once.
266
+ */
267
+ backgroundPlayEnabled?: boolean;
268
+ /**
269
+ * @deprecated Use `backgroundPlayEnabled` instead.
270
+ *
271
+ * Legacy alias kept for backwards compatibility.
263
272
  */
264
273
  iosBackgroundPlayEnabled?: boolean;
265
274
  /**
@@ -1017,8 +1026,8 @@ type Statistics = ModuleStatistics & ReturnType<UserAgentInformation["getUserAge
1017
1026
  declare class Vindral extends Emitter<PublicVindralEvents> {
1018
1027
  #private;
1019
1028
  private static MAX_POOL_SIZE;
1020
- private static DISCONNECT_TIMEOUT;
1021
1029
  private static REMOVE_CUE_THRESHOLD;
1030
+ private static BACKGROUND_INACTIVITY_DISCONNECT_TIMEOUT;
1022
1031
  /**
1023
1032
  * Picture in picture
1024
1033
  */
@@ -1061,6 +1070,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1061
1070
  private offscreenCanvasElement?;
1062
1071
  private webCodecsRenditionSupport;
1063
1072
  private hasCalledConnect;
1073
+ private isUserPaused;
1064
1074
  private latestEmittedLanguages;
1065
1075
  private wakeLock;
1066
1076
  private pool;
@@ -1075,7 +1085,7 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1075
1085
  private readonly unextractableSamplesWarned;
1076
1086
  private sizes;
1077
1087
  private isSuspended;
1078
- private disconnectTimeout;
1088
+ private inactivityDisconnectInterval;
1079
1089
  private offscreenSubtitleInterval?;
1080
1090
  constructor(options: Options);
1081
1091
  /**
@@ -1438,8 +1448,14 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1438
1448
  */
1439
1449
  getStatistics: () => Statistics;
1440
1450
  private resetModules;
1451
+ private disconnectForInactivePage;
1452
+ private scheduleInactivityDisconnect;
1453
+ private clearInactivityDisconnect;
1454
+ private isHiddenWithBackgroundPlayback;
1455
+ private isHiddenWithBackgroundPlayDisabled;
1441
1456
  private suspend;
1442
1457
  private unsuspend;
1458
+ private resumeModules;
1443
1459
  private getRuntimeInfo;
1444
1460
  private getPlaybackBufferState;
1445
1461
  private onMediaElementBufferState;
@@ -1463,6 +1479,8 @@ declare class Vindral extends Emitter<PublicVindralEvents> {
1463
1479
  * is the optimal rendering path for WebCodecs (worker renders VideoFrames directly).
1464
1480
  */
1465
1481
  private shouldUseOffscreenCanvas;
1482
+ private isBackgroundPlayEnabled;
1483
+ private shouldAllowBackgroundPlayback;
1466
1484
  }
1467
1485
  interface TelemetryModuleStatistics {
1468
1486
  /**
@@ -1615,7 +1633,8 @@ interface PublicVindralEvents {
1615
1633
  * Is emitted during connection whether the channel is live or not.
1616
1634
  *
1617
1635
  * If the channel is not live, the Vindral instance will try to reconnect until the `reconnectHandler`
1618
- * determines that no more retries should be made.
1636
+ * determines that no more retries should be made. Each attempt also emits a non-fatal `error` with
1637
+ * the code `channel_not_live`.
1619
1638
  *
1620
1639
  * Note: If the web-sdk is instantiated at the same time as you are starting the stream it is possible
1621
1640
  * that this emits false until the started state has propagated through the system.
@@ -1925,6 +1944,7 @@ declare class Controller extends HTMLElement {
1925
1944
  "burst-enabled",
1926
1945
  "mse-enabled",
1927
1946
  "mse-opus-enabled",
1947
+ "background-play-enabled",
1928
1948
  "ios-background-play-enabled",
1929
1949
  "ios-wake-lock-enabled",
1930
1950
  "stream-to-media-element-enabled",
@@ -2043,7 +2063,7 @@ declare class PlayButton extends VindralButton {
2043
2063
  type PlayerAttributes = (typeof Player.observedAttributes)[number];
2044
2064
  declare class Player extends HTMLElement {
2045
2065
  #private;
2046
- static observedAttributes: readonly ("title" | "offline" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "duration" | "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" | "max-initial-bit-rate" | "abr-enabled" | "size-based-resolution-cap-enabled" | "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" | "double-click-fullscreen" | "vu-meter" | "timeshift" | "timeshift-position" | "timeline-markers" | "poster-src" | "debug-panel-open" | "target-buffer-time" | "drift" | "playback-latency" | "connection-state" | "url" | "decoders" | "min-buffer-time" | "max-buffer-time" | "edge-url" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "stream-to-media-element-enabled" | "ios-media-element-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" | "webcodecs-hardware-acceleration" | "offscreen-canvas-enabled" | "reconnect-retries" | "auto-instance-enabled" | "advanced-rendition-menu-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
2066
+ static observedAttributes: readonly ("title" | "offline" | "advanced" | "poster" | "language" | "channels" | "buffering" | "paused" | "volume" | "muted" | "duration" | "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" | "max-initial-bit-rate" | "abr-enabled" | "size-based-resolution-cap-enabled" | "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" | "double-click-fullscreen" | "vu-meter" | "timeshift" | "timeshift-position" | "timeline-markers" | "poster-src" | "debug-panel-open" | "target-buffer-time" | "drift" | "playback-latency" | "connection-state" | "url" | "decoders" | "min-buffer-time" | "max-buffer-time" | "edge-url" | "cast-receiver-id" | "cast-background" | "log-level" | "max-size" | "max-audio-bit-rate" | "burst-enabled" | "mse-enabled" | "mse-opus-enabled" | "background-play-enabled" | "ios-background-play-enabled" | "ios-wake-lock-enabled" | "stream-to-media-element-enabled" | "ios-media-element-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" | "webcodecs-hardware-acceleration" | "offscreen-canvas-enabled" | "reconnect-retries" | "auto-instance-enabled" | "advanced-rendition-menu-enabled" | "refresh-poster-enabled" | "stream-poll-enabled")[];
2047
2067
  constructor();
2048
2068
  connectedCallback(): void;
2049
2069
  disconnectedCallback(): void;
@@ -1,5 +1,5 @@
1
- import "./zRKuZnIT.js";
2
- import { t as e } from "./C02TEUyE.js";
1
+ import "./D25qKlGC.js";
2
+ import { t as e } from "./CeMkNC0l.js";
3
3
  //#region src/vindral-player-component.ts
4
4
  e();
5
5
  //#endregion
@@ -1,40 +1,39 @@
1
1
  import { n as e, t } from "./BsfwXDui.js";
2
- import { t as n } from "./FYiEDBC4.js";
2
+ import { n, r } from "./B1PhBNUa.js";
3
3
  //#region ../../libs/cast-sender/src/CastSender.ts
4
- var r = class extends n {
5
- constructor(n) {
6
- var r;
7
- super(), r = this, e(this, "state", "not casting"), e(this, "config", void 0), e(this, "unloaded", !1), e(this, "updateAuthenticationToken", (e) => {
4
+ var i = 1e4, a = "CastSender was unloaded before the Google Cast SDK finished initializing", o = class extends r {
5
+ constructor(r) {
6
+ var o;
7
+ super(), o = this, e(this, "state", "not casting"), e(this, "config", void 0), e(this, "unloaded", !1), e(this, "logger", n.get().createContext("CastSender")), e(this, "devicesAvailable", void 0), e(this, "updateAuthenticationToken", (e) => {
8
8
  this.config && (this.config.options.authenticationToken = e, this.send({
9
9
  type: "updateAuthToken",
10
10
  token: e
11
11
  }));
12
12
  }), e(this, "unload", () => {
13
13
  var e;
14
- this.unloaded = !0, (e = this.getSession()) == null || e.removeMessageListener("urn:x-cast:com.vindral.castdata", this.onMessage);
14
+ this.unloaded = !0, (e = this.getSession()) == null || e.removeMessageListener("urn:x-cast:com.vindral.castdata", this.onMessage), this.devicesAvailable && this.emit("devices available", !1), this.devicesAvailable = void 0;
15
15
  }), e(this, "init", t(function* () {
16
16
  return new Promise((e, t) => {
17
- let n = !1, i = setTimeout(() => {
18
- n = !0, t();
19
- }, 1e4);
20
- window.__onGCastApiAvailable = (a) => {
21
- if (n) {
22
- n = !1;
23
- return;
24
- }
25
- if (clearTimeout(i), !a) return t();
17
+ let n = !1, r = setTimeout(() => {
18
+ n = !0, t(/* @__PURE__ */ Error(`Timed out after ${i} ms waiting for the Google Cast SDK`));
19
+ }, i);
20
+ window.__onGCastApiAvailable = (i) => {
21
+ if (clearTimeout(r), o.unloaded) return t(Error(a));
22
+ if (!i) return t(/* @__PURE__ */ Error("The Google Cast SDK reported the Cast API as unavailable"));
26
23
  setTimeout(() => {
24
+ if (o.unloaded) return t(Error(a));
27
25
  try {
28
- r.onGCastApiAvailable(), e();
26
+ o.onGCastApiAvailable(), e();
29
27
  } catch (e) {
30
- t();
28
+ let r = e instanceof Error ? e : Error(String(e));
29
+ n && o.logger.warn("Late Google Cast SDK initialization failed", r), t(r);
31
30
  }
32
31
  }, 1e3);
33
- }, r.castLibrariesAdded() && window.cast ? window.__onGCastApiAvailable(!0) : r.verifyCastLibraries();
32
+ }, o.castLibrariesAdded() && window.cast ? window.__onGCastApiAvailable(!0) : o.verifyCastLibraries();
34
33
  });
35
34
  })), e(this, "start", t(function* () {
36
35
  var e;
37
- yield (e = r.getInstance()) == null ? void 0 : e.requestSession();
36
+ yield (e = o.getInstance()) == null ? void 0 : e.requestSession();
38
37
  })), e(this, "stop", () => {
39
38
  var e;
40
39
  (e = this.getSession()) == null || e.endSession(!0);
@@ -50,7 +49,7 @@ var r = class extends n {
50
49
  receiverApplicationId: r,
51
50
  autoJoinPolicy: chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED,
52
51
  resumeSavedSession: !0
53
- }), t.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED, this.onSessionStateChanged), n === cast.framework.SessionState.SESSION_STARTED && setTimeout(() => {
52
+ }), t.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED, this.onSessionStateChanged), t.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED, this.onCastStateChanged), this.updateDevicesAvailable(t.getCastState()), n === cast.framework.SessionState.SESSION_STARTED && setTimeout(() => {
54
53
  this.state = "casting", this.emit("resumed");
55
54
  });
56
55
  }), e(this, "send", (e) => {
@@ -75,6 +74,11 @@ var r = class extends n {
75
74
  type: "start",
76
75
  config: this.config
77
76
  });
77
+ }), e(this, "onCastStateChanged", (e) => {
78
+ this.unloaded || this.updateDevicesAvailable(e.castState);
79
+ }), e(this, "updateDevicesAvailable", (e) => {
80
+ let t = e !== cast.framework.CastState.NO_DEVICES_AVAILABLE;
81
+ t !== this.devicesAvailable && (this.devicesAvailable = t, this.emit("devices available", t));
78
82
  }), e(this, "onSessionStateChanged", (e) => {
79
83
  if (!this.unloaded) switch (e.sessionState) {
80
84
  case cast.framework.SessionState.SESSION_START_FAILED:
@@ -105,7 +109,7 @@ var r = class extends n {
105
109
  e.type = "text/javascript", e.id = "vindralCastFrameworkLib", e.src = "//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js", document.head.appendChild(e);
106
110
  let t = document.createElement("script");
107
111
  t.type = "text/javascript", t.id = "vindralCastSenderLib", t.src = "//www.gstatic.com/cv/js/sender/v1/cast_sender.js", document.head.appendChild(t);
108
- }), this.config = n;
112
+ }), this.config = r;
109
113
  }
110
114
  get casting() {
111
115
  return this.state === "casting";
@@ -140,4 +144,4 @@ var r = class extends n {
140
144
  }
141
145
  };
142
146
  //#endregion
143
- export { r as t };
147
+ export { o as t };
package/C01DcfYu.js DELETED
@@ -1,118 +0,0 @@
1
- import { n as e } from "./BsfwXDui.js";
2
- import { t } from "./RxoWWyzp.js";
3
- //#region ../../libs/utils/src/noop.ts
4
- var n = () => {}, r = "connection_failed", i = "connection_failed_will_not_attempt_again", a = "authentication_error", o = "authentication_expired", s = "channel_not_found", c = "no_incoming_data_error", l = "connection_inactivity", u = "missing_init_segment", d = "no_track_context", f = "invalid_track_context_state", p = "disconnected_by_edge", m = "decoder_error", h = "audio_player_error", g = "unsupported_audio_codec", _ = "media_source_error", v = "webgl_context_lost_error", y = "access_forbidden", b = "channel_switch_failed", x = "drm_error", S = class extends Error {
5
- constructor(n, r, i = {}) {
6
- super(n), e(this, "props", void 0), e(this, "extra", {}), e(this, "code", () => this.props.code), e(this, "isFatal", () => this.props.isFatal), e(this, "source", () => this.props.source), e(this, "type", () => {
7
- var e;
8
- return (e = this.props.type) == null ? "external" : e;
9
- }), e(this, "toStringifiable", () => {
10
- var e;
11
- let n = this.source(), r = n instanceof Error ? n.stack : this.stack;
12
- return t(t({}, this.extra), {}, {
13
- code: this.props.code,
14
- isFatal: this.props.isFatal,
15
- type: this.props.type,
16
- message: this.message,
17
- sourceMessage: (e = this.source()) == null ? void 0 : e.message,
18
- stack: r
19
- });
20
- }), this.props = r, this.extra = i, Object.setPrototypeOf(this, new.target.prototype);
21
- }
22
- }, C = (e, t) => new S("MediaElement Error", {
23
- isFatal: e,
24
- code: "media_element_error",
25
- source: t
26
- }, { mediaErrorCode: t.code }), w = (e, t) => new S("Decoder Error", {
27
- isFatal: e,
28
- code: m,
29
- source: t,
30
- type: "internal"
31
- }), T = (e, t, n) => new S(`No decoder available for audio codec "${e}" in non-MSE playback. ${t}`, {
32
- isFatal: !0,
33
- code: g,
34
- source: n,
35
- type: "external"
36
- }, {
37
- codec: e,
38
- reason: t
39
- }), E = (e, t) => new S("Audio Player Error", {
40
- isFatal: e,
41
- code: h,
42
- source: t,
43
- type: "internal"
44
- }), D = (e, t) => new S(`No init segment for rendition id ${e} for channel ${t}`, {
45
- isFatal: !1,
46
- code: u,
47
- type: "internal"
48
- }), O = (e, t, n, r) => new S("MediaSource Error", {
49
- isFatal: e,
50
- code: _,
51
- source: t,
52
- type: "internal"
53
- }, {
54
- type: r,
55
- consecutiveErrorsCount: n
56
- }), k = (e, t) => new S(`No track context for ${e}${t ? `, rendition id ${t}` : ""}`, {
57
- isFatal: !1,
58
- code: d,
59
- type: "internal"
60
- }), A = (e, t) => new S(`Track context is in an invalid state for ${e}${t ? `, rendition id ${t}` : ""}`, {
61
- isFatal: !1,
62
- code: f,
63
- type: "internal"
64
- }), j = () => new S("Web Audio Context resume timeout", {
65
- isFatal: !1,
66
- code: "web_audio_context_resume_timeout"
67
- }), M = (e) => new S("Disconnected From Edge Server", {
68
- type: "external",
69
- source: e,
70
- isFatal: !1,
71
- code: p
72
- }), N = (e) => new S("Authentication Failed", {
73
- isFatal: !0,
74
- code: a,
75
- source: e
76
- }), P = (e) => new S("Authentication Expired", {
77
- isFatal: !0,
78
- code: o,
79
- source: e
80
- }), F = (e, t) => new S("Connection closed due to inactivity", {
81
- isFatal: !1,
82
- code: l,
83
- source: t,
84
- type: e
85
- }), I = (e, t) => new S("Channel not found", {
86
- isFatal: !1,
87
- code: s,
88
- source: t,
89
- type: e
90
- }), L = (e) => new S("No Incoming Data", {
91
- isFatal: !1,
92
- code: c,
93
- source: e
94
- }), R = (e) => new S("Connection attempt failed", {
95
- isFatal: !1,
96
- code: r,
97
- source: e
98
- }), z = () => new S("Connection failed - no more reconnect attempts", {
99
- isFatal: !0,
100
- code: i
101
- }), B = (e) => new S("WebGL Context Lost", {
102
- isFatal: !1,
103
- code: v,
104
- source: e,
105
- type: "internal"
106
- }), V = (e) => new S(e, {
107
- isFatal: !0,
108
- code: y
109
- }), H = (e) => new S(`Channel switch to '${e}' failed`, {
110
- isFatal: !1,
111
- code: b
112
- }), U = (e, t = !1, n) => new S(e, {
113
- isFatal: t,
114
- code: x,
115
- source: n
116
- });
117
- //#endregion
118
- export { T as A, C, k as D, L as E, n as M, z as O, A as S, D as T, H as _, i as a, U as b, l as c, V as d, j as f, I as g, P as h, s as i, B as j, R as k, c as l, N as m, o as n, r as o, E as p, a as r, p as s, y as t, S as u, w as v, O as w, F as x, M as y };
package/FYiEDBC4.js DELETED
@@ -1,50 +0,0 @@
1
- import { n as e } from "./BsfwXDui.js";
2
- //#region ../../libs/utils/src/Emitter.ts
3
- var t = class {
4
- constructor() {
5
- e(this, "listeners", {});
6
- }
7
- emit(e, t) {
8
- let n = this.listeners[e];
9
- if (n) {
10
- let r = !1;
11
- for (let e = 0; e < n.length; e++) if (n[e].once) {
12
- r = !0;
13
- break;
14
- }
15
- r && (this.listeners[e] = n.filter((e) => !e.once));
16
- let i, a = n.length;
17
- for (let e = 0; e < a; e++) {
18
- let r = n[e].fn(t);
19
- typeof r == "function" && (i || (i = []), i.push(r));
20
- }
21
- if (i) for (let e = 0; e < i.length; e++) i[e]();
22
- }
23
- }
24
- off(e, t) {
25
- let n = this.listeners[e];
26
- n && (this.listeners[e] = n.filter((e) => e.fn !== t));
27
- }
28
- on(e, t) {
29
- this.add(e, t, !1);
30
- }
31
- once(e, t) {
32
- this.add(e, t, !0);
33
- }
34
- hasListeners(e) {
35
- let t = this.listeners[e];
36
- return t !== void 0 && t.length > 0;
37
- }
38
- reset() {
39
- this.listeners = {};
40
- }
41
- add(e, t, n) {
42
- let r = this.listeners[e], i = {
43
- fn: t,
44
- once: n
45
- };
46
- r ? r.push(i) : this.listeners[e] = [i];
47
- }
48
- };
49
- //#endregion
50
- export { t };
File without changes
File without changes
File without changes