@volcengine/veplayer-plugin 2.12.0-rc.0 → 2.12.0-rc.2

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 (43) hide show
  1. package/esm/index.development.js +537 -246
  2. package/esm/index.production.js +3 -3
  3. package/esm/veplayer.plugin.abr.development.js +3 -1
  4. package/esm/veplayer.plugin.abr.production.js +1 -1
  5. package/esm/veplayer.plugin.ad.development.js +18 -4
  6. package/esm/veplayer.plugin.ad.production.js +2 -2
  7. package/esm/veplayer.plugin.drm.development.js +3 -1
  8. package/esm/veplayer.plugin.drm.production.js +1 -1
  9. package/esm/veplayer.plugin.flv.development.js +5 -3
  10. package/esm/veplayer.plugin.flv.production.js +1 -1
  11. package/esm/veplayer.plugin.hls.development.js +64 -14
  12. package/esm/veplayer.plugin.hls.production.js +1 -1
  13. package/esm/veplayer.plugin.hlsjs.development.js +3 -1
  14. package/esm/veplayer.plugin.hlsjs.production.js +1 -1
  15. package/esm/veplayer.plugin.mp4.development.js +9 -3
  16. package/esm/veplayer.plugin.mp4.production.js +1 -1
  17. package/esm/veplayer.plugin.rtm.development.js +293 -151
  18. package/esm/veplayer.plugin.rtm.production.js +1 -1
  19. package/esm/veplayer.plugin.shaka.development.js +8 -2
  20. package/esm/veplayer.plugin.shaka.production.js +2 -2
  21. package/esm/veplayer.strategy.base.development.js +163 -78
  22. package/esm/veplayer.strategy.base.production.js +1 -1
  23. package/package.json +1 -1
  24. package/umd/veplayer.plugin.abr.development.js +3 -1
  25. package/umd/veplayer.plugin.abr.production.js +1 -1
  26. package/umd/veplayer.plugin.ad.development.js +18 -4
  27. package/umd/veplayer.plugin.ad.production.js +1 -1
  28. package/umd/veplayer.plugin.drm.development.js +3 -1
  29. package/umd/veplayer.plugin.drm.production.js +1 -1
  30. package/umd/veplayer.plugin.flv.development.js +5 -3
  31. package/umd/veplayer.plugin.flv.production.js +1 -1
  32. package/umd/veplayer.plugin.hls.development.js +64 -14
  33. package/umd/veplayer.plugin.hls.production.js +1 -1
  34. package/umd/veplayer.plugin.hlsjs.development.js +3 -1
  35. package/umd/veplayer.plugin.hlsjs.production.js +1 -1
  36. package/umd/veplayer.plugin.mp4.development.js +9 -3
  37. package/umd/veplayer.plugin.mp4.production.js +1 -1
  38. package/umd/veplayer.plugin.rtm.development.js +293 -151
  39. package/umd/veplayer.plugin.rtm.production.js +1 -1
  40. package/umd/veplayer.plugin.shaka.development.js +8 -2
  41. package/umd/veplayer.plugin.shaka.production.js +1 -1
  42. package/umd/veplayer.strategy.base.development.js +163 -78
  43. package/umd/veplayer.strategy.base.production.js +1 -1
@@ -898,7 +898,7 @@ function hook(hookName, handler) {
898
898
  }
899
899
  if (this.__hooks && this.__hooks[hookName]) {
900
900
  try {
901
- var preRet = runHooks(this, hookName, handler);
901
+ var preRet = runHooks.apply(void 0, [this, hookName, handler].concat(Array.prototype.slice.call(arguments)));
902
902
  if (preRet) {
903
903
  if (preRet.then) {
904
904
  preRet.then(function(isContinue) {
@@ -1012,6 +1012,8 @@ function runHooks(obj, hookName, handler) {
1012
1012
  });
1013
1013
  } else if (ret !== false) {
1014
1014
  return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
1015
+ } else if (ret === false) {
1016
+ return false;
1015
1017
  }
1016
1018
  };
1017
1019
  return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
@@ -7849,7 +7851,7 @@ var path$b = path$t, now$5 = path$b.Date.now, parent$14 = now$5, now$4 = parent$
7849
7851
  _classCallCheck(this, e), _defineProperty(this, "logger", void 0), _defineProperty(this, "level", void 0), _defineProperty(this, "customLogger", void 0), this.level = null == r ? void 0 : r.level, this.customLogger = null == r ? void 0 : r.logger, this.logger = function(e2, r2) {
7850
7852
  var o, a, i, s;
7851
7853
  try {
7852
- s = "0.0.0-feat-rtm-jb-20250716120923";
7854
+ s = "0.0.0-feat-ott-20251117064959";
7853
7855
  } catch (e3) {
7854
7856
  s = "--";
7855
7857
  }
@@ -9159,9 +9161,12 @@ var entryVirtual$2 = entryVirtual$j, splice$7 = entryVirtual$2("Array").splice,
9159
9161
  } }]), e;
9160
9162
  }(), FeatureCenter = function() {
9161
9163
  function e(t2) {
9162
- _classCallCheck(this, e), _defineProperty(this, "featureList", void 0), _defineProperty(this, "videoType", void 0), this.videoType = t2.type || VideoType.VOD, this.featureList = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({ deviceId: null == t2 ? void 0 : t2.deviceId, userId: null == t2 ? void 0 : t2.userId, playerVersion: null == t2 ? void 0 : t2.playerVersion }, this.initSync()), this.getGPUInfo()), this.getLocalDeviceMarkInfo()), this.getH265FeatureList());
9164
+ var r2 = this;
9165
+ _classCallCheck(this, e), _defineProperty(this, "featureList", void 0), _defineProperty(this, "videoType", void 0), this.videoType = t2.type || VideoType.VOD, this.featureList = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({ deviceId: null == t2 ? void 0 : t2.deviceId, userId: null == t2 ? void 0 : t2.userId, playerVersion: null == t2 ? void 0 : t2.playerVersion }, this.initSync()), this.getGPUInfo()), this.getLocalDeviceMarkInfo()), this.getH265FeatureList()), this.getOSVersionAsync().then(function(e2) {
9166
+ r2.updateFeatureList({ osVersion: e2 });
9167
+ });
9163
9168
  }
9164
- var t;
9169
+ var t, r;
9165
9170
  return _createClass(e, [{ key: "initSync", value: function() {
9166
9171
  return _objectSpread2({}, this.getBrowserInfo());
9167
9172
  } }, { key: "updateFeatureList", value: function(e2) {
@@ -9175,13 +9180,13 @@ var entryVirtual$2 = entryVirtual$j, splice$7 = entryVirtual$2("Array").splice,
9175
9180
  if (!e2)
9176
9181
  return t2;
9177
9182
  try {
9178
- var r = JSON.parse(e2);
9179
- return { cpuScore: r.cpuScore, netScore: r.netScore, renderScore: r.renderScore };
9183
+ var r2 = JSON.parse(e2);
9184
+ return { cpuScore: r2.cpuScore, netScore: r2.netScore, renderScore: r2.renderScore };
9180
9185
  } catch (e3) {
9181
9186
  }
9182
9187
  return t2;
9183
- } }, { key: "getDeviceMarkInfoAsync", value: (t = _asyncToGenerator(_regeneratorRuntime().mark(function e2() {
9184
- var t2, r, n, o, a, i;
9188
+ } }, { key: "getDeviceMarkInfoAsync", value: (r = _asyncToGenerator(_regeneratorRuntime().mark(function e2() {
9189
+ var t2, r2, n, o, a, i;
9185
9190
  return _regeneratorRuntime().wrap(function(e3) {
9186
9191
  for (; ; )
9187
9192
  switch (e3.prev = e3.next) {
@@ -9194,21 +9199,76 @@ var entryVirtual$2 = entryVirtual$j, splice$7 = entryVirtual$2("Array").splice,
9194
9199
  }
9195
9200
  e3.t0 = {};
9196
9201
  case 6:
9197
- return r = e3.t0, n = r.cpu, o = r.net, a = r.render, i = { cpuScore: (null == n ? void 0 : n.score) || -1, netScore: (null == o ? void 0 : o.score) || -1, renderScore: (null == a ? void 0 : a.score) || -1 }, setLocalStorage(this.videoType === VideoType.LIVE ? FEATURE_STORAGE_KEY.DEVICE_INFO_LIVE : FEATURE_STORAGE_KEY.DEVICE_INFO, _JSON$stringify(i)), this.updateFeatureList(i), e3.abrupt("return", i);
9202
+ return r2 = e3.t0, n = r2.cpu, o = r2.net, a = r2.render, i = { cpuScore: (null == n ? void 0 : n.score) || -1, netScore: (null == o ? void 0 : o.score) || -1, renderScore: (null == a ? void 0 : a.score) || -1 }, setLocalStorage(this.videoType === VideoType.LIVE ? FEATURE_STORAGE_KEY.DEVICE_INFO_LIVE : FEATURE_STORAGE_KEY.DEVICE_INFO, _JSON$stringify(i)), this.updateFeatureList(i), e3.abrupt("return", i);
9198
9203
  case 14:
9199
9204
  case "end":
9200
9205
  return e3.stop();
9201
9206
  }
9202
9207
  }, e2, this);
9203
9208
  })), function() {
9204
- return t.apply(this, arguments);
9209
+ return r.apply(this, arguments);
9205
9210
  }) }, { key: "getBrowserInfo", value: function() {
9206
9211
  var e2 = Bowser.getParser(navigator.userAgent);
9207
- return { browserVersion: e2.getBrowserVersion(), browserName: e2.getBrowserName(), cpuCore: navigator.hardwareConcurrency, osName: e2.getOSName(), osVersion: e2.getOSVersion(), platformType: e2.getPlatformType(), engineName: e2.getEngineName() };
9212
+ return { browserVersion: e2.getBrowserVersion(), browserName: e2.getBrowserName(), cpuCore: navigator.hardwareConcurrency, osName: e2.getOSName(), osVersion: e2.getOSVersion(), platformType: this.getPlatformType(), engineName: e2.getEngineName() };
9213
+ } }, { key: "getPlatformType", value: function() {
9214
+ var e2 = Bowser.getParser(navigator.userAgent), t2 = e2.getOSName();
9215
+ return "WebOS" === t2 || "Tizen" === t2 ? "tv" : e2.getPlatformType();
9216
+ } }, { key: "getOSVersionAsync", value: (t = _asyncToGenerator(_regeneratorRuntime().mark(function e2() {
9217
+ var t2, r2;
9218
+ return _regeneratorRuntime().wrap(function(e3) {
9219
+ for (; ; )
9220
+ switch (e3.prev = e3.next) {
9221
+ case 0:
9222
+ if (t2 = Bowser.getParser(navigator.userAgent), !(r2 = t2.getOSVersion())) {
9223
+ e3.next = 4;
9224
+ break;
9225
+ }
9226
+ return e3.abrupt("return", r2);
9227
+ case 4:
9228
+ if ("tv" != this.getPlatformType()) {
9229
+ e3.next = 8;
9230
+ break;
9231
+ }
9232
+ return e3.next = 7, this.getSmartTvInfoAsync();
9233
+ case 7:
9234
+ return e3.abrupt("return", e3.sent.osVersion);
9235
+ case 8:
9236
+ return e3.abrupt("return", "unknown");
9237
+ case 9:
9238
+ case "end":
9239
+ return e3.stop();
9240
+ }
9241
+ }, e2, this);
9242
+ })), function() {
9243
+ return t.apply(this, arguments);
9244
+ }) }, { key: "getSmartTvInfoAsync", value: function() {
9245
+ return new _Promise(function(e2) {
9246
+ var t2 = navigator.userAgent.toLowerCase();
9247
+ if ((_includesInstanceProperty(t2).call(t2, "webos") || _includesInstanceProperty(t2).call(t2, "web0s")) && window.webOS.deviceInfo(function(t3) {
9248
+ var r3 = (null == t3 ? void 0 : t3.sdkVersion) || "unknown";
9249
+ e2({ osVersion: r3 });
9250
+ }), _includesInstanceProperty(t2).call(t2, "tizen")) {
9251
+ var r2 = "unknown";
9252
+ try {
9253
+ var n;
9254
+ if ("undefined" != typeof window && null !== (n = window) && void 0 !== n && null !== (n = n.webapis) && void 0 !== n && n.systeminfo) {
9255
+ var o = window.webapis.systeminfo.getVersion();
9256
+ o && (r2 = o);
9257
+ }
9258
+ if ("unknown" === r2) {
9259
+ var a, i = null === (a = window) || void 0 === a || null === (a = a.tizen) || void 0 === a || null === (a = a.systeminfo) || void 0 === a ? void 0 : a.getCapability("http://tizen.org/feature/platform.version");
9260
+ i && (r2 = i);
9261
+ }
9262
+ } catch (e3) {
9263
+ r2 = "unknown", console.warn("Failed to get Tizen version", e3);
9264
+ }
9265
+ e2({ osVersion: r2 });
9266
+ }
9267
+ });
9208
9268
  } }, { key: "getGPUInfo", value: function() {
9209
9269
  try {
9210
- var e2 = Gpu$1.parseVendor(), t2 = Gpu$1.getGPUVendor(), r = _includesInstanceProperty(t2).call(t2, "SwiftShader");
9211
- return { gpuScore: (null == e2 ? void 0 : e2.score) || -1, isCloseGPU: r };
9270
+ var e2 = Gpu$1.parseVendor(), t2 = Gpu$1.getGPUVendor(), r2 = _includesInstanceProperty(t2).call(t2, "SwiftShader");
9271
+ return { gpuScore: (null == e2 ? void 0 : e2.score) || -1, isCloseGPU: r2 };
9212
9272
  } catch (e3) {
9213
9273
  return { gpuScore: -1, isCloseGPU: false };
9214
9274
  }
@@ -9762,9 +9822,9 @@ lodash_merge.exports, function(e, t) {
9762
9822
  } catch (e3) {
9763
9823
  }
9764
9824
  }(), O = _ && _.isTypedArray;
9765
- var P, I, E, T = Array.prototype, A = Function.prototype, C = Object.prototype, w = g["__core-js_shared__"], R = A.toString, j = C.hasOwnProperty, N = (P = /[^.]+$/.exec(w && _keysInstanceProperty(w) && _keysInstanceProperty(w).IE_PROTO || "")) ? "Symbol(src)_1." + P : "", M = C.toString, D = R.call(Object), k = RegExp("^" + R.call(j).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), L = m ? g.Buffer : void 0, x = g.Symbol, U = g.Uint8Array, F = L ? L.allocUnsafe : void 0, B = (I = _Object$getPrototypeOf, E = Object, function(e2) {
9825
+ var P, I, E, T = Array.prototype, A = Function.prototype, w = Object.prototype, C = g["__core-js_shared__"], R = A.toString, j = w.hasOwnProperty, N = (P = /[^.]+$/.exec(C && _keysInstanceProperty(C) && _keysInstanceProperty(C).IE_PROTO || "")) ? "Symbol(src)_1." + P : "", M = w.toString, D = R.call(Object), k = RegExp("^" + R.call(j).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), L = m ? g.Buffer : void 0, x = g.Symbol, U = g.Uint8Array, F = L ? L.allocUnsafe : void 0, B = (I = _Object$getPrototypeOf, E = Object, function(e2) {
9766
9826
  return I(E(e2));
9767
- }), V = _Object$create, K = C.propertyIsEnumerable, G = _spliceInstanceProperty(T), H = x ? x.toStringTag : void 0, W2 = function() {
9827
+ }), V = _Object$create, G = w.propertyIsEnumerable, K = _spliceInstanceProperty(T), H = x ? x.toStringTag : void 0, W2 = function() {
9768
9828
  try {
9769
9829
  var e2 = be(Object, "defineProperty");
9770
9830
  return e2({}, "", {}), e2;
@@ -9774,7 +9834,7 @@ lodash_merge.exports, function(e, t) {
9774
9834
  function e2() {
9775
9835
  }
9776
9836
  return function(t2) {
9777
- if (!we(t2))
9837
+ if (!Ce(t2))
9778
9838
  return {};
9779
9839
  if (V)
9780
9840
  return V(t2);
@@ -9856,7 +9916,7 @@ lodash_merge.exports, function(e, t) {
9856
9916
  this.__data__ = [], this.size = 0;
9857
9917
  }, ee.prototype.delete = function(e2) {
9858
9918
  var t2 = this.__data__, r2 = ie(t2, e2);
9859
- return !(r2 < 0) && (r2 == t2.length - 1 ? t2.pop() : G.call(t2, r2, 1), --this.size, true);
9919
+ return !(r2 < 0) && (r2 == t2.length - 1 ? t2.pop() : K.call(t2, r2, 1), --this.size, true);
9860
9920
  }, ee.prototype.get = function(e2) {
9861
9921
  var t2 = this.__data__, r2 = ie(t2, e2);
9862
9922
  return r2 < 0 ? void 0 : t2[r2][1];
@@ -9923,7 +9983,7 @@ lodash_merge.exports, function(e, t) {
9923
9983
  return Re(e2) && ue(e2) == o;
9924
9984
  }
9925
9985
  function pe(e2) {
9926
- return !(!we(e2) || function(e3) {
9986
+ return !(!Ce(e2) || function(e3) {
9927
9987
  return !!N && N in e3;
9928
9988
  }(e2)) && (Ae(e2) ? k : p).test(function(e3) {
9929
9989
  if (null != e3) {
@@ -9940,7 +10000,7 @@ lodash_merge.exports, function(e, t) {
9940
10000
  }(e2));
9941
10001
  }
9942
10002
  function fe(e2) {
9943
- if (!we(e2))
10003
+ if (!Ce(e2))
9944
10004
  return function(e3) {
9945
10005
  var t3 = [];
9946
10006
  if (null != e3)
@@ -9955,7 +10015,7 @@ lodash_merge.exports, function(e, t) {
9955
10015
  }
9956
10016
  function ye(e2, t2, r2, n2, o2) {
9957
10017
  e2 !== t2 && ce(t2, function(a2, i2) {
9958
- if (o2 || (o2 = new re()), we(a2))
10018
+ if (o2 || (o2 = new re()), Ce(a2))
9959
10019
  !function(e3, t3, r3, n3, o3, a3, i3) {
9960
10020
  var s3 = Se(e3, r3), l2 = Se(t3, r3), u2 = i3.get(l2);
9961
10021
  if (u2)
@@ -9993,7 +10053,7 @@ lodash_merge.exports, function(e, t) {
9993
10053
  }
9994
10054
  return r4;
9995
10055
  }(e4, Ne(e4));
9996
- }(s3) : we(s3) && !Ae(s3) || ($3 = function(e4) {
10056
+ }(s3) : Ce(s3) && !Ae(s3) || ($3 = function(e4) {
9997
10057
  return "function" != typeof e4.constructor || me(e4) ? {} : X(B(e4));
9998
10058
  }(l2))) : p2 = false;
9999
10059
  }
@@ -10054,7 +10114,7 @@ lodash_merge.exports, function(e, t) {
10054
10114
  }
10055
10115
  function me(e2) {
10056
10116
  var t2 = e2 && e2.constructor;
10057
- return e2 === ("function" == typeof t2 && t2.prototype || C);
10117
+ return e2 === ("function" == typeof t2 && t2.prototype || w);
10058
10118
  }
10059
10119
  function Se(e2, t2) {
10060
10120
  if (("constructor" !== t2 || "function" != typeof e2[t2]) && "__proto__" != t2)
@@ -10078,24 +10138,24 @@ lodash_merge.exports, function(e, t) {
10078
10138
  var Pe = $e(function() {
10079
10139
  return arguments;
10080
10140
  }()) ? $e : function(e2) {
10081
- return Re(e2) && j.call(e2, "callee") && !K.call(e2, "callee");
10141
+ return Re(e2) && j.call(e2, "callee") && !G.call(e2, "callee");
10082
10142
  }, Ie = _Array$isArray;
10083
10143
  function Ee(e2) {
10084
- return null != e2 && Ce(e2.length) && !Ae(e2);
10144
+ return null != e2 && we(e2.length) && !Ae(e2);
10085
10145
  }
10086
10146
  var Te = Y || function() {
10087
10147
  return false;
10088
10148
  };
10089
10149
  function Ae(e2) {
10090
- if (!we(e2))
10150
+ if (!Ce(e2))
10091
10151
  return false;
10092
10152
  var t2 = ue(e2);
10093
10153
  return t2 == i || t2 == s || t2 == a || t2 == u;
10094
10154
  }
10095
- function Ce(e2) {
10155
+ function we(e2) {
10096
10156
  return "number" == typeof e2 && e2 > -1 && e2 % 1 == 0 && e2 <= n;
10097
10157
  }
10098
- function we(e2) {
10158
+ function Ce(e2) {
10099
10159
  var t2 = _typeof(e2);
10100
10160
  return null != e2 && ("object" == t2 || "function" == t2);
10101
10161
  }
@@ -10107,7 +10167,7 @@ lodash_merge.exports, function(e, t) {
10107
10167
  return e2(t2);
10108
10168
  };
10109
10169
  }(O) : function(e2) {
10110
- return Re(e2) && Ce(e2.length) && !!y[ue(e2)];
10170
+ return Re(e2) && we(e2.length) && !!y[ue(e2)];
10111
10171
  };
10112
10172
  function Ne(e2) {
10113
10173
  return Ee(e2) ? ne(e2, true) : fe(e2);
@@ -10117,7 +10177,7 @@ lodash_merge.exports, function(e, t) {
10117
10177
  }, de(function(e2, t2) {
10118
10178
  var r2 = -1, n2 = t2.length, o2 = n2 > 1 ? t2[n2 - 1] : void 0, a2 = n2 > 2 ? t2[2] : void 0;
10119
10179
  for (o2 = Me.length > 3 && "function" == typeof o2 ? (n2--, o2) : void 0, a2 && function(e3, t3, r3) {
10120
- if (!we(r3))
10180
+ if (!Ce(r3))
10121
10181
  return false;
10122
10182
  var n3 = _typeof(t3);
10123
10183
  return !!("number" == n3 ? Ee(r3) && ve(t3, r3.length) : "string" == n3 && t3 in r3) && Oe(r3[t3], e3);
@@ -11127,41 +11187,41 @@ function _$jsvmprt(e, t, r) {
11127
11187
  for (var g = []; ; )
11128
11188
  try {
11129
11189
  switch (i[t2++]) {
11130
- case 62:
11190
+ case 71:
11131
11191
  y2[++f2] = null;
11132
11192
  break;
11133
- case 65:
11193
+ case 48:
11134
11194
  l2 = ((l2 = ((l2 = i[t2++]) << 8) + i[t2++]) << 8) + i[t2++], y2[++f2] = (l2 << 8) + i[t2++];
11135
11195
  break;
11136
- case 27:
11196
+ case 32:
11137
11197
  l2 = (i[t2] << 8) + i[t2 + 1], t2 += 2, y2[++f2] = s[l2];
11138
11198
  break;
11139
- case 42:
11199
+ case 73:
11140
11200
  y2[++f2] = void 0;
11141
11201
  break;
11142
- case 59:
11202
+ case 8:
11143
11203
  l2 = (i[t2] << 8) + i[t2 + 1], t2 += 2, f2 = f2 - l2 + 1, c2 = y2.slice(f2, f2 + l2), y2[f2] = c2;
11144
11204
  break;
11145
- case 72:
11205
+ case 35:
11146
11206
  for (c2 = i[t2++], u2 = i[t2++], $3 = h; c2 > 0; --c2)
11147
11207
  $3 = $3.p;
11148
11208
  y2[++f2] = $3[u2];
11149
11209
  break;
11150
- case 29:
11210
+ case 50:
11151
11211
  l2 = (i[t2] << 8) + i[t2 + 1], t2 += 2, c2 = s[l2], y2[f2] = y2[f2][c2];
11152
11212
  break;
11153
- case 43:
11213
+ case 42:
11154
11214
  for (c2 = i[t2++], u2 = i[t2++], $3 = h; c2 > 0; --c2)
11155
11215
  $3 = $3.p;
11156
11216
  $3[u2] = y2[f2--];
11157
11217
  break;
11158
- case 53:
11218
+ case 2:
11159
11219
  l2 = i[t2++], c2 = y2[f2--], (u2 = function e3() {
11160
11220
  var t3 = e3._v;
11161
11221
  return (0, e3._u)(t3[0], arguments, t3[1], t3[2], this);
11162
11222
  })._v = [c2, l2, h], u2._u = e2, y2[++f2] = u2;
11163
11223
  break;
11164
- case 50:
11224
+ case 13:
11165
11225
  for (c2 = y2[f2--], u2 = null; $3 = g.pop(); )
11166
11226
  if (2 === $3[0] || 3 === $3[0]) {
11167
11227
  u2 = $3;
@@ -11175,12 +11235,12 @@ function _$jsvmprt(e, t, r) {
11175
11235
  t2 = d2[1], a2 = d2[2], h = d2[3], g = d2[4], y2[++f2] = c2, d2 = d2[0];
11176
11236
  }
11177
11237
  break;
11178
- case 26:
11238
+ case 43:
11179
11239
  f2 -= l2 = i[t2++], u2 = y2.slice(f2 + 1, f2 + l2 + 1), c2 = y2[f2--], $3 = y2[f2--], c2._u === e2 ? (c2 = c2._v, d2 = [d2, t2, a2, h, g], t2 = c2[0], null == $3 && ($3 = function() {
11180
11240
  return this;
11181
11241
  }()), a2 = $3, (h = [u2].concat(u2)).length = Math.min(c2[1], l2) + 1, h.p = c2[2], g = []) : (p2 = c2.apply($3, u2), y2[++f2] = p2);
11182
11242
  break;
11183
- case 49:
11243
+ case 9:
11184
11244
  c2 = y2[f2], y2[++f2] = c2;
11185
11245
  break;
11186
11246
  default:
@@ -11205,7 +11265,7 @@ function _$jsvmprt(e, t, r) {
11205
11265
  }
11206
11266
  }(l, [], 0, t, r);
11207
11267
  }
11208
- _$jsvmprt("504B0101d6ff48f400000028f44afcd4000000343e4802004800014800024800034800043b0004311d00001b00011a011b00021a02311d00031a0032410000000035042b01012a32000404646167600128203f3964627e6c7b63667d376f6766743f7c7f3f783e3f64793960366037647e6a087a615d7a7c676069", { get 0() {
11268
+ _$jsvmprt("504B0101c6625bb800000028b95862c70000003447230200230001230002230003230004080004093200002000012b012000022b02093200032b000d300000000002042a0101490d00040450555354011c200b0d50564a584f575249035b5352400b484b0b4c0a0b504d0d54025403504a5e084e55694e4853545d", { get 0() {
11209
11269
  return HmacSHA1;
11210
11270
  }, get 1() {
11211
11271
  return generateSignature;
@@ -11213,70 +11273,92 @@ _$jsvmprt("504B0101d6ff48f400000028f44afcd4000000343e480200480001480002480003480
11213
11273
  generateSignature = e;
11214
11274
  } }, void 0);
11215
11275
  var _ADAPTER, VodSettingsLoader = function() {
11216
- function e(t, r) {
11217
- var n, o, a, i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Regions.CN;
11218
- _classCallCheck(this, e), _defineProperty(this, "appId", void 0), _defineProperty(this, "ctx", void 0), _defineProperty(this, "host", void 0), _defineProperty(this, "needSignature", true), _defineProperty(this, "region", void 0), _defineProperty(this, "scene", void 0), _defineProperty(this, "ext", void 0), this.scene = (n = {}, _defineProperty(n, VideoType.LIVE, 1), _defineProperty(n, VideoType.VOD, 0), n)[r.videoType], this.ext = _objectSpread2({ userId: null !== (o = r.featureCenter.getFeatureList().userId) && void 0 !== o ? o : "", playerVerson: null !== (a = r.featureCenter.getFeatureList().playerVersion) && void 0 !== a ? a : "" }, this.getConfigType(r.strategies)), this.appId = t, this.ctx = r, this.region = i, this.host = this.getHostByRegion();
11276
+ function e(t2, r2, n) {
11277
+ var o, a, i, s;
11278
+ _classCallCheck(this, e), _defineProperty(this, "appId", void 0), _defineProperty(this, "ctx", void 0), _defineProperty(this, "host", void 0), _defineProperty(this, "needSignature", true), _defineProperty(this, "region", void 0), _defineProperty(this, "fetchOptions", void 0), _defineProperty(this, "scene", void 0), _defineProperty(this, "ext", void 0), this.scene = (o = {}, _defineProperty(o, VideoType.LIVE, 1), _defineProperty(o, VideoType.VOD, 0), o)[r2.videoType], this.ext = _objectSpread2({ userId: null !== (a = r2.featureCenter.getFeatureList().userId) && void 0 !== a ? a : "", playerVerson: null !== (i = r2.featureCenter.getFeatureList().playerVersion) && void 0 !== i ? i : "" }, this.getConfigType(r2.strategies)), this.appId = t2, this.ctx = r2, this.region = null !== (s = n.region) && void 0 !== s ? s : Regions.CN, this.fetchOptions = n.fetchOptions, this.host = this.getHostByRegion();
11219
11279
  }
11280
+ var t, r;
11220
11281
  return _createClass(e, [{ key: "getConfigType", value: function(e2) {
11221
- var t;
11282
+ var t2;
11222
11283
  if (!e2)
11223
11284
  return {};
11224
- var r = {};
11225
- return _forEachInstanceProperty(t = _Object$keys(e2)).call(t, function(t2) {
11226
- var n = e2[t2];
11227
- n && (r["".concat(t2, "_id")] = "object" === _typeof(n) && n.configId ? n.configId : "default");
11228
- }), r;
11285
+ var r2 = {};
11286
+ return _forEachInstanceProperty(t2 = _Object$keys(e2)).call(t2, function(t3) {
11287
+ var n = e2[t3];
11288
+ n && (r2["".concat(t3, "_id")] = "object" === _typeof(n) && n.configId ? n.configId : "default");
11289
+ }), r2;
11229
11290
  } }, { key: "getCacheKey", value: function() {
11230
11291
  return _JSON$stringify([this.appId, this.ctx.cacheKey, this.ctx.featureCenter.getH265FeatureList().isHevcSupported, this.ctx.featureCenter.getBrowserInfo(), this.ctx.featureCenter.getFeatureList().deviceId]);
11231
11292
  } }, { key: "fetch", value: function(e2) {
11232
- function t() {
11293
+ function t2() {
11233
11294
  return e2.apply(this, arguments);
11234
11295
  }
11235
- return t.toString = function() {
11296
+ return t2.toString = function() {
11236
11297
  return e2.toString();
11237
- }, t;
11298
+ }, t2;
11238
11299
  }(_asyncToGenerator(_regeneratorRuntime().mark(function e2() {
11239
- var t, r, n, o, a, i, s;
11300
+ var t2, r2, n, o, a, i, s, l;
11240
11301
  return _regeneratorRuntime().wrap(function(e3) {
11241
11302
  for (; ; )
11242
11303
  switch (e3.prev = e3.next) {
11243
11304
  case 0:
11244
- return e3.prev = 0, e3.next = 3, fetch(this.generateUrl(), { mode: "cors" });
11245
- case 3:
11246
- if ((t = e3.sent).ok) {
11247
- e3.next = 6;
11305
+ return e3.next = 2, this.generateUrl();
11306
+ case 2:
11307
+ return t2 = e3.sent, e3.prev = 3, e3.next = 6, fetch(t2, _objectSpread2({ mode: "cors" }, this.fetchOptions));
11308
+ case 6:
11309
+ if ((r2 = e3.sent).ok) {
11310
+ e3.next = 9;
11248
11311
  break;
11249
11312
  }
11250
11313
  throw new Error("Network response was not OK");
11251
- case 6:
11252
- return e3.next = 8, t.json();
11253
- case 8:
11254
- return r = e3.sent, n = r.data, o = n.custom_settings.web, a = n.general_settings, i = a.use_local_cache, s = a.local_cache_expire, e3.abrupt("return", _objectSpread2(_objectSpread2({}, o), {}, { use_local_cache: i, local_cache_expired_at: s > 0 ? _Date$now() + 1e3 * s : void 0, cache_key: this.getCacheKey() }));
11255
- case 17:
11256
- throw e3.prev = 17, e3.t0 = e3.catch(0), e3.t0;
11314
+ case 9:
11315
+ return e3.next = 11, r2.json();
11316
+ case 11:
11317
+ return n = e3.sent, o = n.data, a = o.custom_settings.web, i = o.general_settings, s = i.use_local_cache, l = i.local_cache_expire, e3.abrupt("return", _objectSpread2(_objectSpread2({}, a), {}, { use_local_cache: s, local_cache_expired_at: l > 0 ? _Date$now() + 1e3 * l : void 0, cache_key: this.getCacheKey() }));
11257
11318
  case 20:
11319
+ throw e3.prev = 20, e3.t0 = e3.catch(3), e3.t0;
11320
+ case 23:
11258
11321
  case "end":
11259
11322
  return e3.stop();
11260
11323
  }
11261
- }, e2, this, [[0, 17]]);
11324
+ }, e2, this, [[3, 20]]);
11262
11325
  }))) }, { key: "getHostByRegion", value: function() {
11263
11326
  var e2;
11264
11327
  return (null === (e2 = { cn: { settingsHost: "vod-settings.volcvod.com" } }[this.region]) || void 0 === e2 ? void 0 : e2.settingsHost) || "vod-settings.volcvod.com";
11265
- } }, { key: "generateSearchParams", value: function(e2) {
11266
- if (e2.searchParams.set("module", "web"), e2.searchParams.set("aid", String(this.appId)), e2.searchParams.set("region", this.region), e2.searchParams.set("web_support_hardware_decode_bytevc1", String(this.ctx.featureCenter.getH265FeatureList().isHevcSupported)), e2.searchParams.set("web_os", this.ctx.featureCenter.getBrowserInfo().osName), e2.searchParams.set("web_os_version", this.ctx.featureCenter.getBrowserInfo().osVersion), e2.searchParams.set("web_platform", this.ctx.featureCenter.getBrowserInfo().platformType), e2.searchParams.set("web_browser", this.ctx.featureCenter.getBrowserInfo().browserName), e2.searchParams.set("web_browser_version", this.ctx.featureCenter.getBrowserInfo().browserVersion), e2.searchParams.set("web_cpu_core", String(this.ctx.featureCenter.getBrowserInfo().cpuCore)), e2.searchParams.set("web_scene", String(this.scene)), e2.searchParams.set("web_ext", _JSON$stringify(this.ext)), e2.searchParams.set("device_id", this.ctx.featureCenter.getFeatureList().deviceId), this.needSignature) {
11267
- var t = _Date$now();
11268
- e2.searchParams.set("timestamp", String(t));
11269
- var r = generateSignature(this.appId, this.ctx.featureCenter.getFeatureList().deviceId, this.ctx.featureCenter.getBrowserInfo().browserName, t);
11270
- e2.searchParams.set("signature", r);
11271
- }
11272
- return e2;
11273
- } }, { key: "generateUrl", value: function() {
11274
- return this.generateSearchParams(new _URL("https://".concat(this.host, "/vod/settings/v1")));
11275
- } }]), e;
11328
+ } }, { key: "generateSearchParams", value: (r = _asyncToGenerator(_regeneratorRuntime().mark(function e2(t2) {
11329
+ var r2, n, o;
11330
+ return _regeneratorRuntime().wrap(function(e3) {
11331
+ for (; ; )
11332
+ switch (e3.prev = e3.next) {
11333
+ case 0:
11334
+ return e3.next = 2, this.ctx.featureCenter.getOSVersionAsync();
11335
+ case 2:
11336
+ return r2 = e3.sent, t2.searchParams.set("module", "web"), t2.searchParams.set("aid", String(this.appId)), t2.searchParams.set("region", this.region), t2.searchParams.set("web_support_hardware_decode_bytevc1", String(this.ctx.featureCenter.getH265FeatureList().isHevcSupported)), t2.searchParams.set("web_os", this.ctx.featureCenter.getBrowserInfo().osName), t2.searchParams.set("web_os_version", r2), t2.searchParams.set("web_platform", this.ctx.featureCenter.getBrowserInfo().platformType), t2.searchParams.set("web_browser", this.ctx.featureCenter.getBrowserInfo().browserName), t2.searchParams.set("web_browser_version", this.ctx.featureCenter.getBrowserInfo().browserVersion), t2.searchParams.set("web_cpu_core", String(this.ctx.featureCenter.getBrowserInfo().cpuCore)), t2.searchParams.set("web_scene", String(this.scene)), t2.searchParams.set("web_ext", _JSON$stringify(this.ext)), t2.searchParams.set("device_id", this.ctx.featureCenter.getFeatureList().deviceId), this.needSignature && (n = _Date$now(), t2.searchParams.set("timestamp", String(n)), o = generateSignature(this.appId, this.ctx.featureCenter.getFeatureList().deviceId, this.ctx.featureCenter.getBrowserInfo().browserName, n), t2.searchParams.set("signature", o)), e3.abrupt("return", t2);
11337
+ case 18:
11338
+ case "end":
11339
+ return e3.stop();
11340
+ }
11341
+ }, e2, this);
11342
+ })), function(e2) {
11343
+ return r.apply(this, arguments);
11344
+ }) }, { key: "generateUrl", value: (t = _asyncToGenerator(_regeneratorRuntime().mark(function e2() {
11345
+ return _regeneratorRuntime().wrap(function(e3) {
11346
+ for (; ; )
11347
+ switch (e3.prev = e3.next) {
11348
+ case 0:
11349
+ return e3.abrupt("return", this.generateSearchParams(new _URL("https://".concat(this.host, "/vod/settings/v1"))));
11350
+ case 1:
11351
+ case "end":
11352
+ return e3.stop();
11353
+ }
11354
+ }, e2, this);
11355
+ })), function() {
11356
+ return t.apply(this, arguments);
11357
+ }) }]), e;
11276
11358
  }(), logger = new Logger("VeStrategy"), ADAPTER = (_defineProperty(_ADAPTER = {}, VideoType.VOD, BaseAdapter), _defineProperty(_ADAPTER, VideoType.LIVE, LiveAdapter), _ADAPTER), StrategyController = function() {
11277
11359
  function e(t2) {
11278
11360
  _classCallCheck(this, e), _defineProperty(this, "ctx", void 0), _defineProperty(this, "configPreparePromise", void 0), _defineProperty(this, "isStrategyStarted", false);
11279
- var r2 = new FeatureCenter(t2), n2 = new DataCenter(t2, new VodSettingsLoader(t2.appId, { featureCenter: r2, cacheKey: t2.cacheKey, strategies: t2.strategies, videoType: t2.type || VideoType.VOD }));
11361
+ var r2 = new FeatureCenter(t2), n2 = new DataCenter(t2, new VodSettingsLoader(t2.appId, { featureCenter: r2, cacheKey: t2.cacheKey, strategies: t2.strategies, videoType: t2.type || VideoType.VOD }, { fetchOptions: t2.fetchOptions }));
11280
11362
  logger.update(t2.log), this.ctx = { dataCenter: n2, featureCenter: r2, playerManager: new PlayerManager(), tracker: new Tracker({ trackInfo: t2.tracker, type: t2.type || VideoType.VOD, lineAppId: t2.appId, lineUserId: t2.deviceId, appId: t2.type === VideoType.VOD ? 577780 : 579013, channel: t2.region, cxt: { dataCenter: n2, featureCenter: r2 } }) }, this.prepare(true);
11281
11363
  }
11282
11364
  var t, r, n, o, a;
@@ -11441,6 +11523,9 @@ var _ADAPTER, VodSettingsLoader = function() {
11441
11523
  } }, { key: "getServiceConfig", value: function() {
11442
11524
  var t2, r2, n2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : VideoType.VOD;
11443
11525
  return VideoType.VOD === n2 ? (null === (t2 = e._vodInst) || void 0 === t2 || null === (t2 = t2.ctx) || void 0 === t2 || null === (t2 = t2.dataCenter) || void 0 === t2 ? void 0 : t2.getServiceStrategyConfig()) || {} : VideoType.LIVE === n2 && (null === (r2 = e._liveInst) || void 0 === r2 || null === (r2 = r2.ctx) || void 0 === r2 || null === (r2 = r2.dataCenter) || void 0 === r2 ? void 0 : r2.getServiceStrategyConfig()) || {};
11526
+ } }, { key: "getFeatureList", value: function() {
11527
+ var t2, r2, n2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : VideoType.VOD;
11528
+ return VideoType.VOD === n2 ? null === (t2 = e._vodInst) || void 0 === t2 || null === (t2 = t2.ctx) || void 0 === t2 || null === (t2 = t2.featureCenter) || void 0 === t2 ? void 0 : t2.getFeatureList() : VideoType.LIVE === n2 ? null === (r2 = e._liveInst) || void 0 === r2 || null === (r2 = r2.ctx) || void 0 === r2 || null === (r2 = r2.featureCenter) || void 0 === r2 ? void 0 : r2.getFeatureList() : void 0;
11444
11529
  } }, { key: "apply", value: function(t2, r2, n2) {
11445
11530
  var o2, a2;
11446
11531
  if (!t2 || !r2)