@volcengine/veplayer-plugin 2.4.3-rc.1 → 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.
Files changed (31) hide show
  1. package/esm/index.development.js +530 -1967
  2. package/esm/index.production.js +1 -1
  3. package/esm/veplayer.plugin.abr.development.js +3 -71
  4. package/esm/veplayer.plugin.abr.production.js +1 -1
  5. package/esm/veplayer.plugin.drm.development.js +3 -71
  6. package/esm/veplayer.plugin.drm.production.js +1 -1
  7. package/esm/veplayer.plugin.flv.development.js +196 -727
  8. package/esm/veplayer.plugin.flv.production.js +1 -1
  9. package/esm/veplayer.plugin.hls.development.js +368 -1342
  10. package/esm/veplayer.plugin.hls.production.js +1 -1
  11. package/esm/veplayer.plugin.mp4.development.js +5 -73
  12. package/esm/veplayer.plugin.mp4.production.js +1 -1
  13. package/esm/veplayer.plugin.rtm.development.js +4 -72
  14. package/esm/veplayer.plugin.rtm.production.js +1 -1
  15. package/esm/veplayer.plugin.shaka.development.js +4 -72
  16. package/esm/veplayer.plugin.shaka.production.js +1 -1
  17. package/package.json +1 -1
  18. package/umd/veplayer.plugin.abr.development.js +3 -71
  19. package/umd/veplayer.plugin.abr.production.js +1 -1
  20. package/umd/veplayer.plugin.drm.development.js +3 -71
  21. package/umd/veplayer.plugin.drm.production.js +1 -1
  22. package/umd/veplayer.plugin.flv.development.js +196 -727
  23. package/umd/veplayer.plugin.flv.production.js +1 -1
  24. package/umd/veplayer.plugin.hls.development.js +335 -1309
  25. package/umd/veplayer.plugin.hls.production.js +1 -1
  26. package/umd/veplayer.plugin.mp4.development.js +5 -73
  27. package/umd/veplayer.plugin.mp4.production.js +1 -1
  28. package/umd/veplayer.plugin.rtm.development.js +4 -72
  29. package/umd/veplayer.plugin.rtm.production.js +1 -1
  30. package/umd/veplayer.plugin.shaka.development.js +4 -72
  31. package/umd/veplayer.plugin.shaka.production.js +1 -1
@@ -1534,7 +1534,7 @@
1534
1534
  }
1535
1535
  return offsetTime;
1536
1536
  };
1537
- var version = "3.0.20-rc.6";
1537
+ var version = "3.0.19-rc.0";
1538
1538
  var ERROR_MAP = {
1539
1539
  1: 5101,
1540
1540
  2: 5102,
@@ -1642,7 +1642,8 @@
1642
1642
  }
1643
1643
  if (this.__hooks && this.__hooks[hookName]) {
1644
1644
  try {
1645
- var preRet = runHooks(this, hookName, handler);
1645
+ var _this$__hooks$hookNam;
1646
+ var preRet = (_this$__hooks$hookNam = this.__hooks[hookName]).call.apply(_this$__hooks$hookNam, [this, this].concat(Array.prototype.slice.call(arguments)));
1646
1647
  if (preRet) {
1647
1648
  if (preRet.then) {
1648
1649
  preRet.then(function(isContinue) {
@@ -1667,19 +1668,6 @@
1667
1668
  }
1668
1669
  }.bind(this);
1669
1670
  }
1670
- function findHookIndex(hookName, handler) {
1671
- var __hooks = this.__hooks;
1672
- if (!__hooks || !Array.isArray(__hooks[hookName])) {
1673
- return -1;
1674
- }
1675
- var hookHandlers = __hooks[hookName];
1676
- for (var i = 0; i < hookHandlers.length; i++) {
1677
- if (hookHandlers[i] === handler) {
1678
- return i;
1679
- }
1680
- }
1681
- return -1;
1682
- }
1683
1671
  function useHooks(hookName, handler) {
1684
1672
  var __hooks = this.__hooks;
1685
1673
  if (!__hooks) {
@@ -1689,12 +1677,7 @@
1689
1677
  console.warn("has no supported hook which name [".concat(hookName, "]"));
1690
1678
  return false;
1691
1679
  }
1692
- if (!Array.isArray(__hooks[hookName])) {
1693
- __hooks[hookName] = [];
1694
- }
1695
- if (findHookIndex.call(this, hookName, handler) === -1) {
1696
- __hooks[hookName].push(handler);
1697
- }
1680
+ __hooks && (__hooks[hookName] = handler);
1698
1681
  return true;
1699
1682
  }
1700
1683
  function removeHooks(hookName, handler) {
@@ -1702,13 +1685,6 @@
1702
1685
  if (!__hooks) {
1703
1686
  return;
1704
1687
  }
1705
- if (Array.isArray(__hooks[hookName])) {
1706
- var hooks = __hooks[hookName];
1707
- var index = findHookIndex.call(this, hookName, handler);
1708
- if (index !== -1) {
1709
- hooks.splice(index, 1);
1710
- }
1711
- }
1712
1688
  delete __hooks[hookName];
1713
1689
  }
1714
1690
  function hooksDescriptor(instance) {
@@ -1730,38 +1706,6 @@
1730
1706
  function delHooksDescriptor(instance) {
1731
1707
  instance.__hooks = null;
1732
1708
  }
1733
- function runHooks(obj, hookName, handler) {
1734
- for (var _len5 = arguments.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
1735
- args[_key5 - 3] = arguments[_key5];
1736
- }
1737
- if (obj.__hooks && Array.isArray(obj.__hooks[hookName])) {
1738
- var hooks = obj.__hooks[hookName];
1739
- var index = -1;
1740
- var runHooksRecursive = function runHooksRecursive2(obj2, hookName2, handler2) {
1741
- for (var _len6 = arguments.length, args2 = new Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) {
1742
- args2[_key6 - 3] = arguments[_key6];
1743
- }
1744
- index++;
1745
- if (hooks.length === 0 || index === hooks.length) {
1746
- return handler2.call.apply(handler2, [obj2, obj2].concat(args2));
1747
- }
1748
- var hook2 = hooks[index];
1749
- var ret = hook2.call.apply(hook2, [obj2, obj2].concat(args2));
1750
- if (ret && ret.then) {
1751
- return ret.then(function(data) {
1752
- return data === false ? null : runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
1753
- }).catch(function(e) {
1754
- console.warn("[runHooks]".concat(hookName2, " reject"), e.message);
1755
- });
1756
- } else if (ret !== false) {
1757
- return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
1758
- }
1759
- };
1760
- return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
1761
- } else {
1762
- return handler.call.apply(handler, [obj, obj].concat(args));
1763
- }
1764
- }
1765
1709
  function showErrorMsg(pluginName, msg) {
1766
1710
  XG_DEBUG.logError("[".concat(pluginName, "] event or callback cant be undefined or null when call ").concat(msg));
1767
1711
  }
@@ -2001,18 +1945,6 @@
2001
1945
  }
2002
1946
  }
2003
1947
  }
2004
- }, {
2005
- key: "defineMethod",
2006
- value: function defineMethod(Obj, map) {
2007
- for (var key in map) {
2008
- if (Object.prototype.hasOwnProperty.call(map, key) && typeof map[key] === "function") {
2009
- Object.defineProperty(Obj, key, {
2010
- configurable: true,
2011
- value: map[key]
2012
- });
2013
- }
2014
- }
2015
- }
2016
1948
  }, {
2017
1949
  key: "defaultConfig",
2018
1950
  get: function get() {