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.
- package/README.md +1 -1
- package/dist/boss-web-player-sdk.css +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +5 -17
- package/dist/core.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +46 -24
- package/dist/index.js +914 -817
- package/dist/index.js.map +1 -1
- package/dist/{src-IKWezLNW.js → src-B8eoxemB.js} +13 -12
- package/dist/{src-IKWezLNW.js.map → src-B8eoxemB.js.map} +1 -1
- package/dist/{src-Blzb5K-0.cjs → src-BXp0h90r.cjs} +5 -5
- package/dist/{src-Blzb5K-0.cjs.map → src-BXp0h90r.cjs.map} +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
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
|
|
19652
|
-
|
|
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.
|
|
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-
|
|
19809
|
+
//# sourceMappingURL=src-B8eoxemB.js.map
|