boss-web-player-sdk 1.1.19 → 1.1.21

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.
@@ -18498,8 +18498,8 @@ var wu = class {
18498
18498
  milestonesHit = /* @__PURE__ */ new Set();
18499
18499
  lastHeartbeatPosition = null;
18500
18500
  lastHeartbeatAt = null;
18501
- constructor(e, t, n) {
18502
- this.callback = e, this.sessionId = n?.sessionId ?? this.generateSessionId(), this.videoId = t ? this.extractVideoId(t) : "", this.deviceType = this.getDeviceType(), this.networkType = this.getNetworkType(), n && (this.isFirstPlay = !n.sessionStartFired, this.totalWatchTime = n.totalWatchTime, this.streamingTime = n.streamingTime, this.adWatchTime = n.adWatchTime, this.bufferingCount = n.bufferingCount, this.totalBufferingTime = n.totalBufferingTime, this.milestonesHit = new Set(n.milestonesHit));
18501
+ constructor(e, t, n, r) {
18502
+ this.callback = e, this.sessionId = n?.sessionId ?? this.generateSessionId(), this.videoId = r || (t ? this.extractVideoId(t) : ""), this.deviceType = this.getDeviceType(), this.networkType = this.getNetworkType(), n && (this.isFirstPlay = !n.sessionStartFired, this.totalWatchTime = n.totalWatchTime, this.streamingTime = n.streamingTime, this.adWatchTime = n.adWatchTime, this.bufferingCount = n.bufferingCount, this.totalBufferingTime = n.totalBufferingTime, this.milestonesHit = new Set(n.milestonesHit));
18503
18503
  }
18504
18504
  getSessionSnapshot() {
18505
18505
  let e = this.totalBufferingTime;
@@ -19098,7 +19098,7 @@ var wu = class {
19098
19098
  muted: !1,
19099
19099
  themeColor: "#6366f1",
19100
19100
  ...e
19101
- }, this.analytics = new wu(this.options.analyticsCallback, this.options.src, this.options.analyticsSessionSeed), this.keyMoments = new Ou(this.options.keyMoments || this.options.chapters || []), this.chapters = this.keyMoments, this.subtitles = new Au(this.options.subtitles), this.drm = new ju(this.options.drm), this.casting = new Mu(), this.thumbnails = new Nu(this.options.thumbnails), this.initializePlayer();
19101
+ }, this.analytics = new wu(this.options.analyticsCallback, this.options.src, this.options.analyticsSessionSeed, this.options.videoId), this.keyMoments = new Ou(this.options.keyMoments || this.options.chapters || []), this.chapters = this.keyMoments, this.subtitles = new Au(this.options.subtitles), this.drm = new ju(this.options.drm), this.casting = new Mu(), this.thumbnails = new Nu(this.options.thumbnails), this.initializePlayer();
19102
19102
  }
19103
19103
  initializePlayer() {
19104
19104
  let e = window.location.hostname;
@@ -19247,7 +19247,7 @@ var wu = class {
19247
19247
  enableWorker: !0,
19248
19248
  lowLatencyMode: !0,
19249
19249
  backBufferLength: 90,
19250
- maxMaxBufferLength: 30,
19250
+ maxMaxBufferLength: 600,
19251
19251
  renderTextTracksNatively: !1,
19252
19252
  xhrSetup: (e, n) => {
19253
19253
  let r = this.drm.getAuthToken();
@@ -19648,11 +19648,8 @@ var wu = class {
19648
19648
  /(^|[.-])ad(server|serving|tech|system)/i,
19649
19649
  /doubleclick\.net$/i
19650
19650
  ];
19651
- static AD_PATH_PATTERNS = [
19652
- /\/v1\/segment\//i,
19653
- /\/ads?\//i,
19654
- /\/creatives?\//i
19655
- ];
19651
+ static AD_STITCHER_PATH_PATTERNS = [/\/v1\/segment\//i];
19652
+ static AD_PATH_HINT_PATTERNS = [/\/ads?\//i, /\/creatives?\//i];
19656
19653
  parseSegmentUrl(e) {
19657
19654
  try {
19658
19655
  let t = new URL(e, window.location.origin);
@@ -19669,11 +19666,15 @@ var wu = class {
19669
19666
  }
19670
19667
  isKnownAdSegment(t) {
19671
19668
  let { host: n, path: r } = this.parseSegmentUrl(t);
19672
- return e.AD_HOST_PATTERNS.some((e) => e.test(n)) || e.AD_PATH_PATTERNS.some((e) => e.test(r));
19669
+ return e.AD_HOST_PATTERNS.some((e) => e.test(n)) || e.AD_STITCHER_PATH_PATTERNS.some((e) => e.test(r));
19670
+ }
19671
+ hasAdPathHint(t) {
19672
+ let { path: n } = this.parseSegmentUrl(t);
19673
+ return e.AD_PATH_HINT_PATTERNS.some((e) => e.test(n));
19673
19674
  }
19674
19675
  classifyAdGroups(e) {
19675
19676
  let t = e.map((e) => this.isKnownAdSegment(e.url));
19676
- if (t.some(Boolean)) return t;
19677
+ if (t.some(Boolean) && !t.every(Boolean)) return e.map((e, n) => t[n] || this.hasAdPathHint(e.url));
19677
19678
  let n = e.map((e) => this.parseSegmentUrl(e.url).host), r = n[0];
19678
19679
  return n.some((e) => e !== r) ? n.map((e) => e !== r) : e.map((e) => e.cc % 2 == 1);
19679
19680
  }
@@ -19805,4 +19806,4 @@ var wu = class {
19805
19806
  //#endregion
19806
19807
  export { Au as a, Du as c, ju as i, wu as l, Nu as n, ku as o, Mu as r, Ou as s, Pu as t, $ as u };
19807
19808
 
19808
- //# sourceMappingURL=src-IKWezLNW.js.map
19809
+ //# sourceMappingURL=src-B8eoxemB.js.map