@byteplus/veplayer-plugin 2.5.0-rc.1 → 2.6.0-rc.0
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/esm/index.development.css +1 -1
- package/esm/index.development.js +1845 -530
- package/esm/index.production.css +1 -1
- package/esm/index.production.js +4 -4
- package/esm/veplayer.plugin.abr.development.js +12 -0
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.ad.development.css +1 -1
- package/esm/veplayer.plugin.ad.development.js +111 -39
- package/esm/veplayer.plugin.ad.production.css +1 -1
- package/esm/veplayer.plugin.ad.production.js +2 -2
- package/esm/veplayer.plugin.drm.development.js +12 -0
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +670 -193
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +1159 -369
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +13 -1
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +13 -1
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.shaka.development.js +12 -0
- package/esm/veplayer.plugin.shaka.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.abr.development.js +12 -0
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.ad.development.css +1 -1
- package/umd/veplayer.plugin.ad.development.js +111 -39
- package/umd/veplayer.plugin.ad.production.css +1 -1
- package/umd/veplayer.plugin.ad.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +12 -0
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +670 -193
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +1126 -336
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +13 -1
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +13 -1
- package/umd/veplayer.plugin.rtm.production.js +1 -1
- package/umd/veplayer.plugin.shaka.development.js +12 -0
- package/umd/veplayer.plugin.shaka.production.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.xgplayer-ads{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;display:none}.xgplayer-ad-start .xgplayer-ads{display:block}
|
|
1
|
+
.xgplayer-ads{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;display:none}.xgplayer-ad-start .xgplayer-ads{display:block}.xgplayer-ad-show-ui .xgplayer-replay{display:none!important}
|
|
2
2
|
.xgplayer.xgplayer-ads-playing .xgplayer-start,
|
|
3
3
|
.xgplayer.xgplayer-ads-playing .xgplayer-replay {
|
|
4
4
|
display: none;
|
|
@@ -2460,8 +2460,11 @@ var AD_START = "ad_start";
|
|
|
2460
2460
|
var AD_PLAY = "ad_play";
|
|
2461
2461
|
var AD_PAUSE = "ad_pause";
|
|
2462
2462
|
var AD_TIME_UPDATE = "ad_time_update";
|
|
2463
|
+
var AD_SKIPPED = "ad_skipped";
|
|
2464
|
+
var AD_ERROR = "ad_error";
|
|
2463
2465
|
var AD_COMPLETE = "ad_complete";
|
|
2464
2466
|
var AD_ALL_COMPLETED = "ad_all_completed";
|
|
2467
|
+
var IMA_SDK_LOAD_START = "ima_sdk_load_start";
|
|
2465
2468
|
var IMA_SDK_LOAD_SUCCESS = "ima_sdk_load_success";
|
|
2466
2469
|
var IMA_SDK_LOAD_ERROR = "ima_sdk_load_error";
|
|
2467
2470
|
var IMA_AD_LOADER_READY = "ima_ad_loader_ready";
|
|
@@ -4752,6 +4755,18 @@ var BasePlugin = /* @__PURE__ */ function() {
|
|
|
4752
4755
|
}
|
|
4753
4756
|
}
|
|
4754
4757
|
}
|
|
4758
|
+
}, {
|
|
4759
|
+
key: "defineMethod",
|
|
4760
|
+
value: function defineMethod(Obj, map3) {
|
|
4761
|
+
for (var key in map3) {
|
|
4762
|
+
if (Object.prototype.hasOwnProperty.call(map3, key) && typeof map3[key] === "function") {
|
|
4763
|
+
Object.defineProperty(Obj, key, {
|
|
4764
|
+
configurable: true,
|
|
4765
|
+
value: map3[key]
|
|
4766
|
+
});
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
}
|
|
4755
4770
|
}, {
|
|
4756
4771
|
key: "defaultConfig",
|
|
4757
4772
|
get: function get2() {
|
|
@@ -6711,7 +6726,7 @@ var Fullscreen = /* @__PURE__ */ function(_IconPlugin) {
|
|
|
6711
6726
|
}, {
|
|
6712
6727
|
key: "toggleFullScreen",
|
|
6713
6728
|
value: function toggleFullScreen(e) {
|
|
6714
|
-
if (e) {
|
|
6729
|
+
if (e instanceof Event) {
|
|
6715
6730
|
e.preventDefault();
|
|
6716
6731
|
e.stopPropagation();
|
|
6717
6732
|
}
|
|
@@ -7980,16 +7995,18 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
7980
7995
|
_this._handleAdError(ev.getError());
|
|
7981
7996
|
});
|
|
7982
7997
|
_defineProperty$2(_assertThisInitialized$1(_this), "_handleAdError", function(error) {
|
|
7983
|
-
var _this$adsManager3;
|
|
7998
|
+
var _this$adsManager3, _this$plugin, _this$plugin2;
|
|
7984
7999
|
logger$1.log("AdError", error);
|
|
7985
8000
|
_this.shouldBlockVideoContent = false;
|
|
7986
8001
|
_this.isLinearAdRunning = false;
|
|
7987
8002
|
(_this$adsManager3 = _this.adsManager) === null || _this$adsManager3 === void 0 ? void 0 : _this$adsManager3.destroy();
|
|
7988
|
-
_this.
|
|
8003
|
+
(_this$plugin = _this.plugin) === null || _this$plugin === void 0 ? void 0 : _this$plugin.emit(IMA_AD_ERROR, error);
|
|
8004
|
+
(_this$plugin2 = _this.plugin) === null || _this$plugin2 === void 0 ? void 0 : _this$plugin2.emit(AD_ERROR, error);
|
|
7989
8005
|
});
|
|
7990
8006
|
_defineProperty$2(_assertThisInitialized$1(_this), "onAdEvent", function(ev) {
|
|
7991
8007
|
var _assertThisInitialize2 = _assertThisInitialized$1(_this), player = _assertThisInitialize2.player;
|
|
7992
8008
|
var ad = ev === null || ev === void 0 ? void 0 : ev.getAd();
|
|
8009
|
+
var adData = (ev === null || ev === void 0 ? void 0 : ev.getAdData()) || (ad === null || ad === void 0 ? void 0 : ad.data);
|
|
7993
8010
|
var intervalTimer;
|
|
7994
8011
|
var printJsonLog = false;
|
|
7995
8012
|
switch (ev === null || ev === void 0 ? void 0 : ev.type) {
|
|
@@ -8000,7 +8017,7 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
8000
8017
|
break;
|
|
8001
8018
|
}
|
|
8002
8019
|
case google.ima.AdEvent.Type.LOADED: {
|
|
8003
|
-
var
|
|
8020
|
+
var _ref = adData || {}, adPodInfo = _ref.adPodInfo;
|
|
8004
8021
|
var isPreroll = (adPodInfo === null || adPodInfo === void 0 ? void 0 : adPodInfo.podIndex) === 0;
|
|
8005
8022
|
printJsonLog = true;
|
|
8006
8023
|
if (isPreroll) {
|
|
@@ -8011,8 +8028,13 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
8011
8028
|
_this.tryContentPlay();
|
|
8012
8029
|
}
|
|
8013
8030
|
}
|
|
8031
|
+
_this.emit(IMA_AD_LOADED, {
|
|
8032
|
+
ad,
|
|
8033
|
+
isPreroll
|
|
8034
|
+
});
|
|
8014
8035
|
_this.plugin.emit(IMA_AD_LOADED, {
|
|
8015
|
-
ad
|
|
8036
|
+
ad,
|
|
8037
|
+
isPreroll
|
|
8016
8038
|
});
|
|
8017
8039
|
break;
|
|
8018
8040
|
}
|
|
@@ -8061,8 +8083,14 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
8061
8083
|
});
|
|
8062
8084
|
break;
|
|
8063
8085
|
}
|
|
8086
|
+
case google.ima.AdEvent.Type.SKIPPED: {
|
|
8087
|
+
_this.plugin.emit(AD_SKIPPED, {
|
|
8088
|
+
ad
|
|
8089
|
+
});
|
|
8090
|
+
break;
|
|
8091
|
+
}
|
|
8064
8092
|
case google.ima.AdEvent.Type.AD_PROGRESS: {
|
|
8065
|
-
var _ev$
|
|
8093
|
+
var _ev$getAdData = ev.getAdData(), currentTime = _ev$getAdData.currentTime, duration = _ev$getAdData.duration;
|
|
8066
8094
|
Object.assign(_this.context, {
|
|
8067
8095
|
currentTime,
|
|
8068
8096
|
duration
|
|
@@ -8073,14 +8101,21 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
8073
8101
|
break;
|
|
8074
8102
|
}
|
|
8075
8103
|
case google.ima.AdEvent.Type.COMPLETE: {
|
|
8104
|
+
var _ref2 = adData || {}, _adPodInfo = _ref2.adPodInfo;
|
|
8105
|
+
var hasNextInPod = false;
|
|
8076
8106
|
if (ad !== null && ad !== void 0 && ad.isLinear()) {
|
|
8107
|
+
if (_adPodInfo) {
|
|
8108
|
+
hasNextInPod = _adPodInfo.adPosition < _adPodInfo.totalAds;
|
|
8109
|
+
}
|
|
8077
8110
|
clearInterval(intervalTimer);
|
|
8078
8111
|
}
|
|
8079
8112
|
_this.plugin.emit(IMA_AD_COMPLETE, {
|
|
8080
|
-
ad
|
|
8113
|
+
ad,
|
|
8114
|
+
hasNextInPod
|
|
8081
8115
|
});
|
|
8082
8116
|
_this.plugin.emit(AD_COMPLETE, {
|
|
8083
|
-
ad
|
|
8117
|
+
ad,
|
|
8118
|
+
hasNextInPod
|
|
8084
8119
|
});
|
|
8085
8120
|
break;
|
|
8086
8121
|
}
|
|
@@ -8119,30 +8154,31 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
8119
8154
|
case 0:
|
|
8120
8155
|
this.shouldBlockVideoContent = !!(this.config.adTagUrl || this.config.adsResponse || this.config.adsRequest);
|
|
8121
8156
|
_context.prev = 1;
|
|
8122
|
-
|
|
8157
|
+
this.emit(IMA_SDK_LOAD_START);
|
|
8158
|
+
_context.next = 5;
|
|
8123
8159
|
return this._loadIMASdk();
|
|
8124
|
-
case
|
|
8160
|
+
case 5:
|
|
8125
8161
|
this.emit(IMA_SDK_LOAD_SUCCESS);
|
|
8126
|
-
_context.next =
|
|
8162
|
+
_context.next = 14;
|
|
8127
8163
|
break;
|
|
8128
|
-
case
|
|
8129
|
-
_context.prev =
|
|
8164
|
+
case 8:
|
|
8165
|
+
_context.prev = 8;
|
|
8130
8166
|
_context.t0 = _context["catch"](1);
|
|
8131
8167
|
logger$1.error("google.ima sdk is not loaded, due to error", (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || _context.t0);
|
|
8132
8168
|
this.emit(IMA_SDK_LOAD_ERROR);
|
|
8133
8169
|
this.shouldBlockVideoContent = false;
|
|
8134
8170
|
return _context.abrupt("return");
|
|
8135
|
-
case
|
|
8171
|
+
case 14:
|
|
8136
8172
|
this._initConfig();
|
|
8137
8173
|
this._initMediaEvents();
|
|
8138
8174
|
this._initContainer();
|
|
8139
8175
|
this._initLoader();
|
|
8140
8176
|
this._initAdsRequest();
|
|
8141
|
-
case
|
|
8177
|
+
case 19:
|
|
8142
8178
|
case "end":
|
|
8143
8179
|
return _context.stop();
|
|
8144
8180
|
}
|
|
8145
|
-
}, _callee, this, [[1,
|
|
8181
|
+
}, _callee, this, [[1, 8]]);
|
|
8146
8182
|
}));
|
|
8147
8183
|
function init() {
|
|
8148
8184
|
return _init.apply(this, arguments);
|
|
@@ -8399,14 +8435,14 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
8399
8435
|
_context3.next = 4;
|
|
8400
8436
|
return Promise.all([autoplay ? index.video({
|
|
8401
8437
|
timeout
|
|
8402
|
-
}).then(function(
|
|
8403
|
-
var result =
|
|
8438
|
+
}).then(function(_ref3) {
|
|
8439
|
+
var result = _ref3.result;
|
|
8404
8440
|
return result;
|
|
8405
8441
|
}) : Promise.resolve(false), autoplay && this.player.config.autoplayMuted ? index.video({
|
|
8406
8442
|
timeout,
|
|
8407
8443
|
muted: true
|
|
8408
|
-
}).then(function(
|
|
8409
|
-
var result =
|
|
8444
|
+
}).then(function(_ref4) {
|
|
8445
|
+
var result = _ref4.result;
|
|
8410
8446
|
return result;
|
|
8411
8447
|
}) : Promise.resolve(false)]);
|
|
8412
8448
|
case 4:
|
|
@@ -8432,7 +8468,8 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
8432
8468
|
return ImaAdManager2;
|
|
8433
8469
|
}(BaseAdManager);
|
|
8434
8470
|
var AD_STATE_CLASS = {
|
|
8435
|
-
START: "xgplayer-ad-start"
|
|
8471
|
+
START: "xgplayer-ad-start",
|
|
8472
|
+
UI_SHOW: "xgplayer-ad-show-ui"
|
|
8436
8473
|
};
|
|
8437
8474
|
var AdPlayIcon = /* @__PURE__ */ function(_PlayIcon) {
|
|
8438
8475
|
_inherits$1(AdPlayIcon2, _PlayIcon);
|
|
@@ -8584,9 +8621,9 @@ var AdTimeIcon = /* @__PURE__ */ function(_TimeIcon) {
|
|
|
8584
8621
|
return AdTimeIcon2;
|
|
8585
8622
|
}(Time);
|
|
8586
8623
|
var AdUIManager = /* @__PURE__ */ function() {
|
|
8587
|
-
function AdUIManager2(config,
|
|
8588
|
-
var player = _ref.player, plugin2 = _ref.plugin;
|
|
8624
|
+
function AdUIManager2(config, options) {
|
|
8589
8625
|
_classCallCheck$2(this, AdUIManager2);
|
|
8626
|
+
var player = options.player, plugin2 = options.plugin;
|
|
8590
8627
|
this.player = player;
|
|
8591
8628
|
this.config = config;
|
|
8592
8629
|
this.adPlugin = plugin2;
|
|
@@ -8601,8 +8638,8 @@ var AdUIManager = /* @__PURE__ */ function() {
|
|
|
8601
8638
|
key: "init",
|
|
8602
8639
|
value: function init() {
|
|
8603
8640
|
var player = this.player, adUIPlugins = this.adUIPlugins, fragment = this.fragment, decoratedAdPluginList = this.decoratedAdPluginList;
|
|
8604
|
-
decoratedAdPluginList.forEach(function(
|
|
8605
|
-
var
|
|
8641
|
+
decoratedAdPluginList.forEach(function(_ref) {
|
|
8642
|
+
var _ref2 = _slicedToArray(_ref, 2), targetClass = _ref2[0], decoratorClass = _ref2[1];
|
|
8606
8643
|
var targetPlugin = player.getPlugin(targetClass.pluginName);
|
|
8607
8644
|
if (targetPlugin) {
|
|
8608
8645
|
var newDecoratorPlugin = null;
|
|
@@ -8615,6 +8652,15 @@ var AdUIManager = /* @__PURE__ */ function() {
|
|
|
8615
8652
|
}
|
|
8616
8653
|
});
|
|
8617
8654
|
}
|
|
8655
|
+
}, {
|
|
8656
|
+
key: "destroy",
|
|
8657
|
+
value: function destroy() {
|
|
8658
|
+
this.fragment = null;
|
|
8659
|
+
this.adUIPlugins = [];
|
|
8660
|
+
this.decoratedAdPluginList = [];
|
|
8661
|
+
this.adPlugin = null;
|
|
8662
|
+
this.player = null;
|
|
8663
|
+
}
|
|
8618
8664
|
}, {
|
|
8619
8665
|
key: "initEvents",
|
|
8620
8666
|
value: function initEvents() {
|
|
@@ -8630,7 +8676,16 @@ var AdUIManager = /* @__PURE__ */ function() {
|
|
|
8630
8676
|
adPlugin.on(AD_START, function() {
|
|
8631
8677
|
_this.showAdContainer();
|
|
8632
8678
|
});
|
|
8633
|
-
adPlugin.on(AD_COMPLETE, function() {
|
|
8679
|
+
adPlugin.on(AD_COMPLETE, function(_ref3) {
|
|
8680
|
+
var hasNextInPod = _ref3.hasNextInPod;
|
|
8681
|
+
if (!hasNextInPod) {
|
|
8682
|
+
_this.hideAdContainer();
|
|
8683
|
+
}
|
|
8684
|
+
});
|
|
8685
|
+
adPlugin.on(AD_SKIPPED, function() {
|
|
8686
|
+
_this.hideAdContainer();
|
|
8687
|
+
});
|
|
8688
|
+
adPlugin.on(AD_ERROR, function() {
|
|
8634
8689
|
_this.hideAdContainer();
|
|
8635
8690
|
});
|
|
8636
8691
|
}
|
|
@@ -8686,6 +8741,7 @@ var AdUIManager = /* @__PURE__ */ function() {
|
|
|
8686
8741
|
this.hideControls();
|
|
8687
8742
|
}
|
|
8688
8743
|
this.showAdContainer();
|
|
8744
|
+
player.addClass(AD_STATE_CLASS.UI_SHOW);
|
|
8689
8745
|
}
|
|
8690
8746
|
}, {
|
|
8691
8747
|
key: "hideAdUI",
|
|
@@ -8736,6 +8792,7 @@ var AdUIManager = /* @__PURE__ */ function() {
|
|
|
8736
8792
|
}, 10);
|
|
8737
8793
|
});
|
|
8738
8794
|
}
|
|
8795
|
+
player.removeClass(AD_STATE_CLASS.UI_SHOW);
|
|
8739
8796
|
}
|
|
8740
8797
|
}, {
|
|
8741
8798
|
key: "hideControls",
|
|
@@ -8812,7 +8869,7 @@ var AdsPlugin$1 = /* @__PURE__ */ function(_Plugin) {
|
|
|
8812
8869
|
_createClass$2(AdsPlugin2, [{
|
|
8813
8870
|
key: "version",
|
|
8814
8871
|
get: function get2() {
|
|
8815
|
-
return "3.0.20-alpha.
|
|
8872
|
+
return "3.0.20-alpha.8";
|
|
8816
8873
|
}
|
|
8817
8874
|
}, {
|
|
8818
8875
|
key: "paused",
|
|
@@ -8881,6 +8938,18 @@ var AdsPlugin$1 = /* @__PURE__ */ function(_Plugin) {
|
|
|
8881
8938
|
config: this.config.ima,
|
|
8882
8939
|
displayContainer: this.root
|
|
8883
8940
|
});
|
|
8941
|
+
this.csManager.once(IMA_SDK_LOAD_START, function() {
|
|
8942
|
+
_this.uiManager.showAdContainer();
|
|
8943
|
+
});
|
|
8944
|
+
this.csManager.on(IMA_SDK_LOAD_ERROR, function() {
|
|
8945
|
+
_this.uiManager.hideAdContainer();
|
|
8946
|
+
});
|
|
8947
|
+
this.csManager.once(IMA_AD_LOADED, function(_ref) {
|
|
8948
|
+
var isPreroll = _ref.isPreroll;
|
|
8949
|
+
if (!isPreroll) {
|
|
8950
|
+
_this.uiManager.hideAdContainer();
|
|
8951
|
+
}
|
|
8952
|
+
});
|
|
8884
8953
|
this.csManager.once(IMA_READY_TO_PLAY, function() {
|
|
8885
8954
|
var _this$initPromise;
|
|
8886
8955
|
(_this$initPromise = _this.initPromise) === null || _this$initPromise === void 0 ? void 0 : _this$initPromise.resolve();
|
|
@@ -8920,8 +8989,10 @@ var AdsPlugin$1 = /* @__PURE__ */ function(_Plugin) {
|
|
|
8920
8989
|
}, {
|
|
8921
8990
|
key: "destroy",
|
|
8922
8991
|
value: function destroy() {
|
|
8923
|
-
var _this$csManager9;
|
|
8992
|
+
var _this$csManager9, _this$uiManager;
|
|
8993
|
+
this.offAll();
|
|
8924
8994
|
(_this$csManager9 = this.csManager) === null || _this$csManager9 === void 0 ? void 0 : _this$csManager9.destroy();
|
|
8995
|
+
(_this$uiManager = this.uiManager) === null || _this$uiManager === void 0 ? void 0 : _this$uiManager.destroy();
|
|
8925
8996
|
}
|
|
8926
8997
|
}, {
|
|
8927
8998
|
key: "reset",
|
|
@@ -12976,7 +13047,7 @@ var sort$1 = sort$2;
|
|
|
12976
13047
|
var sort2 = sort$1;
|
|
12977
13048
|
var _sortInstanceProperty = /* @__PURE__ */ getDefaultExportFromCjs(sort2);
|
|
12978
13049
|
function scheduleToVmap(schedule) {
|
|
12979
|
-
var _context;
|
|
13050
|
+
var _context, _context2;
|
|
12980
13051
|
if (!schedule || !schedule.length) {
|
|
12981
13052
|
return;
|
|
12982
13053
|
}
|
|
@@ -12986,7 +13057,10 @@ function scheduleToVmap(schedule) {
|
|
|
12986
13057
|
var midRollCount = 0;
|
|
12987
13058
|
var curMidRoll;
|
|
12988
13059
|
var curMidRollAdsCount = 0;
|
|
12989
|
-
_forEachInstanceProperty(_context = _sortInstanceProperty(schedule).call(schedule, function(
|
|
13060
|
+
_forEachInstanceProperty(_context = _sortInstanceProperty(_context2 = _filterInstanceProperty(schedule).call(schedule, function(_ref) {
|
|
13061
|
+
var offset = _ref.offset;
|
|
13062
|
+
return offset === "pre" || offset === "post" || /^(\d\d):([0-5]\d):([0-5]\d)(.\d\d\d)?$/.test(offset);
|
|
13063
|
+
})).call(_context2, function(a, b) {
|
|
12990
13064
|
if (a.offset === "pre" || b.offset === "post") {
|
|
12991
13065
|
return -1;
|
|
12992
13066
|
}
|
|
@@ -12994,9 +13068,9 @@ function scheduleToVmap(schedule) {
|
|
|
12994
13068
|
return 1;
|
|
12995
13069
|
}
|
|
12996
13070
|
return Date.parse("2024-01-01T".concat(a.offset)) < Date.parse("2024-01-01T".concat(b.offset)) ? -1 : 1;
|
|
12997
|
-
})).call(_context, function(
|
|
12998
|
-
var
|
|
12999
|
-
var offset =
|
|
13071
|
+
})).call(_context, function(_ref2) {
|
|
13072
|
+
var _context3;
|
|
13073
|
+
var offset = _ref2.offset, type = _ref2.type, tag = _ref2.tag;
|
|
13000
13074
|
var timeOffset;
|
|
13001
13075
|
var breakId;
|
|
13002
13076
|
switch (offset) {
|
|
@@ -13026,7 +13100,7 @@ function scheduleToVmap(schedule) {
|
|
|
13026
13100
|
adBreakElement.setAttribute("breakType", type || "linear");
|
|
13027
13101
|
root[0].appendChild(adBreakElement);
|
|
13028
13102
|
var adSourceElement = vmapXml.createElement("vmap:AdSource");
|
|
13029
|
-
adSourceElement.setAttribute("id", _concatInstanceProperty(
|
|
13103
|
+
adSourceElement.setAttribute("id", _concatInstanceProperty(_context3 = "".concat(breakId, "-ad-")).call(_context3, curMidRollAdsCount));
|
|
13030
13104
|
adSourceElement.setAttribute("allowMultipleAds", "true");
|
|
13031
13105
|
adSourceElement.setAttribute("followRedirects", "true");
|
|
13032
13106
|
adBreakElement.appendChild(adSourceElement);
|
|
@@ -13060,10 +13134,10 @@ var AdsPlugin = /* @__PURE__ */ function(_XGAdsPlugin) {
|
|
|
13060
13134
|
var ad = _ref.ad;
|
|
13061
13135
|
if (isPrerollAd(ad)) {
|
|
13062
13136
|
var _this$player$plugins$, _this$player$plugins$2;
|
|
13063
|
-
(_this$player$plugins$ = (_this$player$plugins$2 = _this
|
|
13137
|
+
(_this$player$plugins$ = _this.player.plugins.autoplayplugin) === null || _this$player$plugins$ === void 0 || (_this$player$plugins$2 = _this$player$plugins$.handleAutoplayStart) === null || _this$player$plugins$2 === void 0 ? void 0 : _this$player$plugins$2.call(_this$player$plugins$);
|
|
13064
13138
|
_this.player.once(VOLUME_CHANGE, function() {
|
|
13065
13139
|
var _this$player$plugins$3, _this$player$plugins$4;
|
|
13066
|
-
(_this$player$plugins$3 = (_this$player$plugins$4 = _this
|
|
13140
|
+
(_this$player$plugins$3 = _this.player.plugins.autoplayplugin) === null || _this$player$plugins$3 === void 0 || (_this$player$plugins$4 = _this$player$plugins$3.initState) === null || _this$player$plugins$4 === void 0 ? void 0 : _this$player$plugins$4.call(_this$player$plugins$3);
|
|
13067
13141
|
});
|
|
13068
13142
|
}
|
|
13069
13143
|
});
|
|
@@ -13104,9 +13178,7 @@ var AdsPlugin = /* @__PURE__ */ function(_XGAdsPlugin) {
|
|
|
13104
13178
|
if (!((_this$config$ima2 = this.config.ima) !== null && _this$config$ima2 !== void 0 && _this$config$ima2.adTagUrl) && (_this$config$ima3 = this.config.ima) !== null && _this$config$ima3 !== void 0 && (_this$config$ima3 = _this$config$ima3.schedule) !== null && _this$config$ima3 !== void 0 && _this$config$ima3.length) {
|
|
13105
13179
|
this.config.ima.adsResponse = scheduleToVmap(this.config.ima.schedule);
|
|
13106
13180
|
}
|
|
13107
|
-
|
|
13108
|
-
this.player.once(AD_PLAY, this._handlePrerollMuted);
|
|
13109
|
-
}
|
|
13181
|
+
this.player.once(AD_PLAY, this._handlePrerollMuted);
|
|
13110
13182
|
}
|
|
13111
13183
|
}], [{
|
|
13112
13184
|
key: "pluginName",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.xgplayer-ads{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;display:none}.xgplayer-ad-start .xgplayer-ads{display:block}.xgplayer.xgplayer-ads-playing .xgplayer-start,.xgplayer.xgplayer-ads-playing .xgplayer-replay{display:none}.xgplayer.xgplayer-ads-playing .xgplayer-ads{z-index:6}.xgplayer.xgplayer-ads-playing.xgplayer-is-enter .xgplayer-enter{display:none}
|
|
1
|
+
.xgplayer-ads{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;display:none}.xgplayer-ad-start .xgplayer-ads{display:block}.xgplayer-ad-show-ui .xgplayer-replay{display:none!important}.xgplayer.xgplayer-ads-playing .xgplayer-start,.xgplayer.xgplayer-ads-playing .xgplayer-replay{display:none}.xgplayer.xgplayer-ads-playing .xgplayer-ads{z-index:6}.xgplayer.xgplayer-ads-playing.xgplayer-is-enter .xgplayer-enter{display:none}
|