@volcengine/veplayer-plugin 2.8.1 → 2.9.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.js +65686 -69169
- package/esm/index.production.js +7 -7
- package/esm/veplayer.plugin.ad.development.js +63 -32
- package/esm/veplayer.plugin.ad.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +62 -23
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hlsjs.development.js +29886 -33779
- package/esm/veplayer.plugin.hlsjs.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.ad.development.js +63 -32
- package/umd/veplayer.plugin.ad.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +62 -23
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hlsjs.development.js +29869 -33762
- package/umd/veplayer.plugin.hlsjs.production.js +1 -1
|
@@ -5640,6 +5640,12 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
5640
5640
|
break;
|
|
5641
5641
|
}
|
|
5642
5642
|
case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED: {
|
|
5643
|
+
if (_this._resumeCallback) {
|
|
5644
|
+
var _this$_resumeCallback = _this._resumeCallback(), canResume = _this$_resumeCallback.canResume;
|
|
5645
|
+
if (!canResume) {
|
|
5646
|
+
break;
|
|
5647
|
+
}
|
|
5648
|
+
}
|
|
5643
5649
|
_this._resumeContent();
|
|
5644
5650
|
_this.emit(IMA_CONTENT_RESUME_REQUESTED, {
|
|
5645
5651
|
ad
|
|
@@ -5741,6 +5747,7 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
5741
5747
|
_this.displayContainer = null;
|
|
5742
5748
|
_this.adsLoader = null;
|
|
5743
5749
|
_this.adsManager = null;
|
|
5750
|
+
_this._resumeCallback = null;
|
|
5744
5751
|
return _this;
|
|
5745
5752
|
}
|
|
5746
5753
|
_createClass$2(ImaAdManager2, [{
|
|
@@ -5789,9 +5796,15 @@ var ImaAdManager = /* @__PURE__ */ function(_BaseAdManager) {
|
|
|
5789
5796
|
value: function destroy() {
|
|
5790
5797
|
_get$1(_getPrototypeOf$1(ImaAdManager2.prototype), "destroy", this).call(this);
|
|
5791
5798
|
this.reset();
|
|
5799
|
+
this.displayContainer.destroy();
|
|
5792
5800
|
this._removeMediaEvents();
|
|
5793
5801
|
this._destroyLoader();
|
|
5794
5802
|
}
|
|
5803
|
+
}, {
|
|
5804
|
+
key: "resumeCallback",
|
|
5805
|
+
set: function set(resumeCallbackFunc) {
|
|
5806
|
+
this._resumeCallback = resumeCallbackFunc;
|
|
5807
|
+
}
|
|
5795
5808
|
}, {
|
|
5796
5809
|
key: "_initConfig",
|
|
5797
5810
|
value: function _initConfig() {
|
|
@@ -6499,7 +6512,7 @@ var AdsPlugin$1 = /* @__PURE__ */ function(_Plugin) {
|
|
|
6499
6512
|
_createClass$2(AdsPlugin2, [{
|
|
6500
6513
|
key: "version",
|
|
6501
6514
|
get: function get() {
|
|
6502
|
-
return "3.0.23-rc.
|
|
6515
|
+
return "3.0.23-rc.5";
|
|
6503
6516
|
}
|
|
6504
6517
|
}, {
|
|
6505
6518
|
key: "paused",
|
|
@@ -6561,37 +6574,55 @@ var AdsPlugin$1 = /* @__PURE__ */ function(_Plugin) {
|
|
|
6561
6574
|
}
|
|
6562
6575
|
}, {
|
|
6563
6576
|
key: "_initImaAd",
|
|
6564
|
-
value: function
|
|
6565
|
-
var
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6577
|
+
value: function() {
|
|
6578
|
+
var _initImaAd2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
6579
|
+
var _this = this;
|
|
6580
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6581
|
+
while (1)
|
|
6582
|
+
switch (_context.prev = _context.next) {
|
|
6583
|
+
case 0:
|
|
6584
|
+
this.csManager = new ImaAdManager({
|
|
6585
|
+
plugin: this,
|
|
6586
|
+
config: this.config.ima,
|
|
6587
|
+
displayContainer: this.root
|
|
6588
|
+
});
|
|
6589
|
+
this.csManager.once(IMA_SDK_LOAD_START, function() {
|
|
6590
|
+
_this.uiManager.showAdContainer();
|
|
6591
|
+
});
|
|
6592
|
+
this.csManager.on(IMA_SDK_LOAD_ERROR, function() {
|
|
6593
|
+
_this.uiManager.hideAdContainer();
|
|
6594
|
+
});
|
|
6595
|
+
this.csManager.once(IMA_AD_LOADED, function(_ref) {
|
|
6596
|
+
var isPreroll = _ref.isPreroll;
|
|
6597
|
+
if (!isPreroll) {
|
|
6598
|
+
_this.uiManager.hideAdContainer();
|
|
6599
|
+
}
|
|
6600
|
+
});
|
|
6601
|
+
this.csManager.once(IMA_READY_TO_PLAY, function() {
|
|
6602
|
+
var _this$initPromise;
|
|
6603
|
+
(_this$initPromise = _this.initPromise) === null || _this$initPromise === void 0 ? void 0 : _this$initPromise.resolve();
|
|
6604
|
+
});
|
|
6605
|
+
this.csManager.on(IMA_CONTENT_PAUSE_REQUESTED, function() {
|
|
6606
|
+
_this.uiManager.showAdUI();
|
|
6607
|
+
});
|
|
6608
|
+
this.csManager.on(IMA_CONTENT_RESUME_REQUESTED, function() {
|
|
6609
|
+
_this.uiManager.hideAdUI();
|
|
6610
|
+
});
|
|
6611
|
+
_context.next = 9;
|
|
6612
|
+
return this.csManager.init();
|
|
6613
|
+
case 9:
|
|
6614
|
+
return _context.abrupt("return", this.csManager);
|
|
6615
|
+
case 10:
|
|
6616
|
+
case "end":
|
|
6617
|
+
return _context.stop();
|
|
6618
|
+
}
|
|
6619
|
+
}, _callee, this);
|
|
6620
|
+
}));
|
|
6621
|
+
function _initImaAd() {
|
|
6622
|
+
return _initImaAd2.apply(this, arguments);
|
|
6623
|
+
}
|
|
6624
|
+
return _initImaAd;
|
|
6625
|
+
}()
|
|
6595
6626
|
}, {
|
|
6596
6627
|
key: "requestAds",
|
|
6597
6628
|
value: function requestAds() {
|