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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
import { S as StormcloudVideoPlayerConfig } from '../types-
|
|
2
|
+
import { S as StormcloudVideoPlayerConfig } from '../types-CIHDHY7A.cjs';
|
|
3
3
|
|
|
4
4
|
interface HlsPlayerProps extends StormcloudVideoPlayerConfig {
|
|
5
5
|
onMount?: (player: any) => void;
|
package/lib/players/index.cjs
CHANGED
|
@@ -620,7 +620,7 @@ function isSupportedFormat(url, mimeType) {
|
|
|
620
620
|
return false;
|
|
621
621
|
}
|
|
622
622
|
function createAdStormPlayer(contentVideo, options) {
|
|
623
|
-
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug;
|
|
623
|
+
var licenseKey = options.licenseKey, _options_debug = options.debug, debug = _options_debug === void 0 ? false : _options_debug, channelId = options.channelId;
|
|
624
624
|
var adPlaying = false;
|
|
625
625
|
var originalMutedState = false;
|
|
626
626
|
var originalVolume = Math.max(0, Math.min(1, contentVideo.volume || 1));
|
|
@@ -827,7 +827,12 @@ function createAdStormPlayer(contentVideo, options) {
|
|
|
827
827
|
}
|
|
828
828
|
function buildVastUrl(durationSeconds) {
|
|
829
829
|
var baseUrl = "https://adstorm.co/api-adstorm-dev/adstorm/nab/vast/pod";
|
|
830
|
-
|
|
830
|
+
var params = new URLSearchParams();
|
|
831
|
+
if (channelId != null) {
|
|
832
|
+
params.set("channel_id", String(channelId));
|
|
833
|
+
}
|
|
834
|
+
params.set("duration", String(Math.ceil(durationSeconds)));
|
|
835
|
+
return "".concat(baseUrl, "?").concat(params.toString());
|
|
831
836
|
}
|
|
832
837
|
function parseVastXml(xmlString) {
|
|
833
838
|
var ads = [];
|
|
@@ -2825,10 +2830,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
2825
2830
|
logBrowserInfo(config.debugAdTiming);
|
|
2826
2831
|
var browserForAdLayer = detectBrowser();
|
|
2827
2832
|
var isSinglePipeline = browserForAdLayer.isSmartTV || !!this.config.singlePipelineMode;
|
|
2828
|
-
this.adLayer = createAdStormPlayer(this.video, {
|
|
2833
|
+
this.adLayer = createAdStormPlayer(this.video, _object_spread({
|
|
2829
2834
|
licenseKey: this.config.licenseKey || "",
|
|
2830
2835
|
debug: !!config.debugAdTiming
|
|
2831
|
-
}
|
|
2836
|
+
}, this.config.channelId != null && {
|
|
2837
|
+
channelId: this.config.channelId
|
|
2838
|
+
}));
|
|
2832
2839
|
this.adLayer.updateOptions({
|
|
2833
2840
|
continueLiveStreamDuringAds: !isSinglePipeline && this.shouldContinueLiveStreamDuringAds()
|
|
2834
2841
|
});
|