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
|
@@ -570,7 +570,7 @@ function isSupportedFormat(url, mimeType) {
|
|
|
570
570
|
return false;
|
|
571
571
|
}
|
|
572
572
|
function createAdStormPlayer(contentVideo, options) {
|
|
573
|
-
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug;
|
|
573
|
+
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug, channelId = options.channelId;
|
|
574
574
|
var adPlaying = false;
|
|
575
575
|
var originalMutedState = false;
|
|
576
576
|
var originalVolume = Math.max(0, Math.min(1, contentVideo.volume || 1));
|
|
@@ -777,7 +777,12 @@ function createAdStormPlayer(contentVideo, options) {
|
|
|
777
777
|
}
|
|
778
778
|
function buildVastUrl(durationSeconds) {
|
|
779
779
|
var baseUrl = "https://adstorm.co/api-adstorm-dev/adstorm/nab/vast/pod";
|
|
780
|
-
|
|
780
|
+
var params = new URLSearchParams();
|
|
781
|
+
if (channelId != null) {
|
|
782
|
+
params.set("channel_id", String(channelId));
|
|
783
|
+
}
|
|
784
|
+
params.set("duration", String(Math.ceil(durationSeconds)));
|
|
785
|
+
return "".concat(baseUrl, "?").concat(params.toString());
|
|
781
786
|
}
|
|
782
787
|
function parseVastXml(xmlString) {
|
|
783
788
|
var ads = [];
|
|
@@ -2775,10 +2780,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
2775
2780
|
logBrowserInfo(config.debugAdTiming);
|
|
2776
2781
|
var browserForAdLayer = detectBrowser();
|
|
2777
2782
|
var isSinglePipeline = browserForAdLayer.isSmartTV || !!this.config.singlePipelineMode;
|
|
2778
|
-
this.adLayer = createAdStormPlayer(this.video, {
|
|
2783
|
+
this.adLayer = createAdStormPlayer(this.video, _object_spread({
|
|
2779
2784
|
licenseKey: this.config.licenseKey || "",
|
|
2780
2785
|
debug: !!config.debugAdTiming
|
|
2781
|
-
}
|
|
2786
|
+
}, this.config.channelId != null && {
|
|
2787
|
+
channelId: this.config.channelId
|
|
2788
|
+
}));
|
|
2782
2789
|
this.adLayer.updateOptions({
|
|
2783
2790
|
continueLiveStreamDuringAds: !isSinglePipeline && this.shouldContinueLiveStreamDuringAds()
|
|
2784
2791
|
});
|
|
@@ -7569,8 +7576,10 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7569
7576
|
if (minSegmentsBeforePlay !== void 0) cfg.minSegmentsBeforePlay = minSegmentsBeforePlay;
|
|
7570
7577
|
if (disableAds !== void 0) cfg.disableAds = disableAds;
|
|
7571
7578
|
cfg.disableFiller = disableFiller !== null && disableFiller !== void 0 ? disableFiller : true;
|
|
7572
|
-
if (adcisionChannelId !== void 0)
|
|
7573
|
-
|
|
7579
|
+
if (adcisionChannelId !== void 0) {
|
|
7580
|
+
cfg.projectId = String(adcisionChannelId);
|
|
7581
|
+
cfg.channelId = adcisionChannelId;
|
|
7582
|
+
} else if (swirlProjectId !== void 0) cfg.projectId = String(swirlProjectId);
|
|
7574
7583
|
var player = new StormcloudVideoPlayer(cfg);
|
|
7575
7584
|
playerRef.current = player;
|
|
7576
7585
|
player.load().then(function() {
|