stormcloud-video-player 0.7.21 → 0.7.23
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 +7 -5
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +7 -5
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +3 -3
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +3 -3
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +3 -3
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +7 -5
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -3208,7 +3208,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3208
3208
|
this.hls.on(import_hls.default.Events.FRAG_CHANGED, function(_evt, data) {
|
|
3209
3209
|
var frag = data === null || data === void 0 ? void 0 : data.frag;
|
|
3210
3210
|
if (!frag) return;
|
|
3211
|
-
if (_this.lastAdInsertionPoint && !_this.inAdBreak && _this.lastAdInsertionPoint.updated_at !== _this.processedAdInsertionUpdatedAt) {
|
|
3211
|
+
if (_this.lastAdInsertionPoint && !_this.inAdBreak && !_this.pendingAdBreak && _this.lastAdInsertionPoint.updated_at !== _this.processedAdInsertionUpdatedAt) {
|
|
3212
3212
|
var segmentName = _this.lastAdInsertionPoint.segment_ts_name;
|
|
3213
3213
|
if (_this.fragmentMatchesSegment(frag, segmentName)) {
|
|
3214
3214
|
var _ref;
|
|
@@ -4079,7 +4079,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4079
4079
|
]);
|
|
4080
4080
|
return [
|
|
4081
4081
|
4,
|
|
4082
|
-
fetch("https://adstorm.co/api-adstorm-dev/adstorm/
|
|
4082
|
+
fetch("https://adstorm.co/api-adstorm-dev/adstorm/adcision/channels/".concat(encodeURIComponent(this.config.projectId), "/ad-insertion-point"))
|
|
4083
4083
|
];
|
|
4084
4084
|
case 2:
|
|
4085
4085
|
resp = _state.sent();
|
|
@@ -4100,7 +4100,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4100
4100
|
this.pushAdInsertionDebug("api_response", data.segment_ts_name, {
|
|
4101
4101
|
offsetSeconds: data.offset_seconds,
|
|
4102
4102
|
updatedAt: data.updated_at,
|
|
4103
|
-
detail: "
|
|
4103
|
+
detail: "ch=".concat(data.channel_id, " id=").concat(data.id)
|
|
4104
4104
|
});
|
|
4105
4105
|
if (segmentChanged && (this.pendingAdBreak || this.adInsertionOffsetTimerId != null)) {
|
|
4106
4106
|
this.clearAdInsertionOffsetTimer();
|
|
@@ -7706,7 +7706,8 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7706
7706
|
licenseKey,
|
|
7707
7707
|
lowLatencyMode,
|
|
7708
7708
|
driftToleranceMs,
|
|
7709
|
-
adcisionChannelId
|
|
7709
|
+
adcisionChannelId,
|
|
7710
|
+
debugAdTiming
|
|
7710
7711
|
]);
|
|
7711
7712
|
(0, import_react2.useEffect)(function() {
|
|
7712
7713
|
if (typeof window === "undefined") return;
|
|
@@ -7743,7 +7744,8 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7743
7744
|
if (minSegmentsBeforePlay !== void 0) cfg.minSegmentsBeforePlay = minSegmentsBeforePlay;
|
|
7744
7745
|
if (disableAds !== void 0) cfg.disableAds = disableAds;
|
|
7745
7746
|
cfg.disableFiller = disableFiller !== null && disableFiller !== void 0 ? disableFiller : true;
|
|
7746
|
-
if (
|
|
7747
|
+
if (adcisionChannelId !== void 0) cfg.projectId = String(adcisionChannelId);
|
|
7748
|
+
else if (swirlProjectId !== void 0) cfg.projectId = String(swirlProjectId);
|
|
7747
7749
|
var player = new StormcloudVideoPlayer(cfg);
|
|
7748
7750
|
playerRef.current = player;
|
|
7749
7751
|
player.load().then(function() {
|