stormcloud-video-player 0.7.24 → 0.7.26
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/dist/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +15 -6
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +15 -6
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +11 -4
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/players/HlsPlayer.cjs +11 -4
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +11 -4
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/adstormPlayer.cjs +7 -2
- package/lib/sdk/adstormPlayer.cjs.map +1 -1
- package/lib/sdk/adstormPlayer.d.cts +2 -1
- package/lib/{types-DrBGHN4q.d.cts → types-CIHDHY7A.d.cts} +1 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +15 -6
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/package.json +1 -1
|
@@ -584,7 +584,7 @@ function isSupportedFormat(url, mimeType) {
|
|
|
584
584
|
return false;
|
|
585
585
|
}
|
|
586
586
|
function createAdStormPlayer(contentVideo, options) {
|
|
587
|
-
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug;
|
|
587
|
+
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug, channelId = options.channelId;
|
|
588
588
|
var adPlaying = false;
|
|
589
589
|
var originalMutedState = false;
|
|
590
590
|
var originalVolume = Math.max(0, Math.min(1, contentVideo.volume || 1));
|
|
@@ -791,7 +791,12 @@ function createAdStormPlayer(contentVideo, options) {
|
|
|
791
791
|
}
|
|
792
792
|
function buildVastUrl(durationSeconds) {
|
|
793
793
|
var baseUrl = "https://adstorm.co/api-adstorm-dev/adstorm/nab/vast/pod";
|
|
794
|
-
|
|
794
|
+
var params = new URLSearchParams();
|
|
795
|
+
if (channelId != null) {
|
|
796
|
+
params.set("channel_id", String(channelId));
|
|
797
|
+
}
|
|
798
|
+
params.set("duration", String(Math.ceil(durationSeconds)));
|
|
799
|
+
return "".concat(baseUrl, "?").concat(params.toString());
|
|
795
800
|
}
|
|
796
801
|
function parseVastXml(xmlString) {
|
|
797
802
|
var ads = [];
|
|
@@ -2789,10 +2794,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
2789
2794
|
logBrowserInfo(config.debugAdTiming);
|
|
2790
2795
|
var browserForAdLayer = detectBrowser();
|
|
2791
2796
|
var isSinglePipeline = browserForAdLayer.isSmartTV || !!this.config.singlePipelineMode;
|
|
2792
|
-
this.adLayer = createAdStormPlayer(this.video, {
|
|
2797
|
+
this.adLayer = createAdStormPlayer(this.video, _object_spread({
|
|
2793
2798
|
licenseKey: this.config.licenseKey || "",
|
|
2794
2799
|
debug: !!config.debugAdTiming
|
|
2795
|
-
}
|
|
2800
|
+
}, this.config.channelId != null && {
|
|
2801
|
+
channelId: this.config.channelId
|
|
2802
|
+
}));
|
|
2796
2803
|
this.adLayer.updateOptions({
|
|
2797
2804
|
continueLiveStreamDuringAds: !isSinglePipeline && this.shouldContinueLiveStreamDuringAds()
|
|
2798
2805
|
});
|