@volcengine/veplayer-plugin 2.4.3-rc.0 → 2.4.5-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 +499 -1891
- package/esm/index.production.js +1 -1
- package/esm/veplayer.plugin.abr.development.js +3 -71
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.drm.development.js +3 -71
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +196 -727
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +304 -1233
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +5 -73
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +4 -72
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.shaka.development.js +4 -72
- package/esm/veplayer.plugin.shaka.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.abr.development.js +3 -71
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +3 -71
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +196 -727
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +304 -1233
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +5 -73
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +4 -72
- package/umd/veplayer.plugin.rtm.production.js +1 -1
- package/umd/veplayer.plugin.shaka.development.js +4 -72
- package/umd/veplayer.plugin.shaka.production.js +1 -1
|
@@ -1530,7 +1530,7 @@ util.getCurrentTimeByOffset = function(offsetTime, segments) {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
return offsetTime;
|
|
1532
1532
|
};
|
|
1533
|
-
var version = "3.0.
|
|
1533
|
+
var version = "3.0.19-rc.0";
|
|
1534
1534
|
var ERROR_MAP = {
|
|
1535
1535
|
1: 5101,
|
|
1536
1536
|
2: 5102,
|
|
@@ -1638,7 +1638,8 @@ function hook(hookName, handler) {
|
|
|
1638
1638
|
}
|
|
1639
1639
|
if (this.__hooks && this.__hooks[hookName]) {
|
|
1640
1640
|
try {
|
|
1641
|
-
var
|
|
1641
|
+
var _this$__hooks$hookNam;
|
|
1642
|
+
var preRet = (_this$__hooks$hookNam = this.__hooks[hookName]).call.apply(_this$__hooks$hookNam, [this, this].concat(Array.prototype.slice.call(arguments)));
|
|
1642
1643
|
if (preRet) {
|
|
1643
1644
|
if (preRet.then) {
|
|
1644
1645
|
preRet.then(function(isContinue) {
|
|
@@ -1663,19 +1664,6 @@ function hook(hookName, handler) {
|
|
|
1663
1664
|
}
|
|
1664
1665
|
}.bind(this);
|
|
1665
1666
|
}
|
|
1666
|
-
function findHookIndex(hookName, handler) {
|
|
1667
|
-
var __hooks = this.__hooks;
|
|
1668
|
-
if (!__hooks || !Array.isArray(__hooks[hookName])) {
|
|
1669
|
-
return -1;
|
|
1670
|
-
}
|
|
1671
|
-
var hookHandlers = __hooks[hookName];
|
|
1672
|
-
for (var i = 0; i < hookHandlers.length; i++) {
|
|
1673
|
-
if (hookHandlers[i] === handler) {
|
|
1674
|
-
return i;
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
return -1;
|
|
1678
|
-
}
|
|
1679
1667
|
function useHooks(hookName, handler) {
|
|
1680
1668
|
var __hooks = this.__hooks;
|
|
1681
1669
|
if (!__hooks) {
|
|
@@ -1685,12 +1673,7 @@ function useHooks(hookName, handler) {
|
|
|
1685
1673
|
console.warn("has no supported hook which name [".concat(hookName, "]"));
|
|
1686
1674
|
return false;
|
|
1687
1675
|
}
|
|
1688
|
-
|
|
1689
|
-
__hooks[hookName] = [];
|
|
1690
|
-
}
|
|
1691
|
-
if (findHookIndex.call(this, hookName, handler) === -1) {
|
|
1692
|
-
__hooks[hookName].push(handler);
|
|
1693
|
-
}
|
|
1676
|
+
__hooks && (__hooks[hookName] = handler);
|
|
1694
1677
|
return true;
|
|
1695
1678
|
}
|
|
1696
1679
|
function removeHooks(hookName, handler) {
|
|
@@ -1698,13 +1681,6 @@ function removeHooks(hookName, handler) {
|
|
|
1698
1681
|
if (!__hooks) {
|
|
1699
1682
|
return;
|
|
1700
1683
|
}
|
|
1701
|
-
if (Array.isArray(__hooks[hookName])) {
|
|
1702
|
-
var hooks = __hooks[hookName];
|
|
1703
|
-
var index = findHookIndex.call(this, hookName, handler);
|
|
1704
|
-
if (index !== -1) {
|
|
1705
|
-
hooks.splice(index, 1);
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
1684
|
delete __hooks[hookName];
|
|
1709
1685
|
}
|
|
1710
1686
|
function hooksDescriptor(instance) {
|
|
@@ -1726,38 +1702,6 @@ function hooksDescriptor(instance) {
|
|
|
1726
1702
|
function delHooksDescriptor(instance) {
|
|
1727
1703
|
instance.__hooks = null;
|
|
1728
1704
|
}
|
|
1729
|
-
function runHooks(obj, hookName, handler) {
|
|
1730
|
-
for (var _len5 = arguments.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
|
|
1731
|
-
args[_key5 - 3] = arguments[_key5];
|
|
1732
|
-
}
|
|
1733
|
-
if (obj.__hooks && Array.isArray(obj.__hooks[hookName])) {
|
|
1734
|
-
var hooks = obj.__hooks[hookName];
|
|
1735
|
-
var index = -1;
|
|
1736
|
-
var runHooksRecursive = function runHooksRecursive2(obj2, hookName2, handler2) {
|
|
1737
|
-
for (var _len6 = arguments.length, args2 = new Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) {
|
|
1738
|
-
args2[_key6 - 3] = arguments[_key6];
|
|
1739
|
-
}
|
|
1740
|
-
index++;
|
|
1741
|
-
if (hooks.length === 0 || index === hooks.length) {
|
|
1742
|
-
return handler2.call.apply(handler2, [obj2, obj2].concat(args2));
|
|
1743
|
-
}
|
|
1744
|
-
var hook2 = hooks[index];
|
|
1745
|
-
var ret = hook2.call.apply(hook2, [obj2, obj2].concat(args2));
|
|
1746
|
-
if (ret && ret.then) {
|
|
1747
|
-
return ret.then(function(data) {
|
|
1748
|
-
return data === false ? null : runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
|
|
1749
|
-
}).catch(function(e) {
|
|
1750
|
-
console.warn("[runHooks]".concat(hookName2, " reject"), e.message);
|
|
1751
|
-
});
|
|
1752
|
-
} else if (ret !== false) {
|
|
1753
|
-
return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
|
|
1754
|
-
}
|
|
1755
|
-
};
|
|
1756
|
-
return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
|
|
1757
|
-
} else {
|
|
1758
|
-
return handler.call.apply(handler, [obj, obj].concat(args));
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
1705
|
function showErrorMsg(pluginName, msg) {
|
|
1762
1706
|
XG_DEBUG.logError("[".concat(pluginName, "] event or callback cant be undefined or null when call ").concat(msg));
|
|
1763
1707
|
}
|
|
@@ -1997,18 +1941,6 @@ var BasePlugin = /* @__PURE__ */ function() {
|
|
|
1997
1941
|
}
|
|
1998
1942
|
}
|
|
1999
1943
|
}
|
|
2000
|
-
}, {
|
|
2001
|
-
key: "defineMethod",
|
|
2002
|
-
value: function defineMethod(Obj, map) {
|
|
2003
|
-
for (var key in map) {
|
|
2004
|
-
if (Object.prototype.hasOwnProperty.call(map, key) && typeof map[key] === "function") {
|
|
2005
|
-
Object.defineProperty(Obj, key, {
|
|
2006
|
-
configurable: true,
|
|
2007
|
-
value: map[key]
|
|
2008
|
-
});
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
1944
|
}, {
|
|
2013
1945
|
key: "defaultConfig",
|
|
2014
1946
|
get: function get() {
|