@volcengine/veplayer-plugin 2.8.2 → 2.9.0-rc.1
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.d.ts +1 -0
- package/esm/index.development.js +65709 -69231
- 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.hlsjs.development.js +29886 -33779
- package/esm/veplayer.plugin.hlsjs.production.js +1 -1
- package/package.json +1 -1
- package/umd/index.d.ts +1 -0
- package/umd/veplayer.plugin.ad.development.js +63 -32
- package/umd/veplayer.plugin.ad.production.js +1 -1
- package/umd/veplayer.plugin.hlsjs.development.js +29869 -33762
- package/umd/veplayer.plugin.hlsjs.production.js +1 -1
package/package.json
CHANGED
package/umd/index.d.ts
CHANGED
|
@@ -5644,6 +5644,12 @@ var __publicField = (obj, key, value) => {
|
|
|
5644
5644
|
break;
|
|
5645
5645
|
}
|
|
5646
5646
|
case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED: {
|
|
5647
|
+
if (_this._resumeCallback) {
|
|
5648
|
+
var _this$_resumeCallback = _this._resumeCallback(), canResume = _this$_resumeCallback.canResume;
|
|
5649
|
+
if (!canResume) {
|
|
5650
|
+
break;
|
|
5651
|
+
}
|
|
5652
|
+
}
|
|
5647
5653
|
_this._resumeContent();
|
|
5648
5654
|
_this.emit(IMA_CONTENT_RESUME_REQUESTED, {
|
|
5649
5655
|
ad
|
|
@@ -5745,6 +5751,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5745
5751
|
_this.displayContainer = null;
|
|
5746
5752
|
_this.adsLoader = null;
|
|
5747
5753
|
_this.adsManager = null;
|
|
5754
|
+
_this._resumeCallback = null;
|
|
5748
5755
|
return _this;
|
|
5749
5756
|
}
|
|
5750
5757
|
_createClass$2(ImaAdManager2, [{
|
|
@@ -5793,9 +5800,15 @@ var __publicField = (obj, key, value) => {
|
|
|
5793
5800
|
value: function destroy() {
|
|
5794
5801
|
_get$1(_getPrototypeOf$1(ImaAdManager2.prototype), "destroy", this).call(this);
|
|
5795
5802
|
this.reset();
|
|
5803
|
+
this.displayContainer.destroy();
|
|
5796
5804
|
this._removeMediaEvents();
|
|
5797
5805
|
this._destroyLoader();
|
|
5798
5806
|
}
|
|
5807
|
+
}, {
|
|
5808
|
+
key: "resumeCallback",
|
|
5809
|
+
set: function set(resumeCallbackFunc) {
|
|
5810
|
+
this._resumeCallback = resumeCallbackFunc;
|
|
5811
|
+
}
|
|
5799
5812
|
}, {
|
|
5800
5813
|
key: "_initConfig",
|
|
5801
5814
|
value: function _initConfig() {
|
|
@@ -6503,7 +6516,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6503
6516
|
_createClass$2(AdsPlugin2, [{
|
|
6504
6517
|
key: "version",
|
|
6505
6518
|
get: function get() {
|
|
6506
|
-
return "3.0.23-rc.
|
|
6519
|
+
return "3.0.23-rc.5";
|
|
6507
6520
|
}
|
|
6508
6521
|
}, {
|
|
6509
6522
|
key: "paused",
|
|
@@ -6565,37 +6578,55 @@ var __publicField = (obj, key, value) => {
|
|
|
6565
6578
|
}
|
|
6566
6579
|
}, {
|
|
6567
6580
|
key: "_initImaAd",
|
|
6568
|
-
value: function
|
|
6569
|
-
var
|
|
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
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6581
|
+
value: function() {
|
|
6582
|
+
var _initImaAd2 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
6583
|
+
var _this = this;
|
|
6584
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6585
|
+
while (1)
|
|
6586
|
+
switch (_context.prev = _context.next) {
|
|
6587
|
+
case 0:
|
|
6588
|
+
this.csManager = new ImaAdManager({
|
|
6589
|
+
plugin: this,
|
|
6590
|
+
config: this.config.ima,
|
|
6591
|
+
displayContainer: this.root
|
|
6592
|
+
});
|
|
6593
|
+
this.csManager.once(IMA_SDK_LOAD_START, function() {
|
|
6594
|
+
_this.uiManager.showAdContainer();
|
|
6595
|
+
});
|
|
6596
|
+
this.csManager.on(IMA_SDK_LOAD_ERROR, function() {
|
|
6597
|
+
_this.uiManager.hideAdContainer();
|
|
6598
|
+
});
|
|
6599
|
+
this.csManager.once(IMA_AD_LOADED, function(_ref) {
|
|
6600
|
+
var isPreroll = _ref.isPreroll;
|
|
6601
|
+
if (!isPreroll) {
|
|
6602
|
+
_this.uiManager.hideAdContainer();
|
|
6603
|
+
}
|
|
6604
|
+
});
|
|
6605
|
+
this.csManager.once(IMA_READY_TO_PLAY, function() {
|
|
6606
|
+
var _this$initPromise;
|
|
6607
|
+
(_this$initPromise = _this.initPromise) === null || _this$initPromise === void 0 ? void 0 : _this$initPromise.resolve();
|
|
6608
|
+
});
|
|
6609
|
+
this.csManager.on(IMA_CONTENT_PAUSE_REQUESTED, function() {
|
|
6610
|
+
_this.uiManager.showAdUI();
|
|
6611
|
+
});
|
|
6612
|
+
this.csManager.on(IMA_CONTENT_RESUME_REQUESTED, function() {
|
|
6613
|
+
_this.uiManager.hideAdUI();
|
|
6614
|
+
});
|
|
6615
|
+
_context.next = 9;
|
|
6616
|
+
return this.csManager.init();
|
|
6617
|
+
case 9:
|
|
6618
|
+
return _context.abrupt("return", this.csManager);
|
|
6619
|
+
case 10:
|
|
6620
|
+
case "end":
|
|
6621
|
+
return _context.stop();
|
|
6622
|
+
}
|
|
6623
|
+
}, _callee, this);
|
|
6624
|
+
}));
|
|
6625
|
+
function _initImaAd() {
|
|
6626
|
+
return _initImaAd2.apply(this, arguments);
|
|
6627
|
+
}
|
|
6628
|
+
return _initImaAd;
|
|
6629
|
+
}()
|
|
6599
6630
|
}, {
|
|
6600
6631
|
key: "requestAds",
|
|
6601
6632
|
value: function requestAds() {
|