stormcloud-video-player 0.7.13 → 0.7.14

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/lib/index.d.cts CHANGED
@@ -204,6 +204,7 @@ declare class StormcloudVideoPlayer {
204
204
  private stopAdInsertionPolling;
205
205
  private fetchAdInsertionPoint;
206
206
  private checkAdInsertionInManifest;
207
+ private extractTsFilename;
207
208
  private fragmentMatchesSegment;
208
209
  private clearAdInsertionOffsetTimer;
209
210
  private startContinuousFetchLoop;
package/lib/index.d.ts CHANGED
@@ -204,6 +204,7 @@ declare class StormcloudVideoPlayer {
204
204
  private stopAdInsertionPolling;
205
205
  private fetchAdInsertionPoint;
206
206
  private checkAdInsertionInManifest;
207
+ private extractTsFilename;
207
208
  private fragmentMatchesSegment;
208
209
  private clearAdInsertionOffsetTimer;
209
210
  private startContinuousFetchLoop;
package/lib/index.js CHANGED
@@ -4043,14 +4043,21 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4043
4043
  }
4044
4044
  }
4045
4045
  },
4046
+ {
4047
+ key: "extractTsFilename",
4048
+ value: function extractTsFilename(url) {
4049
+ var _parts_;
4050
+ var clean = url.includes("?") ? url.slice(0, url.indexOf("?")) : url;
4051
+ var parts = clean.split("/");
4052
+ return (_parts_ = parts[parts.length - 1]) !== null && _parts_ !== void 0 ? _parts_ : clean;
4053
+ }
4054
+ },
4046
4055
  {
4047
4056
  key: "fragmentMatchesSegment",
4048
4057
  value: function fragmentMatchesSegment(frag, segmentName) {
4049
- var _rawUrl_split_;
4050
4058
  var rawUrl = (frag === null || frag === void 0 ? void 0 : frag.url) || (frag === null || frag === void 0 ? void 0 : frag.relurl) || "";
4051
- var url = (_rawUrl_split_ = rawUrl.split("?")[0]) !== null && _rawUrl_split_ !== void 0 ? _rawUrl_split_ : "";
4052
- var name = segmentName.startsWith("/") ? segmentName : "/" + segmentName;
4053
- return url.endsWith(name) || url.includes(name);
4059
+ if (!rawUrl) return false;
4060
+ return this.extractTsFilename(rawUrl) === this.extractTsFilename(segmentName);
4054
4061
  }
4055
4062
  },
4056
4063
  {