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.
@@ -92,6 +92,7 @@ declare class StormcloudVideoPlayer {
92
92
  private stopAdInsertionPolling;
93
93
  private fetchAdInsertionPoint;
94
94
  private checkAdInsertionInManifest;
95
+ private extractTsFilename;
95
96
  private fragmentMatchesSegment;
96
97
  private clearAdInsertionOffsetTimer;
97
98
  private startContinuousFetchLoop;
@@ -4045,14 +4045,21 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4045
4045
  }
4046
4046
  }
4047
4047
  },
4048
+ {
4049
+ key: "extractTsFilename",
4050
+ value: function extractTsFilename(url) {
4051
+ var _parts_;
4052
+ var clean = url.includes("?") ? url.slice(0, url.indexOf("?")) : url;
4053
+ var parts = clean.split("/");
4054
+ return (_parts_ = parts[parts.length - 1]) !== null && _parts_ !== void 0 ? _parts_ : clean;
4055
+ }
4056
+ },
4048
4057
  {
4049
4058
  key: "fragmentMatchesSegment",
4050
4059
  value: function fragmentMatchesSegment(frag, segmentName) {
4051
- var _rawUrl_split_;
4052
4060
  var rawUrl = (frag === null || frag === void 0 ? void 0 : frag.url) || (frag === null || frag === void 0 ? void 0 : frag.relurl) || "";
4053
- var url = (_rawUrl_split_ = rawUrl.split("?")[0]) !== null && _rawUrl_split_ !== void 0 ? _rawUrl_split_ : "";
4054
- var name = segmentName.startsWith("/") ? segmentName : "/" + segmentName;
4055
- return url.endsWith(name) || url.includes(name);
4061
+ if (!rawUrl) return false;
4062
+ return this.extractTsFilename(rawUrl) === this.extractTsFilename(segmentName);
4056
4063
  }
4057
4064
  },
4058
4065
  {