streamit-player 1.0.0 → 1.0.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/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.1] - 2026-09-12
11
+
12
+ ### Fixed
13
+
14
+ - Seeking back into the DVR window of a live DASH stream now stays at the chosen position. Before,
15
+ dash.js kept loading segments near the live edge and moved the playhead back there.
16
+ - Live catch-up on low-latency DASH streams now reacts only to the viewer's own seeks, "go to live"
17
+ and resuming playback, not to seeks dash.js makes internally.
18
+
10
19
  ## [1.0.0] - 2026-09-11
11
20
 
12
21
  Initial public release of `streamit-player`.
@@ -31,5 +40,6 @@ Initial public release of `streamit-player`.
31
40
  - ES module and CommonJS builds with TypeScript declarations, and standalone CDN bundles
32
41
  (`streamit-player.esm.min.js` and the `window.StreamitPlayer` IIFE build).
33
42
 
34
- [Unreleased]: https://github.com/iqonicdesignofficial/streamit-player/compare/v1.0.0...HEAD
43
+ [Unreleased]: https://github.com/iqonicdesignofficial/streamit-player/compare/v1.0.1...HEAD
44
+ [1.0.1]: https://github.com/iqonicdesignofficial/streamit-player/releases/tag/v1.0.1
35
45
  [1.0.0]: https://github.com/iqonicdesignofficial/streamit-player/releases/tag/v1.0.0
@@ -1,6 +1,6 @@
1
1
  import { css, html, LitElement, nothing } from "lit";
2
2
  import { property, state, query } from "lit/decorators.js";
3
- import { T as TimelineMath, u as formatTime, P as PlayerController } from "./PlayerController-CW0pxrIt.js";
3
+ import { T as TimelineMath, u as formatTime, P as PlayerController } from "./PlayerController-D68pc3mj.js";
4
4
  const styles$6 = css`
5
5
  :host {
6
6
  display: block;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const lit = require("lit");
3
3
  const decorators_js = require("lit/decorators.js");
4
- const PlayerController = require("./PlayerController-Bt7Po42U.cjs");
4
+ const PlayerController = require("./PlayerController-BaQ27TT9.cjs");
5
5
  const styles$6 = lit.css`
6
6
  :host {
7
7
  display: block;
@@ -2250,7 +2250,7 @@ class HlsHandler {
2250
2250
  if (this.hls) {
2251
2251
  this.isAutoMode = index === 0;
2252
2252
  const levelIndex = index - 1;
2253
- this.hls.currentLevel = levelIndex;
2253
+ this.hls.nextLevel = levelIndex;
2254
2254
  if (levelIndex === -1) {
2255
2255
  this.lastLevelIndex = -1;
2256
2256
  } else {
@@ -2310,17 +2310,12 @@ class DashHandler {
2310
2310
  } catch {
2311
2311
  }
2312
2312
  };
2313
- this.handleLivePositionChange = () => {
2314
- var _a;
2315
- if (!this.player || !this.video) return;
2316
- try {
2317
- if (!this.player.isDynamic()) return;
2318
- const target = (_a = this.getRawLiveInfo()) == null ? void 0 : _a.liveEdgeTarget;
2319
- if (target == null || this.video.currentTime <= 0) return;
2320
- this.followingLive = target - this.video.currentTime <= LOW_LATENCY_LIVE_EDGE_SECONDS;
2321
- this.syncLiveCatchup();
2322
- } catch {
2323
- }
2313
+ this.handleResume = () => {
2314
+ if (this.video) this.recordViewerPosition(this.video.currentTime);
2315
+ };
2316
+ this.handleLiveEdgeSync = () => {
2317
+ this.followingLive = true;
2318
+ this.syncLiveCatchup();
2324
2319
  };
2325
2320
  this.handleTrackChangeRendered = (e) => {
2326
2321
  if (!this.player || !this.controller) return;
@@ -2618,6 +2613,22 @@ class DashHandler {
2618
2613
  }
2619
2614
  }
2620
2615
  }
2616
+ /**
2617
+ * Records whether the viewer is following the live edge, given a position they chose.
2618
+ * Only viewer actions call this: seeks made by dash.js itself must not count.
2619
+ */
2620
+ recordViewerPosition(position) {
2621
+ var _a;
2622
+ if (!this.player) return;
2623
+ try {
2624
+ if (!this.player.isDynamic()) return;
2625
+ const target = (_a = this.getRawLiveInfo()) == null ? void 0 : _a.liveEdgeTarget;
2626
+ if (target == null || position <= 0) return;
2627
+ this.followingLive = target - position <= LOW_LATENCY_LIVE_EDGE_SECONDS;
2628
+ this.syncLiveCatchup();
2629
+ } catch {
2630
+ }
2631
+ }
2621
2632
  normalizeQualityIndex(value) {
2622
2633
  return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : -1;
2623
2634
  }
@@ -2648,9 +2659,9 @@ class DashHandler {
2648
2659
  this.dashRetryCount = 0;
2649
2660
  this.followingLive = true;
2650
2661
  this.catchupEnabled = null;
2651
- video.addEventListener("seeking", this.handleLivePositionChange);
2652
- video.addEventListener("play", this.handleLivePositionChange);
2662
+ video.addEventListener("play", this.handleResume);
2653
2663
  video.addEventListener("timeupdate", this.syncLiveCatchup);
2664
+ controller.addEventListener("live-edge-sync", this.handleLiveEdgeSync);
2654
2665
  loadDashjs().then((dashjsModule) => {
2655
2666
  var _a;
2656
2667
  if (this.controller !== controller) {
@@ -3004,11 +3015,12 @@ class DashHandler {
3004
3015
  this.controller.updateStatePublic({ activeQuality });
3005
3016
  }
3006
3017
  destroy() {
3018
+ var _a;
3007
3019
  if (this.video) {
3008
- this.video.removeEventListener("seeking", this.handleLivePositionChange);
3009
- this.video.removeEventListener("play", this.handleLivePositionChange);
3020
+ this.video.removeEventListener("play", this.handleResume);
3010
3021
  this.video.removeEventListener("timeupdate", this.syncLiveCatchup);
3011
3022
  }
3023
+ (_a = this.controller) == null ? void 0 : _a.removeEventListener("live-edge-sync", this.handleLiveEdgeSync);
3012
3024
  if (this.player) {
3013
3025
  try {
3014
3026
  if (this.eventNames.trackChangeRendered)
@@ -3044,8 +3056,16 @@ class DashHandler {
3044
3056
  this.videoRepresentations = [];
3045
3057
  this.uniqueAudioTracks = [];
3046
3058
  }
3047
- seek(_time) {
3048
- return false;
3059
+ seek(time) {
3060
+ this.recordViewerPosition(time);
3061
+ if (!this.player) return false;
3062
+ try {
3063
+ if (!this.player.isDynamic()) return false;
3064
+ this.player.seekToPresentationTime(time);
3065
+ return true;
3066
+ } catch {
3067
+ return false;
3068
+ }
3049
3069
  }
3050
3070
  setQuality(index) {
3051
3071
  if (this.player) {
@@ -3074,7 +3094,7 @@ class DashHandler {
3074
3094
  if (playerWithABR.setRepresentationForTypeById) {
3075
3095
  playerWithABR.setRepresentationForTypeById("video", targetRep.id);
3076
3096
  } else if (playerWithABR.setQualityFor) {
3077
- playerWithABR.setQualityFor("video", levelIndex, true);
3097
+ playerWithABR.setQualityFor("video", levelIndex, false);
3078
3098
  }
3079
3099
  this.lastQualityIndex = levelIndex;
3080
3100
  }
@@ -2227,7 +2227,7 @@ class HlsHandler {
2227
2227
  if (this.hls) {
2228
2228
  this.isAutoMode = index === 0;
2229
2229
  const levelIndex = index - 1;
2230
- this.hls.currentLevel = levelIndex;
2230
+ this.hls.nextLevel = levelIndex;
2231
2231
  if (levelIndex === -1) {
2232
2232
  this.lastLevelIndex = -1;
2233
2233
  } else {
@@ -2287,17 +2287,12 @@ class DashHandler {
2287
2287
  } catch {
2288
2288
  }
2289
2289
  };
2290
- this.handleLivePositionChange = () => {
2291
- var _a;
2292
- if (!this.player || !this.video) return;
2293
- try {
2294
- if (!this.player.isDynamic()) return;
2295
- const target = (_a = this.getRawLiveInfo()) == null ? void 0 : _a.liveEdgeTarget;
2296
- if (target == null || this.video.currentTime <= 0) return;
2297
- this.followingLive = target - this.video.currentTime <= LOW_LATENCY_LIVE_EDGE_SECONDS;
2298
- this.syncLiveCatchup();
2299
- } catch {
2300
- }
2290
+ this.handleResume = () => {
2291
+ if (this.video) this.recordViewerPosition(this.video.currentTime);
2292
+ };
2293
+ this.handleLiveEdgeSync = () => {
2294
+ this.followingLive = true;
2295
+ this.syncLiveCatchup();
2301
2296
  };
2302
2297
  this.handleTrackChangeRendered = (e) => {
2303
2298
  if (!this.player || !this.controller) return;
@@ -2595,6 +2590,22 @@ class DashHandler {
2595
2590
  }
2596
2591
  }
2597
2592
  }
2593
+ /**
2594
+ * Records whether the viewer is following the live edge, given a position they chose.
2595
+ * Only viewer actions call this: seeks made by dash.js itself must not count.
2596
+ */
2597
+ recordViewerPosition(position) {
2598
+ var _a;
2599
+ if (!this.player) return;
2600
+ try {
2601
+ if (!this.player.isDynamic()) return;
2602
+ const target = (_a = this.getRawLiveInfo()) == null ? void 0 : _a.liveEdgeTarget;
2603
+ if (target == null || position <= 0) return;
2604
+ this.followingLive = target - position <= LOW_LATENCY_LIVE_EDGE_SECONDS;
2605
+ this.syncLiveCatchup();
2606
+ } catch {
2607
+ }
2608
+ }
2598
2609
  normalizeQualityIndex(value) {
2599
2610
  return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : -1;
2600
2611
  }
@@ -2625,9 +2636,9 @@ class DashHandler {
2625
2636
  this.dashRetryCount = 0;
2626
2637
  this.followingLive = true;
2627
2638
  this.catchupEnabled = null;
2628
- video.addEventListener("seeking", this.handleLivePositionChange);
2629
- video.addEventListener("play", this.handleLivePositionChange);
2639
+ video.addEventListener("play", this.handleResume);
2630
2640
  video.addEventListener("timeupdate", this.syncLiveCatchup);
2641
+ controller.addEventListener("live-edge-sync", this.handleLiveEdgeSync);
2631
2642
  loadDashjs().then((dashjsModule) => {
2632
2643
  var _a;
2633
2644
  if (this.controller !== controller) {
@@ -2981,11 +2992,12 @@ class DashHandler {
2981
2992
  this.controller.updateStatePublic({ activeQuality });
2982
2993
  }
2983
2994
  destroy() {
2995
+ var _a;
2984
2996
  if (this.video) {
2985
- this.video.removeEventListener("seeking", this.handleLivePositionChange);
2986
- this.video.removeEventListener("play", this.handleLivePositionChange);
2997
+ this.video.removeEventListener("play", this.handleResume);
2987
2998
  this.video.removeEventListener("timeupdate", this.syncLiveCatchup);
2988
2999
  }
3000
+ (_a = this.controller) == null ? void 0 : _a.removeEventListener("live-edge-sync", this.handleLiveEdgeSync);
2989
3001
  if (this.player) {
2990
3002
  try {
2991
3003
  if (this.eventNames.trackChangeRendered)
@@ -3021,8 +3033,16 @@ class DashHandler {
3021
3033
  this.videoRepresentations = [];
3022
3034
  this.uniqueAudioTracks = [];
3023
3035
  }
3024
- seek(_time) {
3025
- return false;
3036
+ seek(time) {
3037
+ this.recordViewerPosition(time);
3038
+ if (!this.player) return false;
3039
+ try {
3040
+ if (!this.player.isDynamic()) return false;
3041
+ this.player.seekToPresentationTime(time);
3042
+ return true;
3043
+ } catch {
3044
+ return false;
3045
+ }
3026
3046
  }
3027
3047
  setQuality(index) {
3028
3048
  if (this.player) {
@@ -3051,7 +3071,7 @@ class DashHandler {
3051
3071
  if (playerWithABR.setRepresentationForTypeById) {
3052
3072
  playerWithABR.setRepresentationForTypeById("video", targetRep.id);
3053
3073
  } else if (playerWithABR.setQualityFor) {
3054
- playerWithABR.setQualityFor("video", levelIndex, true);
3074
+ playerWithABR.setQualityFor("video", levelIndex, false);
3055
3075
  }
3056
3076
  this.lastQualityIndex = levelIndex;
3057
3077
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const PlayerController = require("../PlayerController-Bt7Po42U.cjs");
3
+ const PlayerController = require("../PlayerController-BaQ27TT9.cjs");
4
4
  class DrmValidator {
5
5
  /**
6
6
  * Performs an automated validation of the player's DRM state.
@@ -1,4 +1,4 @@
1
- import { A, a, b, c, d, e, f, g, h, i, j, D, H, I, K, P, S, k, l, m, n, o, T, p, V, q, r, s, t, u, v, w, x, y, z, B, C } from "../PlayerController-CW0pxrIt.js";
1
+ import { A, a, b, c, d, e, f, g, h, i, j, D, H, I, K, P, S, k, l, m, n, o, T, p, V, q, r, s, t, u, v, w, x, y, z, B, C } from "../PlayerController-D68pc3mj.js";
2
2
  class DrmValidator {
3
3
  /**
4
4
  * Performs an automated validation of the player's DRM state.
@@ -93,8 +93,15 @@ export declare class DashHandler implements SourceHandler {
93
93
  * edge doesn't switch catch-up off just when it's needed to recover.
94
94
  */
95
95
  private syncLiveCatchup;
96
- /** On seeks and resumes, records whether the viewer is still following the live edge. */
97
- private handleLivePositionChange;
96
+ /**
97
+ * Records whether the viewer is following the live edge, given a position they chose.
98
+ * Only viewer actions call this: seeks made by dash.js itself must not count.
99
+ */
100
+ private recordViewerPosition;
101
+ /** Resuming playback: the viewer carries on from wherever the playhead is now. */
102
+ private handleResume;
103
+ /** "Go to live" always means the viewer is following the live edge again. */
104
+ private handleLiveEdgeSync;
98
105
  private normalizeQualityIndex;
99
106
  private resolveCurrentRepresentationIndex;
100
107
  private handleTrackChangeRendered;
@@ -114,7 +121,7 @@ export declare class DashHandler implements SourceHandler {
114
121
  private syncAndDeduplicateTracks;
115
122
  private syncQualityState;
116
123
  destroy(): void;
117
- seek(_time: number): boolean;
124
+ seek(time: number): boolean;
118
125
  setQuality(index: number): void;
119
126
  setAudioTrack(index: number): void;
120
127
  setSubtitleTrack(index: number): void;
@@ -1 +1 @@
1
- {"version":3,"file":"SourceManager.d.ts","sourceRoot":"","sources":["../../../core/src/SourceManager.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,WAAW,EACX,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAsB,MAAM,cAAc,CAAC;AAsM9D,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAoBzE;AAqBD,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACxF,OAAO,IAAI,IAAI,CAAC;IAChB,UAAU,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,gBAAgB,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,cAAc,CAAC,IAAI,IAAI,CAAC;IACxB,cAAc,CAAC,IAAI,WAAW,GAAG,IAAI,CAAC;IACtC,gB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MxB,aAAa,CAAC,KAAK,EAAE,MAAM;IAM3B,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAM9B,cAAc,IAAI,OAAO;IAQzB,cAAc,IAAI,WAAW,GAAG,IAAI;CAM5C"}
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Player = require("./Player-BfmqCREY.cjs");
4
- const PlayerController = require("./PlayerController-Bt7Po42U.cjs");
3
+ const Player = require("./Player-DrKG8tPQ.cjs");
4
+ const PlayerController = require("./PlayerController-BaQ27TT9.cjs");
5
5
  const core_index = require("./core/index.cjs");
6
6
  exports.IconRegistry = Player.IconRegistry;
7
7
  exports.PlayerChaptersButton = Player.PlayerChaptersButton;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { I, P, a, b, c, d, e, f, g, T, h, r } from "./Player-YpukGRGt.js";
2
- import { A, a as a2, b as b2, c as c2, d as d2, e as e2, f as f2, g as g2, h as h2, i, j, D, H, I as I2, K, P as P2, S, k, l, m, n, o, T as T2, p, V, q, r as r2, s, t, u, v, w, x, y, z, B, C } from "./PlayerController-CW0pxrIt.js";
1
+ import { I, P, a, b, c, d, e, f, g, T, h, r } from "./Player-CqgNV9Pd.js";
2
+ import { A, a as a2, b as b2, c as c2, d as d2, e as e2, f as f2, g as g2, h as h2, i, j, D, H, I as I2, K, P as P2, S, k, l, m, n, o, T as T2, p, V, q, r as r2, s, t, u, v, w, x, y, z, B, C } from "./PlayerController-D68pc3mj.js";
3
3
  import { DrmValidator } from "./core/index.js";
4
4
  export {
5
5
  A as AdBreakManager,
@@ -4846,7 +4846,7 @@ class HlsHandler {
4846
4846
  if (this.hls) {
4847
4847
  this.isAutoMode = index === 0;
4848
4848
  const levelIndex = index - 1;
4849
- this.hls.currentLevel = levelIndex;
4849
+ this.hls.nextLevel = levelIndex;
4850
4850
  if (levelIndex === -1) {
4851
4851
  this.lastLevelIndex = -1;
4852
4852
  } else {
@@ -4906,17 +4906,12 @@ class DashHandler {
4906
4906
  } catch {
4907
4907
  }
4908
4908
  };
4909
- this.handleLivePositionChange = () => {
4910
- var _a2;
4911
- if (!this.player || !this.video) return;
4912
- try {
4913
- if (!this.player.isDynamic()) return;
4914
- const target = (_a2 = this.getRawLiveInfo()) == null ? void 0 : _a2.liveEdgeTarget;
4915
- if (target == null || this.video.currentTime <= 0) return;
4916
- this.followingLive = target - this.video.currentTime <= LOW_LATENCY_LIVE_EDGE_SECONDS;
4917
- this.syncLiveCatchup();
4918
- } catch {
4919
- }
4909
+ this.handleResume = () => {
4910
+ if (this.video) this.recordViewerPosition(this.video.currentTime);
4911
+ };
4912
+ this.handleLiveEdgeSync = () => {
4913
+ this.followingLive = true;
4914
+ this.syncLiveCatchup();
4920
4915
  };
4921
4916
  this.handleTrackChangeRendered = (e2) => {
4922
4917
  if (!this.player || !this.controller) return;
@@ -5214,6 +5209,22 @@ class DashHandler {
5214
5209
  }
5215
5210
  }
5216
5211
  }
5212
+ /**
5213
+ * Records whether the viewer is following the live edge, given a position they chose.
5214
+ * Only viewer actions call this: seeks made by dash.js itself must not count.
5215
+ */
5216
+ recordViewerPosition(position) {
5217
+ var _a2;
5218
+ if (!this.player) return;
5219
+ try {
5220
+ if (!this.player.isDynamic()) return;
5221
+ const target = (_a2 = this.getRawLiveInfo()) == null ? void 0 : _a2.liveEdgeTarget;
5222
+ if (target == null || position <= 0) return;
5223
+ this.followingLive = target - position <= LOW_LATENCY_LIVE_EDGE_SECONDS;
5224
+ this.syncLiveCatchup();
5225
+ } catch {
5226
+ }
5227
+ }
5217
5228
  normalizeQualityIndex(value) {
5218
5229
  return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : -1;
5219
5230
  }
@@ -5244,9 +5255,9 @@ class DashHandler {
5244
5255
  this.dashRetryCount = 0;
5245
5256
  this.followingLive = true;
5246
5257
  this.catchupEnabled = null;
5247
- video.addEventListener("seeking", this.handleLivePositionChange);
5248
- video.addEventListener("play", this.handleLivePositionChange);
5258
+ video.addEventListener("play", this.handleResume);
5249
5259
  video.addEventListener("timeupdate", this.syncLiveCatchup);
5260
+ controller.addEventListener("live-edge-sync", this.handleLiveEdgeSync);
5250
5261
  loadDashjs().then((dashjsModule) => {
5251
5262
  var _a2;
5252
5263
  if (this.controller !== controller) {
@@ -5600,11 +5611,12 @@ class DashHandler {
5600
5611
  this.controller.updateStatePublic({ activeQuality });
5601
5612
  }
5602
5613
  destroy() {
5614
+ var _a2;
5603
5615
  if (this.video) {
5604
- this.video.removeEventListener("seeking", this.handleLivePositionChange);
5605
- this.video.removeEventListener("play", this.handleLivePositionChange);
5616
+ this.video.removeEventListener("play", this.handleResume);
5606
5617
  this.video.removeEventListener("timeupdate", this.syncLiveCatchup);
5607
5618
  }
5619
+ (_a2 = this.controller) == null ? void 0 : _a2.removeEventListener("live-edge-sync", this.handleLiveEdgeSync);
5608
5620
  if (this.player) {
5609
5621
  try {
5610
5622
  if (this.eventNames.trackChangeRendered)
@@ -5640,8 +5652,16 @@ class DashHandler {
5640
5652
  this.videoRepresentations = [];
5641
5653
  this.uniqueAudioTracks = [];
5642
5654
  }
5643
- seek(_time) {
5644
- return false;
5655
+ seek(time) {
5656
+ this.recordViewerPosition(time);
5657
+ if (!this.player) return false;
5658
+ try {
5659
+ if (!this.player.isDynamic()) return false;
5660
+ this.player.seekToPresentationTime(time);
5661
+ return true;
5662
+ } catch {
5663
+ return false;
5664
+ }
5645
5665
  }
5646
5666
  setQuality(index) {
5647
5667
  if (this.player) {
@@ -5670,7 +5690,7 @@ class DashHandler {
5670
5690
  if (playerWithABR.setRepresentationForTypeById) {
5671
5691
  playerWithABR.setRepresentationForTypeById("video", targetRep.id);
5672
5692
  } else if (playerWithABR.setQualityFor) {
5673
- playerWithABR.setQualityFor("video", levelIndex, true);
5693
+ playerWithABR.setQualityFor("video", levelIndex, false);
5674
5694
  }
5675
5695
  this.lastQualityIndex = levelIndex;
5676
5696
  }
@@ -4084,7 +4084,7 @@ class Us {
4084
4084
  if (this.hls) {
4085
4085
  this.isAutoMode = e === 0;
4086
4086
  const t = e - 1;
4087
- this.hls.currentLevel = t, t === -1 ? this.lastLevelIndex = -1 : this.lastLevelIndex = t, this.syncQualityState();
4087
+ this.hls.nextLevel = t, t === -1 ? this.lastLevelIndex = -1 : this.lastLevelIndex = t, this.syncQualityState();
4088
4088
  }
4089
4089
  }
4090
4090
  setAudioTrack(e) {
@@ -4115,16 +4115,10 @@ class Ns {
4115
4115
  this.catchupEnabled = e, this.player.updateSettings({ streaming: { liveCatchup: { enabled: e } } });
4116
4116
  } catch {
4117
4117
  }
4118
- }, this.handleLivePositionChange = () => {
4119
- var e;
4120
- if (!(!this.player || !this.video))
4121
- try {
4122
- if (!this.player.isDynamic()) return;
4123
- const t = (e = this.getRawLiveInfo()) == null ? void 0 : e.liveEdgeTarget;
4124
- if (t == null || this.video.currentTime <= 0) return;
4125
- this.followingLive = t - this.video.currentTime <= $s, this.syncLiveCatchup();
4126
- } catch {
4127
- }
4118
+ }, this.handleResume = () => {
4119
+ this.video && this.recordViewerPosition(this.video.currentTime);
4120
+ }, this.handleLiveEdgeSync = () => {
4121
+ this.followingLive = !0, this.syncLiveCatchup();
4128
4122
  }, this.handleTrackChangeRendered = (e) => {
4129
4123
  if (!(!this.player || !this.controller) && e.mediaType === "audio") {
4130
4124
  const t = this.player.getCurrentTrackFor("audio");
@@ -4314,6 +4308,21 @@ class Ns {
4314
4308
  this.player.seek(Math.max(0, i - r));
4315
4309
  } else Number.isFinite(this.player.duration()) && this.player.seek(this.player.duration());
4316
4310
  }
4311
+ /**
4312
+ * Records whether the viewer is following the live edge, given a position they chose.
4313
+ * Only viewer actions call this: seeks made by dash.js itself must not count.
4314
+ */
4315
+ recordViewerPosition(e) {
4316
+ var t;
4317
+ if (this.player)
4318
+ try {
4319
+ if (!this.player.isDynamic()) return;
4320
+ const i = (t = this.getRawLiveInfo()) == null ? void 0 : t.liveEdgeTarget;
4321
+ if (i == null || e <= 0) return;
4322
+ this.followingLive = i - e <= $s, this.syncLiveCatchup();
4323
+ } catch {
4324
+ }
4325
+ }
4317
4326
  normalizeQualityIndex(e) {
4318
4327
  return typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : -1;
4319
4328
  }
@@ -4332,7 +4341,7 @@ class Ns {
4332
4341
  return i;
4333
4342
  }
4334
4343
  load(e, t, i) {
4335
- e.src && (this.destroy(), this.controller = i, this.video = t, this.lastQualityIndex = -1, this.isAutoMode = !0, this.videoRepresentations = [], this.uniqueAudioTracks = [], this.dashRetryCount = 0, this.followingLive = !0, this.catchupEnabled = null, t.addEventListener("seeking", this.handleLivePositionChange), t.addEventListener("play", this.handleLivePositionChange), t.addEventListener("timeupdate", this.syncLiveCatchup), Bi().then((s) => {
4344
+ e.src && (this.destroy(), this.controller = i, this.video = t, this.lastQualityIndex = -1, this.isAutoMode = !0, this.videoRepresentations = [], this.uniqueAudioTracks = [], this.dashRetryCount = 0, this.followingLive = !0, this.catchupEnabled = null, t.addEventListener("play", this.handleResume), t.addEventListener("timeupdate", this.syncLiveCatchup), i.addEventListener("live-edge-sync", this.handleLiveEdgeSync), Bi().then((s) => {
4336
4345
  var p;
4337
4346
  if (this.controller !== i)
4338
4347
  return;
@@ -4542,18 +4551,24 @@ class Ns {
4542
4551
  this.controller.updateStatePublic({ activeQuality: r });
4543
4552
  }
4544
4553
  destroy() {
4545
- if (this.video && (this.video.removeEventListener("seeking", this.handleLivePositionChange), this.video.removeEventListener("play", this.handleLivePositionChange), this.video.removeEventListener("timeupdate", this.syncLiveCatchup)), this.player) {
4554
+ var e;
4555
+ if (this.video && (this.video.removeEventListener("play", this.handleResume), this.video.removeEventListener("timeupdate", this.syncLiveCatchup)), (e = this.controller) == null || e.removeEventListener("live-edge-sync", this.handleLiveEdgeSync), this.player) {
4546
4556
  try {
4547
4557
  this.eventNames.trackChangeRendered && this.player.off(this.eventNames.trackChangeRendered, this.handleTrackChangeRendered), this.eventNames.streamInitialized && this.player.off(this.eventNames.streamInitialized, this.handleStreamInitialized), this.eventNames.qualityChangeRendered && this.player.off(this.eventNames.qualityChangeRendered, this.handleQualityChangeRendered), this.eventNames.textTrackChanged && this.player.off(this.eventNames.textTrackChanged, this.handleTextTrackChanged), this.eventNames.error && this.player.off(this.eventNames.error, this.handleError), this.eventNames.keySystemSelected && this.player.off(this.eventNames.keySystemSelected, this.handleKeySystemSelected), this.eventNames.keySessionCreated && this.player.off(this.eventNames.keySessionCreated, this.handleKeySessionCreated), this.eventNames.keySessionClosed && this.player.off(this.eventNames.keySessionClosed, this.handleKeySessionClosed), this.eventNames.keySessionRemoved && this.player.off(this.eventNames.keySessionRemoved, this.handleKeySessionRemoved), this.eventNames.keyStatusesChanged && this.player.off(this.eventNames.keyStatusesChanged, this.handleKeyStatusesChanged), this.eventNames.keyMessage && this.player.off(this.eventNames.keyMessage, this.handleKeyMessage), this.eventNames.protectionError && this.player.off(this.eventNames.protectionError, this.handleProtectionError);
4548
- } catch (e) {
4549
- console.warn("[DashHandler] Error unbinding event listeners:", e);
4558
+ } catch (t) {
4559
+ console.warn("[DashHandler] Error unbinding event listeners:", t);
4550
4560
  }
4551
4561
  this.player.destroy(), this.player = null;
4552
4562
  }
4553
4563
  this.drmManager && (this.drmManager.destroy(), this.drmManager = null), this.controller = null, this.video = null, this.lastQualityIndex = -1, this.isAutoMode = !0, this.videoRepresentations = [], this.uniqueAudioTracks = [];
4554
4564
  }
4555
4565
  seek(e) {
4556
- return !1;
4566
+ if (this.recordViewerPosition(e), !this.player) return !1;
4567
+ try {
4568
+ return this.player.isDynamic() ? (this.player.seekToPresentationTime(e), !0) : !1;
4569
+ } catch {
4570
+ return !1;
4571
+ }
4557
4572
  }
4558
4573
  setQuality(e) {
4559
4574
  if (this.player) {
@@ -4567,7 +4582,7 @@ class Ns {
4567
4582
  streaming: { abr: { autoSwitchBitrate: { video: !1 } } }
4568
4583
  }), t >= 0 && t < this.videoRepresentations.length) {
4569
4584
  const s = this.videoRepresentations[t];
4570
- i.setRepresentationForTypeById ? i.setRepresentationForTypeById("video", s.id) : i.setQualityFor && i.setQualityFor("video", t, !0), this.lastQualityIndex = t;
4585
+ i.setRepresentationForTypeById ? i.setRepresentationForTypeById("video", s.id) : i.setQualityFor && i.setQualityFor("video", t, !1), this.lastQualityIndex = t;
4571
4586
  }
4572
4587
  this.syncQualityState();
4573
4588
  }