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
|
@@ -532,7 +532,7 @@ function isSupportedFormat(url, mimeType) {
|
|
|
532
532
|
return false;
|
|
533
533
|
}
|
|
534
534
|
function createAdStormPlayer(contentVideo, options) {
|
|
535
|
-
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug;
|
|
535
|
+
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug, channelId = options.channelId;
|
|
536
536
|
var adPlaying = false;
|
|
537
537
|
var originalMutedState = false;
|
|
538
538
|
var originalVolume = Math.max(0, Math.min(1, contentVideo.volume || 1));
|
|
@@ -739,7 +739,12 @@ function createAdStormPlayer(contentVideo, options) {
|
|
|
739
739
|
}
|
|
740
740
|
function buildVastUrl(durationSeconds) {
|
|
741
741
|
var baseUrl = "https://adstorm.co/api-adstorm-dev/adstorm/nab/vast/pod";
|
|
742
|
-
|
|
742
|
+
var params = new URLSearchParams();
|
|
743
|
+
if (channelId != null) {
|
|
744
|
+
params.set("channel_id", String(channelId));
|
|
745
|
+
}
|
|
746
|
+
params.set("duration", String(Math.ceil(durationSeconds)));
|
|
747
|
+
return "".concat(baseUrl, "?").concat(params.toString());
|
|
743
748
|
}
|
|
744
749
|
function parseVastXml(xmlString) {
|
|
745
750
|
var ads = [];
|
|
@@ -2737,10 +2742,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
2737
2742
|
logBrowserInfo(config.debugAdTiming);
|
|
2738
2743
|
var browserForAdLayer = detectBrowser();
|
|
2739
2744
|
var isSinglePipeline = browserForAdLayer.isSmartTV || !!this.config.singlePipelineMode;
|
|
2740
|
-
this.adLayer = createAdStormPlayer(this.video, {
|
|
2745
|
+
this.adLayer = createAdStormPlayer(this.video, _object_spread({
|
|
2741
2746
|
licenseKey: this.config.licenseKey || "",
|
|
2742
2747
|
debug: !!config.debugAdTiming
|
|
2743
|
-
}
|
|
2748
|
+
}, this.config.channelId != null && {
|
|
2749
|
+
channelId: this.config.channelId
|
|
2750
|
+
}));
|
|
2744
2751
|
this.adLayer.updateOptions({
|
|
2745
2752
|
continueLiveStreamDuringAds: !isSinglePipeline && this.shouldContinueLiveStreamDuringAds()
|
|
2746
2753
|
});
|