@volcengine/veplayer 2.6.0-rc.4 → 2.6.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.
@@ -1165,7 +1165,7 @@ var __publicField = (obj, key, value) => {
1165
1165
  }
1166
1166
  return offsetTime;
1167
1167
  };
1168
- function isObject$1(value) {
1168
+ function isObject$2(value) {
1169
1169
  var type = _typeof(value);
1170
1170
  return value !== null && (type === "object" || type === "function");
1171
1171
  }
@@ -1180,7 +1180,7 @@ var __publicField = (obj, key, value) => {
1180
1180
  throw new TypeError("Expected a function");
1181
1181
  }
1182
1182
  wait = +wait || 0;
1183
- if (isObject$1(options)) {
1183
+ if (isObject$2(options)) {
1184
1184
  leading = !!options.leading;
1185
1185
  maxing = "maxWait" in options;
1186
1186
  maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait;
@@ -1285,7 +1285,7 @@ var __publicField = (obj, key, value) => {
1285
1285
  if (typeof func !== "function") {
1286
1286
  throw new TypeError("Expected a function");
1287
1287
  }
1288
- if (isObject$1(options)) {
1288
+ if (isObject$2(options)) {
1289
1289
  leading = "leading" in options ? !!options.leading : leading;
1290
1290
  trailing = "trailing" in options ? !!options.trailing : trailing;
1291
1291
  }
@@ -1461,7 +1461,7 @@ var __publicField = (obj, key, value) => {
1461
1461
  }
1462
1462
  }
1463
1463
  };
1464
- var version = "3.0.21-rc.3";
1464
+ var version = "3.0.21-rc.5";
1465
1465
  var ERROR_TYPE_MAP = {
1466
1466
  1: "media",
1467
1467
  2: "media",
@@ -1917,7 +1917,7 @@ var __publicField = (obj, key, value) => {
1917
1917
  var _e = this.media.error || error2;
1918
1918
  var type = _e.code ? ERROR_TYPE_MAP[_e.code] : "other";
1919
1919
  var message = _e.message;
1920
- if (!this.media.currentSrc) {
1920
+ if (!(this.media.currentSrc || this.media.srcObject)) {
1921
1921
  message = "empty_src";
1922
1922
  _e = {
1923
1923
  code: 6,
@@ -4131,6 +4131,10 @@ var __publicField = (obj, key, value) => {
4131
4131
  this.unbind("mouseenter", this.onMouseEnter);
4132
4132
  this.unbind("mouseleave", this.onMouseLeave);
4133
4133
  }
4134
+ this.left = null;
4135
+ this.center = null;
4136
+ this.right = null;
4137
+ this.innerRoot = null;
4134
4138
  }
4135
4139
  }, {
4136
4140
  key: "render",
@@ -6502,6 +6506,7 @@ var __publicField = (obj, key, value) => {
6502
6506
  var Level = /* @__PURE__ */ ((Level2) => {
6503
6507
  Level2["Fatal"] = "Fatal";
6504
6508
  Level2["Error"] = "Error";
6509
+ Level2["Warn"] = "Warn";
6505
6510
  return Level2;
6506
6511
  })(Level || {});
6507
6512
  var ErrorCode$1 = /* @__PURE__ */ ((ErrorCode2) => {
@@ -10737,7 +10742,22 @@ var __publicField = (obj, key, value) => {
10737
10742
  SOURCE_CHANGE: "sourceChange",
10738
10743
  ABR_SWITCH_START: "abrSwitchStart",
10739
10744
  ABR_SWITCH_SUCCESS: "abrSwitchSuccess",
10740
- ABR_SWITCH_FAILED: "abrSwitchFailed"
10745
+ ABR_SWITCH_FAILED: "abrSwitchFailed",
10746
+ // 广告插件
10747
+ AD_FIRST_QUARTILE: "ad_first_quartile",
10748
+ AD_MIDPOINT: "ad_midpoint",
10749
+ AD_THIRD_QUARTILE: "ad_third_quartile",
10750
+ AD_CLICK: "ad_click",
10751
+ AD_IMPRESSION: "ad_impression",
10752
+ AD_RESUME: "ad_resume",
10753
+ AD_START: "ad_start",
10754
+ AD_PLAY: "ad_play",
10755
+ AD_PAUSE: "ad_pause",
10756
+ AD_TIME_UPDATE: "ad_time_update",
10757
+ AD_SKIPPED: "ad_skipped",
10758
+ AD_ERROR: "ad_error",
10759
+ AD_COMPLETE: "ad_complete",
10760
+ AD_ALL_COMPLETED: "ad_all_completed"
10741
10761
  };
10742
10762
  const Events$1 = {
10743
10763
  ...XGEvents,
@@ -11873,16 +11893,16 @@ var __publicField = (obj, key, value) => {
11873
11893
  (function(module2, exports3) {
11874
11894
  var LARGE_ARRAY_SIZE = 200;
11875
11895
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
11876
- var MAX_SAFE_INTEGER = 9007199254740991;
11877
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", promiseTag = "[object Promise]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag2 = "[object Symbol]", weakMapTag = "[object WeakMap]";
11896
+ var MAX_SAFE_INTEGER2 = 9007199254740991;
11897
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag2 = "[object Function]", genTag2 = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", promiseTag = "[object Promise]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag2 = "[object Symbol]", weakMapTag = "[object WeakMap]";
11878
11898
  var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
11879
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
11899
+ var reRegExpChar2 = /[\\^$.*+?()[\]{}|]/g;
11880
11900
  var reFlags = /\w*$/;
11881
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
11882
- var reIsUint = /^(?:0|[1-9]\d*)$/;
11901
+ var reIsHostCtor2 = /^\[object .+?Constructor\]$/;
11902
+ var reIsUint2 = /^(?:0|[1-9]\d*)$/;
11883
11903
  var cloneableTags = {};
11884
11904
  cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag2] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
11885
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
11905
+ cloneableTags[errorTag] = cloneableTags[funcTag2] = cloneableTags[weakMapTag] = false;
11886
11906
  var freeGlobal2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
11887
11907
  var freeSelf2 = typeof self == "object" && self && self.Object === Object && self;
11888
11908
  var root2 = freeGlobal2 || freeSelf2 || Function("return this")();
@@ -11897,7 +11917,7 @@ var __publicField = (obj, key, value) => {
11897
11917
  set.add(value);
11898
11918
  return set;
11899
11919
  }
11900
- function arrayEach(array, iteratee) {
11920
+ function arrayEach2(array, iteratee) {
11901
11921
  var index = -1, length = array ? array.length : 0;
11902
11922
  while (++index < length) {
11903
11923
  if (iteratee(array[index], index, array) === false) {
@@ -11930,10 +11950,10 @@ var __publicField = (obj, key, value) => {
11930
11950
  }
11931
11951
  return result;
11932
11952
  }
11933
- function getValue(object, key) {
11953
+ function getValue2(object, key) {
11934
11954
  return object == null ? void 0 : object[key];
11935
11955
  }
11936
- function isHostObject(value) {
11956
+ function isHostObject2(value) {
11937
11957
  var result = false;
11938
11958
  if (value != null && typeof value.toString != "function") {
11939
11959
  try {
@@ -11962,22 +11982,22 @@ var __publicField = (obj, key, value) => {
11962
11982
  });
11963
11983
  return result;
11964
11984
  }
11965
- var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto2 = Object.prototype;
11966
- var coreJsData = root2["__core-js_shared__"];
11967
- var maskSrcKey = function() {
11968
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
11985
+ var arrayProto = Array.prototype, funcProto2 = Function.prototype, objectProto2 = Object.prototype;
11986
+ var coreJsData2 = root2["__core-js_shared__"];
11987
+ var maskSrcKey2 = function() {
11988
+ var uid = /[^.]+$/.exec(coreJsData2 && coreJsData2.keys && coreJsData2.keys.IE_PROTO || "");
11969
11989
  return uid ? "Symbol(src)_1." + uid : "";
11970
11990
  }();
11971
- var funcToString = funcProto.toString;
11972
- var hasOwnProperty = objectProto2.hasOwnProperty;
11991
+ var funcToString2 = funcProto2.toString;
11992
+ var hasOwnProperty2 = objectProto2.hasOwnProperty;
11973
11993
  var objectToString2 = objectProto2.toString;
11974
- var reIsNative = RegExp(
11975
- "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
11994
+ var reIsNative2 = RegExp(
11995
+ "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
11976
11996
  );
11977
- var Buffer2 = moduleExports ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto2.propertyIsEnumerable, splice = arrayProto.splice;
11997
+ var Buffer2 = moduleExports ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate2 = Object.create, propertyIsEnumerable = objectProto2.propertyIsEnumerable, splice = arrayProto.splice;
11978
11998
  var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
11979
- var DataView2 = getNative(root2, "DataView"), Map2 = getNative(root2, "Map"), Promise2 = getNative(root2, "Promise"), Set = getNative(root2, "Set"), WeakMap = getNative(root2, "WeakMap"), nativeCreate = getNative(Object, "create");
11980
- var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
11999
+ var DataView2 = getNative2(root2, "DataView"), Map2 = getNative2(root2, "Map"), Promise2 = getNative2(root2, "Promise"), Set = getNative2(root2, "Set"), WeakMap = getNative2(root2, "WeakMap"), nativeCreate = getNative2(Object, "create");
12000
+ var dataViewCtorString = toSource2(DataView2), mapCtorString = toSource2(Map2), promiseCtorString = toSource2(Promise2), setCtorString = toSource2(Set), weakMapCtorString = toSource2(WeakMap);
11981
12001
  var symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
11982
12002
  function Hash(entries) {
11983
12003
  var index = -1, length = entries ? entries.length : 0;
@@ -11999,11 +12019,11 @@ var __publicField = (obj, key, value) => {
11999
12019
  var result = data[key];
12000
12020
  return result === HASH_UNDEFINED ? void 0 : result;
12001
12021
  }
12002
- return hasOwnProperty.call(data, key) ? data[key] : void 0;
12022
+ return hasOwnProperty2.call(data, key) ? data[key] : void 0;
12003
12023
  }
12004
12024
  function hashHas(key) {
12005
12025
  var data = this.__data__;
12006
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
12026
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty2.call(data, key);
12007
12027
  }
12008
12028
  function hashSet(key, value) {
12009
12029
  var data = this.__data__;
@@ -12130,7 +12150,7 @@ var __publicField = (obj, key, value) => {
12130
12150
  var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
12131
12151
  var length = result.length, skipIndexes = !!length;
12132
12152
  for (var key in value) {
12133
- if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
12153
+ if ((inherited || hasOwnProperty2.call(value, key)) && !(skipIndexes && (key == "length" || isIndex2(key, length)))) {
12134
12154
  result.push(key);
12135
12155
  }
12136
12156
  }
@@ -12138,7 +12158,7 @@ var __publicField = (obj, key, value) => {
12138
12158
  }
12139
12159
  function assignValue(object, key, value) {
12140
12160
  var objValue = object[key];
12141
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
12161
+ if (!(hasOwnProperty2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
12142
12162
  object[key] = value;
12143
12163
  }
12144
12164
  }
@@ -12169,15 +12189,15 @@ var __publicField = (obj, key, value) => {
12169
12189
  if (isArr) {
12170
12190
  result = initCloneArray(value);
12171
12191
  if (!isDeep) {
12172
- return copyArray(value, result);
12192
+ return copyArray2(value, result);
12173
12193
  }
12174
12194
  } else {
12175
- var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
12195
+ var tag = getTag(value), isFunc = tag == funcTag2 || tag == genTag2;
12176
12196
  if (isBuffer(value)) {
12177
12197
  return cloneBuffer(value, isDeep);
12178
12198
  }
12179
12199
  if (tag == objectTag || tag == argsTag || isFunc && !object) {
12180
- if (isHostObject(value)) {
12200
+ if (isHostObject2(value)) {
12181
12201
  return object ? value : {};
12182
12202
  }
12183
12203
  result = initCloneObject(isFunc ? {} : value);
@@ -12200,7 +12220,7 @@ var __publicField = (obj, key, value) => {
12200
12220
  if (!isArr) {
12201
12221
  var props = isFull ? getAllKeys(value) : keys(value);
12202
12222
  }
12203
- arrayEach(props || value, function(subValue, key2) {
12223
+ arrayEach2(props || value, function(subValue, key2) {
12204
12224
  if (props) {
12205
12225
  key2 = subValue;
12206
12226
  subValue = value[key2];
@@ -12209,8 +12229,8 @@ var __publicField = (obj, key, value) => {
12209
12229
  });
12210
12230
  return result;
12211
12231
  }
12212
- function baseCreate(proto2) {
12213
- return isObject2(proto2) ? objectCreate(proto2) : {};
12232
+ function baseCreate2(proto2) {
12233
+ return isObject2(proto2) ? objectCreate2(proto2) : {};
12214
12234
  }
12215
12235
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
12216
12236
  var result = keysFunc(object);
@@ -12219,12 +12239,12 @@ var __publicField = (obj, key, value) => {
12219
12239
  function baseGetTag(value) {
12220
12240
  return objectToString2.call(value);
12221
12241
  }
12222
- function baseIsNative(value) {
12223
- if (!isObject2(value) || isMasked(value)) {
12242
+ function baseIsNative2(value) {
12243
+ if (!isObject2(value) || isMasked2(value)) {
12224
12244
  return false;
12225
12245
  }
12226
- var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
12227
- return pattern.test(toSource(value));
12246
+ var pattern = isFunction2(value) || isHostObject2(value) ? reIsNative2 : reIsHostCtor2;
12247
+ return pattern.test(toSource2(value));
12228
12248
  }
12229
12249
  function baseKeys(object) {
12230
12250
  if (!isPrototype(object)) {
@@ -12232,7 +12252,7 @@ var __publicField = (obj, key, value) => {
12232
12252
  }
12233
12253
  var result = [];
12234
12254
  for (var key in Object(object)) {
12235
- if (hasOwnProperty.call(object, key) && key != "constructor") {
12255
+ if (hasOwnProperty2.call(object, key) && key != "constructor") {
12236
12256
  result.push(key);
12237
12257
  }
12238
12258
  }
@@ -12275,7 +12295,7 @@ var __publicField = (obj, key, value) => {
12275
12295
  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
12276
12296
  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
12277
12297
  }
12278
- function copyArray(source, array) {
12298
+ function copyArray2(source, array) {
12279
12299
  var index = -1, length = source.length;
12280
12300
  array || (array = Array(length));
12281
12301
  while (++index < length) {
@@ -12303,15 +12323,15 @@ var __publicField = (obj, key, value) => {
12303
12323
  var data = map.__data__;
12304
12324
  return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
12305
12325
  }
12306
- function getNative(object, key) {
12307
- var value = getValue(object, key);
12308
- return baseIsNative(value) ? value : void 0;
12326
+ function getNative2(object, key) {
12327
+ var value = getValue2(object, key);
12328
+ return baseIsNative2(value) ? value : void 0;
12309
12329
  }
12310
12330
  var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
12311
12331
  var getTag = baseGetTag;
12312
12332
  if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
12313
12333
  getTag = function(value) {
12314
- var result = objectToString2.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
12334
+ var result = objectToString2.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource2(Ctor) : void 0;
12315
12335
  if (ctorString) {
12316
12336
  switch (ctorString) {
12317
12337
  case dataViewCtorString:
@@ -12331,14 +12351,14 @@ var __publicField = (obj, key, value) => {
12331
12351
  }
12332
12352
  function initCloneArray(array) {
12333
12353
  var length = array.length, result = array.constructor(length);
12334
- if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
12354
+ if (length && typeof array[0] == "string" && hasOwnProperty2.call(array, "index")) {
12335
12355
  result.index = array.index;
12336
12356
  result.input = array.input;
12337
12357
  }
12338
12358
  return result;
12339
12359
  }
12340
12360
  function initCloneObject(object) {
12341
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
12361
+ return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate2(getPrototype(object)) : {};
12342
12362
  }
12343
12363
  function initCloneByTag(object, tag, cloneFunc, isDeep) {
12344
12364
  var Ctor = object.constructor;
@@ -12373,25 +12393,25 @@ var __publicField = (obj, key, value) => {
12373
12393
  return cloneSymbol(object);
12374
12394
  }
12375
12395
  }
12376
- function isIndex(value, length) {
12377
- length = length == null ? MAX_SAFE_INTEGER : length;
12378
- return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
12396
+ function isIndex2(value, length) {
12397
+ length = length == null ? MAX_SAFE_INTEGER2 : length;
12398
+ return !!length && (typeof value == "number" || reIsUint2.test(value)) && (value > -1 && value % 1 == 0 && value < length);
12379
12399
  }
12380
12400
  function isKeyable(value) {
12381
12401
  var type = typeof value;
12382
12402
  return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
12383
12403
  }
12384
- function isMasked(func) {
12385
- return !!maskSrcKey && maskSrcKey in func;
12404
+ function isMasked2(func) {
12405
+ return !!maskSrcKey2 && maskSrcKey2 in func;
12386
12406
  }
12387
12407
  function isPrototype(value) {
12388
12408
  var Ctor = value && value.constructor, proto2 = typeof Ctor == "function" && Ctor.prototype || objectProto2;
12389
12409
  return value === proto2;
12390
12410
  }
12391
- function toSource(func) {
12411
+ function toSource2(func) {
12392
12412
  if (func != null) {
12393
12413
  try {
12394
- return funcToString.call(func);
12414
+ return funcToString2.call(func);
12395
12415
  } catch (e2) {
12396
12416
  }
12397
12417
  try {
@@ -12408,22 +12428,22 @@ var __publicField = (obj, key, value) => {
12408
12428
  return value === other || value !== value && other !== other;
12409
12429
  }
12410
12430
  function isArguments(value) {
12411
- return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag);
12431
+ return isArrayLikeObject(value) && hasOwnProperty2.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag);
12412
12432
  }
12413
12433
  var isArray = Array.isArray;
12414
12434
  function isArrayLike(value) {
12415
- return value != null && isLength(value.length) && !isFunction(value);
12435
+ return value != null && isLength(value.length) && !isFunction2(value);
12416
12436
  }
12417
12437
  function isArrayLikeObject(value) {
12418
12438
  return isObjectLike2(value) && isArrayLike(value);
12419
12439
  }
12420
12440
  var isBuffer = nativeIsBuffer || stubFalse;
12421
- function isFunction(value) {
12441
+ function isFunction2(value) {
12422
12442
  var tag = isObject2(value) ? objectToString2.call(value) : "";
12423
- return tag == funcTag || tag == genTag;
12443
+ return tag == funcTag2 || tag == genTag2;
12424
12444
  }
12425
12445
  function isLength(value) {
12426
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
12446
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
12427
12447
  }
12428
12448
  function isObject2(value) {
12429
12449
  var type = typeof value;
@@ -12688,6 +12708,7 @@ var __publicField = (obj, key, value) => {
12688
12708
  "plugin:flv": "veplayer.plugin.flv.[env].[ext]",
12689
12709
  "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]",
12690
12710
  "plugin:hls": "veplayer.plugin.hls.[env].[ext]",
12711
+ "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]",
12691
12712
  "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]",
12692
12713
  "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]",
12693
12714
  "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]",
@@ -12700,6 +12721,7 @@ var __publicField = (obj, key, value) => {
12700
12721
  DynamicModule2["PluginFlv"] = "plugin:flv";
12701
12722
  DynamicModule2["PluginMp4"] = "plugin:mp4";
12702
12723
  DynamicModule2["PluginHls"] = "plugin:hls";
12724
+ DynamicModule2["PluginHlsJs"] = "plugin:hlsjs";
12703
12725
  DynamicModule2["PluginShaka"] = "plugin:shaka";
12704
12726
  DynamicModule2["PluginRtm"] = "plugin:rtm";
12705
12727
  DynamicModule2["PluginXgvideo"] = "plugin:xgvideo";
@@ -12820,6 +12842,495 @@ var __publicField = (obj, key, value) => {
12820
12842
  });
12821
12843
  }
12822
12844
  }
12845
+ var FUNC_ERROR_TEXT$1 = "Expected a function";
12846
+ var PLACEHOLDER = "__lodash_placeholder__";
12847
+ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, CURRY_FLAG = 8, CURRY_RIGHT_FLAG = 16, PARTIAL_FLAG = 32, PARTIAL_RIGHT_FLAG = 64, ARY_FLAG = 128, REARG_FLAG = 256, FLIP_FLAG = 512;
12848
+ var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN$1 = 0 / 0;
12849
+ var wrapFlags = [
12850
+ ["ary", ARY_FLAG],
12851
+ ["bind", BIND_FLAG],
12852
+ ["bindKey", BIND_KEY_FLAG],
12853
+ ["curry", CURRY_FLAG],
12854
+ ["curryRight", CURRY_RIGHT_FLAG],
12855
+ ["flip", FLIP_FLAG],
12856
+ ["partial", PARTIAL_FLAG],
12857
+ ["partialRight", PARTIAL_RIGHT_FLAG],
12858
+ ["rearg", REARG_FLAG]
12859
+ ];
12860
+ var funcTag = "[object Function]", genTag = "[object GeneratorFunction]", symbolTag$1 = "[object Symbol]";
12861
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
12862
+ var reTrim$1 = /^\s+|\s+$/g;
12863
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
12864
+ var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
12865
+ var reIsBinary$1 = /^0b[01]+$/i;
12866
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
12867
+ var reIsOctal$1 = /^0o[0-7]+$/i;
12868
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
12869
+ var freeParseInt$1 = parseInt;
12870
+ var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
12871
+ var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
12872
+ var root$1 = freeGlobal$1 || freeSelf$1 || Function("return this")();
12873
+ function apply(func, thisArg, args) {
12874
+ switch (args.length) {
12875
+ case 0:
12876
+ return func.call(thisArg);
12877
+ case 1:
12878
+ return func.call(thisArg, args[0]);
12879
+ case 2:
12880
+ return func.call(thisArg, args[0], args[1]);
12881
+ case 3:
12882
+ return func.call(thisArg, args[0], args[1], args[2]);
12883
+ }
12884
+ return func.apply(thisArg, args);
12885
+ }
12886
+ function arrayEach(array, iteratee) {
12887
+ var index = -1, length = array ? array.length : 0;
12888
+ while (++index < length) {
12889
+ if (iteratee(array[index], index, array) === false) {
12890
+ break;
12891
+ }
12892
+ }
12893
+ return array;
12894
+ }
12895
+ function arrayIncludes(array, value) {
12896
+ var length = array ? array.length : 0;
12897
+ return !!length && baseIndexOf(array, value, 0) > -1;
12898
+ }
12899
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
12900
+ var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
12901
+ while (fromRight ? index-- : ++index < length) {
12902
+ if (predicate(array[index], index, array)) {
12903
+ return index;
12904
+ }
12905
+ }
12906
+ return -1;
12907
+ }
12908
+ function baseIndexOf(array, value, fromIndex) {
12909
+ if (value !== value) {
12910
+ return baseFindIndex(array, baseIsNaN, fromIndex);
12911
+ }
12912
+ var index = fromIndex - 1, length = array.length;
12913
+ while (++index < length) {
12914
+ if (array[index] === value) {
12915
+ return index;
12916
+ }
12917
+ }
12918
+ return -1;
12919
+ }
12920
+ function baseIsNaN(value) {
12921
+ return value !== value;
12922
+ }
12923
+ function countHolders(array, placeholder) {
12924
+ var length = array.length, result = 0;
12925
+ while (length--) {
12926
+ if (array[length] === placeholder) {
12927
+ result++;
12928
+ }
12929
+ }
12930
+ return result;
12931
+ }
12932
+ function getValue(object, key) {
12933
+ return object == null ? void 0 : object[key];
12934
+ }
12935
+ function isHostObject(value) {
12936
+ var result = false;
12937
+ if (value != null && typeof value.toString != "function") {
12938
+ try {
12939
+ result = !!(value + "");
12940
+ } catch (e2) {
12941
+ }
12942
+ }
12943
+ return result;
12944
+ }
12945
+ function replaceHolders(array, placeholder) {
12946
+ var index = -1, length = array.length, resIndex = 0, result = [];
12947
+ while (++index < length) {
12948
+ var value = array[index];
12949
+ if (value === placeholder || value === PLACEHOLDER) {
12950
+ array[index] = PLACEHOLDER;
12951
+ result[resIndex++] = index;
12952
+ }
12953
+ }
12954
+ return result;
12955
+ }
12956
+ var funcProto = Function.prototype, objectProto$1 = Object.prototype;
12957
+ var coreJsData = root$1["__core-js_shared__"];
12958
+ var maskSrcKey = function() {
12959
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
12960
+ return uid ? "Symbol(src)_1." + uid : "";
12961
+ }();
12962
+ var funcToString = funcProto.toString;
12963
+ var hasOwnProperty = objectProto$1.hasOwnProperty;
12964
+ var objectToString$1 = objectProto$1.toString;
12965
+ var reIsNative = RegExp(
12966
+ "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
12967
+ );
12968
+ var objectCreate = Object.create;
12969
+ var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
12970
+ var defineProperty = function() {
12971
+ var func = getNative(Object, "defineProperty"), name = getNative.name;
12972
+ return name && name.length > 2 ? func : void 0;
12973
+ }();
12974
+ function baseCreate(proto2) {
12975
+ return isObject$1(proto2) ? objectCreate(proto2) : {};
12976
+ }
12977
+ function baseIsNative(value) {
12978
+ if (!isObject$1(value) || isMasked(value)) {
12979
+ return false;
12980
+ }
12981
+ var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
12982
+ return pattern.test(toSource(value));
12983
+ }
12984
+ function composeArgs(args, partials, holders, isCurried) {
12985
+ var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax$1(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried;
12986
+ while (++leftIndex < leftLength) {
12987
+ result[leftIndex] = partials[leftIndex];
12988
+ }
12989
+ while (++argsIndex < holdersLength) {
12990
+ if (isUncurried || argsIndex < argsLength) {
12991
+ result[holders[argsIndex]] = args[argsIndex];
12992
+ }
12993
+ }
12994
+ while (rangeLength--) {
12995
+ result[leftIndex++] = args[argsIndex++];
12996
+ }
12997
+ return result;
12998
+ }
12999
+ function composeArgsRight(args, partials, holders, isCurried) {
13000
+ var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax$1(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried;
13001
+ while (++argsIndex < rangeLength) {
13002
+ result[argsIndex] = args[argsIndex];
13003
+ }
13004
+ var offset = argsIndex;
13005
+ while (++rightIndex < rightLength) {
13006
+ result[offset + rightIndex] = partials[rightIndex];
13007
+ }
13008
+ while (++holdersIndex < holdersLength) {
13009
+ if (isUncurried || argsIndex < argsLength) {
13010
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
13011
+ }
13012
+ }
13013
+ return result;
13014
+ }
13015
+ function copyArray(source, array) {
13016
+ var index = -1, length = source.length;
13017
+ array || (array = Array(length));
13018
+ while (++index < length) {
13019
+ array[index] = source[index];
13020
+ }
13021
+ return array;
13022
+ }
13023
+ function createBind(func, bitmask, thisArg) {
13024
+ var isBind = bitmask & BIND_FLAG, Ctor = createCtor(func);
13025
+ function wrapper() {
13026
+ var fn = this && this !== root$1 && this instanceof wrapper ? Ctor : func;
13027
+ return fn.apply(isBind ? thisArg : this, arguments);
13028
+ }
13029
+ return wrapper;
13030
+ }
13031
+ function createCtor(Ctor) {
13032
+ return function() {
13033
+ var args = arguments;
13034
+ switch (args.length) {
13035
+ case 0:
13036
+ return new Ctor();
13037
+ case 1:
13038
+ return new Ctor(args[0]);
13039
+ case 2:
13040
+ return new Ctor(args[0], args[1]);
13041
+ case 3:
13042
+ return new Ctor(args[0], args[1], args[2]);
13043
+ case 4:
13044
+ return new Ctor(args[0], args[1], args[2], args[3]);
13045
+ case 5:
13046
+ return new Ctor(args[0], args[1], args[2], args[3], args[4]);
13047
+ case 6:
13048
+ return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
13049
+ case 7:
13050
+ return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
13051
+ }
13052
+ var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args);
13053
+ return isObject$1(result) ? result : thisBinding;
13054
+ };
13055
+ }
13056
+ function createCurry(func, bitmask, arity) {
13057
+ var Ctor = createCtor(func);
13058
+ function wrapper() {
13059
+ var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper);
13060
+ while (index--) {
13061
+ args[index] = arguments[index];
13062
+ }
13063
+ var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
13064
+ length -= holders.length;
13065
+ if (length < arity) {
13066
+ return createRecurry(
13067
+ func,
13068
+ bitmask,
13069
+ createHybrid,
13070
+ wrapper.placeholder,
13071
+ void 0,
13072
+ args,
13073
+ holders,
13074
+ void 0,
13075
+ void 0,
13076
+ arity - length
13077
+ );
13078
+ }
13079
+ var fn = this && this !== root$1 && this instanceof wrapper ? Ctor : func;
13080
+ return apply(fn, this, args);
13081
+ }
13082
+ return wrapper;
13083
+ }
13084
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
13085
+ var isAry = bitmask & ARY_FLAG, isBind = bitmask & BIND_FLAG, isBindKey = bitmask & BIND_KEY_FLAG, isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), isFlip = bitmask & FLIP_FLAG, Ctor = isBindKey ? void 0 : createCtor(func);
13086
+ function wrapper() {
13087
+ var length = arguments.length, args = Array(length), index = length;
13088
+ while (index--) {
13089
+ args[index] = arguments[index];
13090
+ }
13091
+ if (isCurried) {
13092
+ var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
13093
+ }
13094
+ if (partials) {
13095
+ args = composeArgs(args, partials, holders, isCurried);
13096
+ }
13097
+ if (partialsRight) {
13098
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
13099
+ }
13100
+ length -= holdersCount;
13101
+ if (isCurried && length < arity) {
13102
+ var newHolders = replaceHolders(args, placeholder);
13103
+ return createRecurry(
13104
+ func,
13105
+ bitmask,
13106
+ createHybrid,
13107
+ wrapper.placeholder,
13108
+ thisArg,
13109
+ args,
13110
+ newHolders,
13111
+ argPos,
13112
+ ary,
13113
+ arity - length
13114
+ );
13115
+ }
13116
+ var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
13117
+ length = args.length;
13118
+ if (argPos) {
13119
+ args = reorder(args, argPos);
13120
+ } else if (isFlip && length > 1) {
13121
+ args.reverse();
13122
+ }
13123
+ if (isAry && ary < length) {
13124
+ args.length = ary;
13125
+ }
13126
+ if (this && this !== root$1 && this instanceof wrapper) {
13127
+ fn = Ctor || createCtor(fn);
13128
+ }
13129
+ return fn.apply(thisBinding, args);
13130
+ }
13131
+ return wrapper;
13132
+ }
13133
+ function createPartial(func, bitmask, thisArg, partials) {
13134
+ var isBind = bitmask & BIND_FLAG, Ctor = createCtor(func);
13135
+ function wrapper() {
13136
+ var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = this && this !== root$1 && this instanceof wrapper ? Ctor : func;
13137
+ while (++leftIndex < leftLength) {
13138
+ args[leftIndex] = partials[leftIndex];
13139
+ }
13140
+ while (argsLength--) {
13141
+ args[leftIndex++] = arguments[++argsIndex];
13142
+ }
13143
+ return apply(fn, isBind ? thisArg : this, args);
13144
+ }
13145
+ return wrapper;
13146
+ }
13147
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
13148
+ var isCurry = bitmask & CURRY_FLAG, newHolders = isCurry ? holders : void 0, newHoldersRight = isCurry ? void 0 : holders, newPartials = isCurry ? partials : void 0, newPartialsRight = isCurry ? void 0 : partials;
13149
+ bitmask |= isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG;
13150
+ bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
13151
+ if (!(bitmask & CURRY_BOUND_FLAG)) {
13152
+ bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
13153
+ }
13154
+ var result = wrapFunc(func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity);
13155
+ result.placeholder = placeholder;
13156
+ return setWrapToString(result, func, bitmask);
13157
+ }
13158
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
13159
+ var isBindKey = bitmask & BIND_KEY_FLAG;
13160
+ if (!isBindKey && typeof func != "function") {
13161
+ throw new TypeError(FUNC_ERROR_TEXT$1);
13162
+ }
13163
+ var length = partials ? partials.length : 0;
13164
+ if (!length) {
13165
+ bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
13166
+ partials = holders = void 0;
13167
+ }
13168
+ ary = ary === void 0 ? ary : nativeMax$1(toInteger(ary), 0);
13169
+ arity = arity === void 0 ? arity : toInteger(arity);
13170
+ length -= holders ? holders.length : 0;
13171
+ if (bitmask & PARTIAL_RIGHT_FLAG) {
13172
+ var partialsRight = partials, holdersRight = holders;
13173
+ partials = holders = void 0;
13174
+ }
13175
+ var newData = [
13176
+ func,
13177
+ bitmask,
13178
+ thisArg,
13179
+ partials,
13180
+ holders,
13181
+ partialsRight,
13182
+ holdersRight,
13183
+ argPos,
13184
+ ary,
13185
+ arity
13186
+ ];
13187
+ func = newData[0];
13188
+ bitmask = newData[1];
13189
+ thisArg = newData[2];
13190
+ partials = newData[3];
13191
+ holders = newData[4];
13192
+ arity = newData[9] = newData[9] == null ? isBindKey ? 0 : func.length : nativeMax$1(newData[9] - length, 0);
13193
+ if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
13194
+ bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
13195
+ }
13196
+ if (!bitmask || bitmask == BIND_FLAG) {
13197
+ var result = createBind(func, bitmask, thisArg);
13198
+ } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
13199
+ result = createCurry(func, bitmask, arity);
13200
+ } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
13201
+ result = createPartial(func, bitmask, thisArg, partials);
13202
+ } else {
13203
+ result = createHybrid.apply(void 0, newData);
13204
+ }
13205
+ return setWrapToString(result, func, bitmask);
13206
+ }
13207
+ function getHolder(func) {
13208
+ var object = func;
13209
+ return object.placeholder;
13210
+ }
13211
+ function getNative(object, key) {
13212
+ var value = getValue(object, key);
13213
+ return baseIsNative(value) ? value : void 0;
13214
+ }
13215
+ function getWrapDetails(source) {
13216
+ var match = source.match(reWrapDetails);
13217
+ return match ? match[1].split(reSplitDetails) : [];
13218
+ }
13219
+ function insertWrapDetails(source, details) {
13220
+ var length = details.length, lastIndex = length - 1;
13221
+ details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
13222
+ details = details.join(length > 2 ? ", " : " ");
13223
+ return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
13224
+ }
13225
+ function isIndex(value, length) {
13226
+ length = length == null ? MAX_SAFE_INTEGER : length;
13227
+ return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
13228
+ }
13229
+ function isMasked(func) {
13230
+ return !!maskSrcKey && maskSrcKey in func;
13231
+ }
13232
+ function reorder(array, indexes) {
13233
+ var arrLength = array.length, length = nativeMin$1(indexes.length, arrLength), oldArray = copyArray(array);
13234
+ while (length--) {
13235
+ var index = indexes[length];
13236
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : void 0;
13237
+ }
13238
+ return array;
13239
+ }
13240
+ var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) {
13241
+ var source = reference + "";
13242
+ return defineProperty(wrapper, "toString", {
13243
+ "configurable": true,
13244
+ "enumerable": false,
13245
+ "value": constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)))
13246
+ });
13247
+ };
13248
+ function toSource(func) {
13249
+ if (func != null) {
13250
+ try {
13251
+ return funcToString.call(func);
13252
+ } catch (e2) {
13253
+ }
13254
+ try {
13255
+ return func + "";
13256
+ } catch (e2) {
13257
+ }
13258
+ }
13259
+ return "";
13260
+ }
13261
+ function updateWrapDetails(details, bitmask) {
13262
+ arrayEach(wrapFlags, function(pair) {
13263
+ var value = "_." + pair[0];
13264
+ if (bitmask & pair[1] && !arrayIncludes(details, value)) {
13265
+ details.push(value);
13266
+ }
13267
+ });
13268
+ return details.sort();
13269
+ }
13270
+ function curry(func, arity, guard) {
13271
+ arity = guard ? void 0 : arity;
13272
+ var result = createWrap(func, CURRY_FLAG, void 0, void 0, void 0, void 0, void 0, arity);
13273
+ result.placeholder = curry.placeholder;
13274
+ return result;
13275
+ }
13276
+ function isFunction(value) {
13277
+ var tag = isObject$1(value) ? objectToString$1.call(value) : "";
13278
+ return tag == funcTag || tag == genTag;
13279
+ }
13280
+ function isObject$1(value) {
13281
+ var type = typeof value;
13282
+ return !!value && (type == "object" || type == "function");
13283
+ }
13284
+ function isObjectLike$1(value) {
13285
+ return !!value && typeof value == "object";
13286
+ }
13287
+ function isSymbol$1(value) {
13288
+ return typeof value == "symbol" || isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1;
13289
+ }
13290
+ function toFinite(value) {
13291
+ if (!value) {
13292
+ return value === 0 ? value : 0;
13293
+ }
13294
+ value = toNumber$1(value);
13295
+ if (value === INFINITY || value === -INFINITY) {
13296
+ var sign = value < 0 ? -1 : 1;
13297
+ return sign * MAX_INTEGER;
13298
+ }
13299
+ return value === value ? value : 0;
13300
+ }
13301
+ function toInteger(value) {
13302
+ var result = toFinite(value), remainder = result % 1;
13303
+ return result === result ? remainder ? result - remainder : result : 0;
13304
+ }
13305
+ function toNumber$1(value) {
13306
+ if (typeof value == "number") {
13307
+ return value;
13308
+ }
13309
+ if (isSymbol$1(value)) {
13310
+ return NAN$1;
13311
+ }
13312
+ if (isObject$1(value)) {
13313
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
13314
+ value = isObject$1(other) ? other + "" : other;
13315
+ }
13316
+ if (typeof value != "string") {
13317
+ return value === 0 ? value : +value;
13318
+ }
13319
+ value = value.replace(reTrim$1, "");
13320
+ var isBinary = reIsBinary$1.test(value);
13321
+ return isBinary || reIsOctal$1.test(value) ? freeParseInt$1(value.slice(2), isBinary ? 2 : 8) : reIsBadHex$1.test(value) ? NAN$1 : +value;
13322
+ }
13323
+ function constant(value) {
13324
+ return function() {
13325
+ return value;
13326
+ };
13327
+ }
13328
+ function identity(value) {
13329
+ return value;
13330
+ }
13331
+ curry.placeholder = {};
13332
+ var lodash_curry = curry;
13333
+ var curry$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_curry);
12823
13334
  const src = typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : document.currentScript && document.currentScript.src || new URL("umd/veplayer.development.js", document.baseURI).href;
12824
13335
  const baseUrl = src.slice(0, src.lastIndexOf("/"));
12825
13336
  const loader = new Loader({
@@ -12844,7 +13355,7 @@ var __publicField = (obj, key, value) => {
12844
13355
  });
12845
13356
  }
12846
13357
  }
12847
- const appendSearchParams = (url, searchParams) => {
13358
+ const appendSearchParams$1 = (url, searchParams) => {
12848
13359
  var _a, _b;
12849
13360
  const urlObject = getUrlObject(url);
12850
13361
  if (!url || !urlObject) {
@@ -12879,11 +13390,16 @@ var __publicField = (obj, key, value) => {
12879
13390
  return;
12880
13391
  }
12881
13392
  };
12882
- function isType(suffix) {
12883
- return function(url) {
12884
- return url == null ? void 0 : url.split("?")[0].toLowerCase().includes(suffix);
12885
- };
12886
- }
13393
+ const H264_MIME = 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
13394
+ const H265_MIME = [
13395
+ 'video/mp4;codecs="hev1.1.6.L120.90"',
13396
+ 'video/mp4;codecs="hev1.2.4.L120.90"',
13397
+ 'video/mp4;codecs="hev1.3.E.L120.90"',
13398
+ 'video/mp4;codecs="hev1.4.10.L120.90"'
13399
+ ];
13400
+ const isType = curry$1(function(suffix, url) {
13401
+ return url == null ? void 0 : url.split("?")[0].toLowerCase().includes(suffix);
13402
+ });
12887
13403
  const isHls = isType(".m3u8");
12888
13404
  const isMp4 = isType(".mp4");
12889
13405
  const isFlv = isType(".flv");
@@ -12907,22 +13423,40 @@ var __publicField = (obj, key, value) => {
12907
13423
  }
12908
13424
  return "unknown";
12909
13425
  }
12910
- function isMseSupported(codec = Codec.H264) {
13426
+ function isMseSupported$1(codec = Codec.H264) {
12911
13427
  if (codec === Codec.H265) {
12912
13428
  return sniffer$1.isHevcSupported();
12913
13429
  }
12914
- return sniffer$1.isMSESupport();
13430
+ if (codec === Codec.H264) {
13431
+ return sniffer$1.isMSESupport();
13432
+ }
13433
+ return sniffer$1.isMSESupport(codec);
12915
13434
  }
12916
13435
  async function isSoftDecodeSupported() {
12917
13436
  const { XGVideoPlugin } = await load(DynamicModule.PluginXgvideo);
12918
13437
  return XGVideoPlugin == null ? void 0 : XGVideoPlugin.isSupported();
12919
13438
  }
13439
+ function isMMSSupported$1(codec = Codec.H264) {
13440
+ if (typeof window.ManagedMediaSource === "undefined") {
13441
+ return false;
13442
+ }
13443
+ if (codec === Codec.H264) {
13444
+ return window.ManagedMediaSource.isTypeSupported(H264_MIME);
13445
+ }
13446
+ if (codec === Codec.H265) {
13447
+ return H265_MIME.some((mine) => {
13448
+ return window.ManagedMediaSource.isTypeSupported(mine);
13449
+ });
13450
+ }
13451
+ return window.ManagedMediaSource.isTypeSupported(codec);
13452
+ }
12920
13453
  const util = {
12921
13454
  ...util$1,
12922
13455
  getStreamType,
12923
- isMseSupported,
13456
+ isMseSupported: isMseSupported$1,
12924
13457
  isSoftDecodeSupported,
12925
- appendSearchParams,
13458
+ isMMSSupported: isMMSSupported$1,
13459
+ appendSearchParams: appendSearchParams$1,
12926
13460
  getUrlObject
12927
13461
  };
12928
13462
  var autoplay = "";
@@ -13844,7 +14378,7 @@ var __publicField = (obj, key, value) => {
13844
14378
  * @brief Retrieve the player SDK version number.
13845
14379
  */
13846
14380
  get playerVersion() {
13847
- return "2.6.0-rc.4";
14381
+ return "2.6.0";
13848
14382
  }
13849
14383
  /** {zh}
13850
14384
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -14328,25 +14862,27 @@ var __publicField = (obj, key, value) => {
14328
14862
  * @hidden
14329
14863
  */
14330
14864
  async prepare(url) {
14331
- var _a, _b;
14865
+ var _a, _b, _c, _d, _e, _f, _g;
14332
14866
  const result = await ((_a = this._preparePlugins) == null ? void 0 : _a.call(this, url));
14333
- const { removedPlugins, addedPlugins } = this._diffPlugins(
14334
- ((_b = this._previousPrepareResult) == null ? void 0 : _b.plugins) ?? [],
14335
- (result == null ? void 0 : result.plugins) ?? []
14336
- );
14337
- removedPlugins == null ? void 0 : removedPlugins.forEach((pluginName) => {
14338
- /* istanbul ignore next -- @preserve */
14339
- this._player.unRegisterPlugin(pluginName);
14340
- });
14867
+ const newUrl = ((_b = result == null ? void 0 : result.options) == null ? void 0 : _b.url) ?? url;
14868
+ const oldUrl = (_d = (_c = this._player) == null ? void 0 : _c.config) == null ? void 0 : _d.url;
14869
+ const isSameProtocol = oldUrl && getStreamType(newUrl) === getStreamType(oldUrl);
14870
+ if (!isSameProtocol) {
14871
+ (_f = (_e = this._previousPrepareResult) == null ? void 0 : _e.plugins) == null ? void 0 : _f.forEach((plugin) => {
14872
+ this._player.unRegisterPlugin(plugin.pluginName);
14873
+ });
14874
+ }
14341
14875
  this._previousPrepareResult = result;
14342
14876
  if (result == null ? void 0 : result.options) {
14343
14877
  this._player.setConfig(result.options);
14344
14878
  }
14345
14879
  return {
14346
- plugins: addedPlugins.map((plugin) => {
14880
+ plugins: isSameProtocol ? [] : (_g = result == null ? void 0 : result.plugins) == null ? void 0 : _g.map((plugin) => {
14347
14881
  return this._player.registerPlugin(plugin);
14348
14882
  }),
14349
- options: result == null ? void 0 : result.options
14883
+ options: result == null ? void 0 : result.options,
14884
+ isSameProtocol,
14885
+ useSrc: result == null ? void 0 : result.useSrc
14350
14886
  };
14351
14887
  }
14352
14888
  async _handleFallback(err) {
@@ -14389,81 +14925,105 @@ var __publicField = (obj, key, value) => {
14389
14925
  async _switch(targetDefinition) {
14390
14926
  var _a, _b, _c, _d, _e, _f;
14391
14927
  const preDefinition = clonedeep(this._sourceManager.definition);
14392
- const { plugins: newPlugins, options } = await this.prepare(targetDefinition.url) || {};
14928
+ const isPaused = this._player.paused && !this._player.isError;
14929
+ const {
14930
+ plugins: newPlugins,
14931
+ options,
14932
+ isSameProtocol,
14933
+ useSrc
14934
+ } = await this.prepare(targetDefinition.url) || {};
14393
14935
  if (options == null ? void 0 : options.url) {
14394
14936
  targetDefinition.url = options == null ? void 0 : options.url;
14395
14937
  }
14396
14938
  this._sourceManager.switch(targetDefinition);
14397
14939
  (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources.renderItemList();
14398
14940
  (_d = (_c = this._player) == null ? void 0 : _c.plugins) == null ? void 0 : _d.definition.renderItemList();
14399
- if (((_e = targetDefinition == null ? void 0 : targetDefinition.source) == null ? void 0 : _e.name) !== ((_f = preDefinition == null ? void 0 : preDefinition.source) == null ? void 0 : _f.name)) {
14400
- this.emit(Events$1.SOURCE_CHANGE);
14401
- }
14402
- if (newPlugins == null ? void 0 : newPlugins.length) {
14403
- this.emit(Events$1.DEFINITION_CHANGE);
14404
- await this._callBeforePlayerInitForUrl(newPlugins, targetDefinition.url);
14405
- this.emit(Events$1.AFTER_DEFINITION_CHANGE);
14941
+ const isSourceSwitching = ((_e = targetDefinition == null ? void 0 : targetDefinition.source) == null ? void 0 : _e.name) !== ((_f = preDefinition == null ? void 0 : preDefinition.source) == null ? void 0 : _f.name);
14942
+ this._player.config.url = targetDefinition.url;
14943
+ if (isSameProtocol) {
14944
+ if (isSourceSwitching) {
14945
+ this.emit(Events$1.SOURCE_CHANGE);
14946
+ this._player.switchURL(targetDefinition.url);
14947
+ } else {
14948
+ this._player.changeDefinition(targetDefinition, preDefinition);
14949
+ }
14406
14950
  } else {
14407
- this._player.changeDefinition(targetDefinition, preDefinition);
14951
+ this.emit(
14952
+ isSourceSwitching ? Events$1.SOURCE_CHANGE : Events$1.DEFINITION_CHANGE
14953
+ );
14954
+ await this._switchDifferentProtocolUrl(
14955
+ newPlugins,
14956
+ targetDefinition.url,
14957
+ isPaused,
14958
+ useSrc
14959
+ );
14960
+ !isSourceSwitching && this.emit(Events$1.AFTER_DEFINITION_CHANGE);
14961
+ }
14962
+ }
14963
+ async _switchDifferentProtocolUrl(plugins, url, isPaused, useSrc) {
14964
+ var _a, _b;
14965
+ if (useSrc && this._player.media) {
14966
+ if ((_a = this._player.config) == null ? void 0 : _a.preProcessUrl) {
14967
+ url = (_b = this._player.config) == null ? void 0 : _b.preProcessUrl(url).url;
14968
+ }
14969
+ this._player.media.src = url;
14970
+ }
14971
+ if (plugins == null ? void 0 : plugins.length) {
14972
+ await this._callBeforePlayerInitForUrl(plugins);
14408
14973
  }
14974
+ return new Promise((resolve) => {
14975
+ const curTime = this._player.currentTime;
14976
+ const _canplay = () => {
14977
+ console.log("canplay canplay");
14978
+ this._player.currentTime = curTime;
14979
+ if (isPaused) {
14980
+ this._player.once(CANPLAY, () => {
14981
+ this._player.pause();
14982
+ });
14983
+ }
14984
+ resolve();
14985
+ };
14986
+ if (sniffer$1.os.isAndroid) {
14987
+ this.once(TIME_UPDATE, () => {
14988
+ _canplay();
14989
+ });
14990
+ } else {
14991
+ this.once(CANPLAY, () => {
14992
+ _canplay();
14993
+ });
14994
+ }
14995
+ this._player.play();
14996
+ });
14409
14997
  }
14410
14998
  async _switchUrl(url, config) {
14411
- const { plugins: newPlugins, options } = await this.prepare(url) || {};
14999
+ const isPaused = this._player.paused && !this._player.isError;
15000
+ const {
15001
+ plugins: newPlugins,
15002
+ options,
15003
+ isSameProtocol,
15004
+ useSrc
15005
+ } = await this.prepare(url) || {};
14412
15006
  const newUrl = (options == null ? void 0 : options.url) ?? url;
14413
15007
  this._sourceManager.url = newUrl;
14414
- if (newPlugins == null ? void 0 : newPlugins.length) {
14415
- this._callBeforePlayerInitForUrl(newPlugins, newUrl);
14416
- } else {
15008
+ this._player.config.url = newUrl;
15009
+ if (isSameProtocol) {
14417
15010
  const res = this._player.switchURL(newUrl, {
14418
15011
  seamless: config == null ? void 0 : config.seamless
14419
15012
  });
14420
- const curTime = this._player.currentTime;
14421
15013
  if (res && res.then) {
14422
15014
  return res;
14423
- } else {
14424
- return new Promise((resolve) => {
14425
- const isPaused = this._player.paused && !this._player.isError;
14426
- const _canplay = () => {
14427
- this._player.currentTime = curTime;
14428
- if (isPaused) {
14429
- this._player.once(CANPLAY, () => {
14430
- this._player.pause();
14431
- });
14432
- }
14433
- resolve();
14434
- };
14435
- if (sniffer$1.os.isAndroid) {
14436
- this.once(TIME_UPDATE, () => {
14437
- _canplay();
14438
- });
14439
- } else {
14440
- this.once(CANPLAY, () => {
14441
- _canplay();
14442
- });
14443
- }
14444
- this._player.play();
14445
- });
14446
15015
  }
15016
+ } else {
15017
+ return this._switchDifferentProtocolUrl(
15018
+ newPlugins,
15019
+ newUrl,
15020
+ isPaused,
15021
+ useSrc
15022
+ );
14447
15023
  }
14448
15024
  }
14449
- // 获取需要卸载和需要注册的播放插件
14450
- _diffPlugins(previousPlugins, newPlugins) {
14451
- const previousPluginNames = previousPlugins.map((item) => item.pluginName);
14452
- const newPluginNames = newPlugins.map((item) => item.pluginName);
14453
- const removedPlugins = previousPluginNames.filter(
14454
- (name) => !newPluginNames.includes(name)
14455
- );
14456
- const addedPlugins = newPlugins.filter(
14457
- (name) => !previousPluginNames.includes(name.pluginName)
14458
- );
14459
- return {
14460
- removedPlugins,
14461
- addedPlugins
14462
- };
14463
- }
14464
- _callBeforePlayerInitForUrl(newPlugins, url) {
15025
+ _callBeforePlayerInitForUrl(newPlugins) {
14465
15026
  return new Promise((resolve) => {
14466
- this._player.config.url = url;
14467
15027
  newPlugins == null ? void 0 : newPlugins.forEach((plugin) => {
14468
15028
  plugin.beforePlayerInit();
14469
15029
  });
@@ -18965,58 +19525,29 @@ var __publicField = (obj, key, value) => {
18965
19525
  return result;
18966
19526
  }
18967
19527
  }
18968
- const getFlvStrategy = async (options) => {
18969
- var _a, _b, _c, _d, _e, _f;
18970
- let mseStrategy;
18971
- let softStrategy;
18972
- const enableLowLatency = ((_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.enableLowLatency) && sniffer$1.device === "pc";
18973
- const enableFrameChasing = ((_c = (_b = options == null ? void 0 : options.flv) == null ? void 0 : _b.lowLatency) == null ? void 0 : _c.enableFrameChasing) ?? true;
18974
- const abrPts = ((_e = (_d = options == null ? void 0 : options.flv) == null ? void 0 : _d.lowLatency) == null ? void 0 : _e.abrPts) ?? "-800";
18975
- const codec = await getCodec(options);
18976
- const isSoftDecode$1 = await isSoftDecode(options, codec);
18977
- if (isSoftDecode$1) {
18978
- softStrategy = codec === Codec.H265 ? createSoftDecodeH265Strategy() : createSoftDecodeH264Strategy();
18979
- mseStrategy = createFlvMseStrategy(options);
18980
- }
18981
- if (codec === "unknown" ? isMseSupported(Codec.H264) : isMseSupported(codec)) {
18982
- mseStrategy = createFlvMseStrategy(options);
18983
- }
18984
- if (!mseStrategy && !softStrategy) {
18985
- return {};
18986
- }
18987
- const [mseModule, softModule] = await Promise.all([
18988
- (mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
18989
- (softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
18990
- ]);
18991
- (softModule == null ? void 0 : softModule.XGVideoPlugin) && ((_f = softStrategy == null ? void 0 : softStrategy.afterLoad) == null ? void 0 : _f.call(softStrategy, softModule == null ? void 0 : softModule.XGVideoPlugin));
18992
- const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
18993
- const plugins = [];
18994
- if (enableLowLatency) {
18995
- combineOptions$1.url = appendSearchParams(options.url, { abr_pts: abrPts });
19528
+ function enableHlsJs(options) {
19529
+ var _a, _b;
19530
+ if ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableHlsJs) {
19531
+ return true;
18996
19532
  }
18997
- if (mseModule) {
18998
- plugins.push(mseModule.FlvPlugin);
18999
- if (enableLowLatency && enableFrameChasing) {
19000
- plugins.push(mseModule.Adaptive);
19001
- }
19533
+ if (((_b = options == null ? void 0 : options.ad) == null ? void 0 : _b.adType) === "ssai") {
19534
+ return true;
19002
19535
  }
19003
- return {
19004
- options: combineOptions$1,
19005
- plugins
19006
- };
19007
- };
19536
+ return false;
19537
+ }
19008
19538
  const getHlsStrategy = async (options) => {
19009
19539
  var _a, _b;
19010
19540
  let mseStrategy;
19011
19541
  let softStrategy;
19012
19542
  const codec = await getCodec(options);
19013
19543
  const isSoftDecode$1 = await isSoftDecode(options, codec);
19544
+ const useHlsJs = enableHlsJs(options);
19014
19545
  if (isSoftDecode$1) {
19015
19546
  softStrategy = codec === Codec.H265 ? createSoftDecodeH265Strategy() : createSoftDecodeH264Strategy();
19016
- mseStrategy = createHlsMseStrategy(options);
19547
+ mseStrategy = createHlsMseStrategy(options, useHlsJs);
19017
19548
  }
19018
- if ((sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && (codec === "unknown" ? isMseSupported(Codec.H264) : isMseSupported(codec))) {
19019
- mseStrategy = createHlsMseStrategy(options);
19549
+ if ((sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && (codec === "unknown" ? isMseSupported$1(Codec.H264) : isMseSupported$1(codec))) {
19550
+ mseStrategy = createHlsMseStrategy(options, useHlsJs);
19020
19551
  }
19021
19552
  if (!mseStrategy && !softStrategy) {
19022
19553
  return {};
@@ -19032,28 +19563,42 @@ var __publicField = (obj, key, value) => {
19032
19563
  plugins: (mseModule == null ? void 0 : mseModule.HlsPlugin) ? [mseModule.HlsPlugin] : []
19033
19564
  };
19034
19565
  };
19035
- const createFlvMseStrategy = (options) => {
19566
+ const getDefaultFlvOptions = (options) => {
19036
19567
  var _a;
19037
19568
  return {
19038
- options: {
19039
- flv: {
19040
- retryCount: 0,
19041
- disconnectRetryCount: ((_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.retryCount) ?? void 0,
19042
- ...(options == null ? void 0 : options.flv) ?? {}
19043
- }
19044
- },
19045
- module: DynamicModule.PluginFlv
19569
+ retryCount: 0,
19570
+ disconnectRetryCount: ((_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.retryCount) ?? void 0
19046
19571
  };
19047
19572
  };
19048
- const createHlsMseStrategy = (options) => ({
19573
+ const createFlvMseStrategy = (options) => ({
19574
+ options: {
19575
+ flv: {
19576
+ ...getDefaultFlvOptions(options),
19577
+ ...(options == null ? void 0 : options.flv) ?? {}
19578
+ }
19579
+ },
19580
+ module: DynamicModule.PluginFlv
19581
+ });
19582
+ const createFlvMssStrategy = (options) => ({
19583
+ options: {
19584
+ flv: {
19585
+ preferMMS: true,
19586
+ ...getDefaultFlvOptions(options),
19587
+ ...(options == null ? void 0 : options.flv) ?? {}
19588
+ }
19589
+ },
19590
+ module: DynamicModule.PluginFlv
19591
+ });
19592
+ const createHlsMseStrategy = (options, useHlsJs) => ({
19049
19593
  options: {
19050
19594
  hls: {
19051
19595
  retryCount: 0,
19052
19596
  pollRetryCount: 0,
19597
+ allowedStreamTrackChange: false,
19053
19598
  ...(options == null ? void 0 : options.hls) ?? {}
19054
19599
  }
19055
19600
  },
19056
- module: DynamicModule.PluginHls
19601
+ module: useHlsJs ? DynamicModule.PluginHlsJs : DynamicModule.PluginHls
19057
19602
  });
19058
19603
  const createSoftDecodeH264Strategy = () => ({
19059
19604
  options: {
@@ -19148,6 +19693,8 @@ var __publicField = (obj, key, value) => {
19148
19693
  const { VeError } = error$1;
19149
19694
  var LiveErrorCode = /* @__PURE__ */ ((LiveErrorCode2) => {
19150
19695
  LiveErrorCode2[LiveErrorCode2["INVALID_PARAMETER"] = 210] = "INVALID_PARAMETER";
19696
+ LiveErrorCode2[LiveErrorCode2["EMPTY_RTM_FALLBACK_PARAMETER"] = 211] = "EMPTY_RTM_FALLBACK_PARAMETER";
19697
+ LiveErrorCode2[LiveErrorCode2["INVALID_LOGGER"] = 220] = "INVALID_LOGGER";
19151
19698
  return LiveErrorCode2;
19152
19699
  })(LiveErrorCode || {});
19153
19700
  const ErrorCode = {
@@ -19162,10 +19709,30 @@ var __publicField = (obj, key, value) => {
19162
19709
  ]: {
19163
19710
  messageTextKey: "INVALID_PARAMETER",
19164
19711
  level: Level.Fatal
19712
+ },
19713
+ [
19714
+ 211
19715
+ /* EMPTY_RTM_FALLBACK_PARAMETER */
19716
+ ]: {
19717
+ messageTextKey: "EMPTY_RTM_FALLBACK_PARAMETER",
19718
+ level: Level.Warn
19719
+ },
19720
+ [
19721
+ 220
19722
+ /* INVALID_LOGGER */
19723
+ ]: {
19724
+ messageTextKey: "INVALID_LOGGER",
19725
+ level: Level.Warn
19165
19726
  }
19166
19727
  };
19167
19728
  function create(errorCode, i18n) {
19168
- return new VeError(ERRORS[errorCode], i18n);
19729
+ return new VeError(
19730
+ {
19731
+ errorCode,
19732
+ ...ERRORS[errorCode]
19733
+ },
19734
+ i18n
19735
+ );
19169
19736
  }
19170
19737
  async function isRTMSupported() {
19171
19738
  const { RtmPlugin } = await load(DynamicModule.PluginRtm);
@@ -19188,21 +19755,32 @@ var __publicField = (obj, key, value) => {
19188
19755
  return url.replace(".sdp", ".m3u8");
19189
19756
  }
19190
19757
  };
19191
- const getRtmStrategy = async (options, player) => {
19192
- var _a;
19758
+ const getRtmStrategy = async (options, player, i18n) => {
19759
+ var _a, _b;
19193
19760
  let backupStrategy;
19194
- const { url } = options;
19195
- const {
19196
- fallbackUrl,
19197
- enableFallback = true,
19198
- enableRTMAutoTranscode,
19199
- ...ret
19200
- } = options.rtm || {};
19201
- const actualFallbackUrl = !enableFallback ? "" : !fallbackUrl && url ? generateFallbackUrl(url) : fallbackUrl;
19761
+ let actualFallbackUrl = "";
19762
+ const { url, playlist } = options;
19763
+ const { fallbackUrl, enableRTMAutoTranscode, ...ret } = options.rtm || {};
19764
+ let { enableFallback = true } = options.rtm || {};
19765
+ if (playlist == null ? void 0 : playlist.length) {
19766
+ enableFallback = false;
19767
+ }
19768
+ const isRTMAutoTranscode = enableRTMAutoTranscode || ((_a = getUrlObject(url)) == null ? void 0 : _a.searchParams.get("enableRTMAutoTranscode")) === "true";
19769
+ if (enableFallback) {
19770
+ if (fallbackUrl) {
19771
+ actualFallbackUrl = fallbackUrl;
19772
+ } else if (isRTMAutoTranscode && url) {
19773
+ actualFallbackUrl = generateFallbackUrl(url);
19774
+ } else {
19775
+ console.warn(
19776
+ create(ErrorCode.EMPTY_RTM_FALLBACK_PARAMETER, i18n).message
19777
+ );
19778
+ }
19779
+ }
19202
19780
  const backupType = actualFallbackUrl && util.getStreamType(actualFallbackUrl);
19203
19781
  if (backupType === "flv" && util.isMseSupported(Codec.H264)) {
19204
19782
  backupStrategy = createFlvMseStrategy(options);
19205
- } else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && util.isMseSupported(Codec.H264)) {
19783
+ } else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((_b = options == null ? void 0 : options.hls) == null ? void 0 : _b.enableMSE)) && util.isMseSupported(Codec.H264)) {
19206
19784
  backupStrategy = createHlsMseStrategy(options);
19207
19785
  }
19208
19786
  const [rtmCdn, backupCdn] = await Promise.all([
@@ -19217,33 +19795,35 @@ var __publicField = (obj, key, value) => {
19217
19795
  }
19218
19796
  }).catch(() => void 0)
19219
19797
  ]);
19220
- const [RTMSupported, RTMSupportCodec] = await Promise.all([
19221
- isRTMSupported(),
19222
- isRTMSupportCodec()
19223
- ]);
19224
- if (!RTMSupported || !RTMSupportCodec) {
19225
- if (player) {
19226
- player.emit("degrade", {
19227
- url: actualFallbackUrl,
19228
- originRtmUrl: url,
19229
- code: "NOT_SUPPORT",
19230
- message: "not support rtm or h264",
19231
- isRTMSupported: RTMSupported,
19232
- isRTMSupportCodec: RTMSupportCodec
19233
- });
19798
+ if (actualFallbackUrl) {
19799
+ const [RTMSupported, RTMSupportCodec] = await Promise.all([
19800
+ isRTMSupported(),
19801
+ isRTMSupportCodec()
19802
+ ]);
19803
+ if (!RTMSupported || !RTMSupportCodec) {
19804
+ if (player) {
19805
+ player.emit("degrade", {
19806
+ url: actualFallbackUrl,
19807
+ originRtmUrl: url,
19808
+ code: "NOT_SUPPORT",
19809
+ message: "not support rtm or h264",
19810
+ isRTMSupported: RTMSupported,
19811
+ isRTMSupportCodec: RTMSupportCodec
19812
+ });
19813
+ }
19814
+ return {
19815
+ options: {
19816
+ ...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
19817
+ url: actualFallbackUrl,
19818
+ _RTMdegrade: {
19819
+ _originRtmUrl: url,
19820
+ _isRTMSupported: RTMSupported,
19821
+ _isRTMSupportCodec: RTMSupportCodec
19822
+ }
19823
+ },
19824
+ plugins: backupCdn ? [backupCdn] : []
19825
+ };
19234
19826
  }
19235
- return {
19236
- options: {
19237
- ...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
19238
- url: actualFallbackUrl,
19239
- _RTMdegrade: {
19240
- _originRtmUrl: url,
19241
- _isRTMSupported: RTMSupported,
19242
- _isRTMSupportCodec: RTMSupportCodec
19243
- }
19244
- },
19245
- plugins: backupCdn ? [backupCdn] : []
19246
- };
19247
19827
  }
19248
19828
  return {
19249
19829
  options: {
@@ -19283,13 +19863,62 @@ var __publicField = (obj, key, value) => {
19283
19863
  }
19284
19864
  return true;
19285
19865
  }
19286
- const getTypeStrategy = async (options, player) => {
19866
+ const { isMMSSupported, isMseSupported } = util;
19867
+ function enableMMS() {
19868
+ return sniffer$1.os.isIos;
19869
+ }
19870
+ function isFLVSupported(codec = Codec.H264) {
19871
+ const isMediaSourceSupported = enableMMS() ? isMMSSupported : isMseSupported;
19872
+ return isMediaSourceSupported(codec);
19873
+ }
19874
+ const { appendSearchParams } = util;
19875
+ const getFlvStrategy = async (options) => {
19876
+ var _a, _b, _c, _d, _e, _f;
19877
+ let mseStrategy;
19878
+ let softStrategy;
19879
+ const enableLowLatency = (_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.enableLowLatency;
19880
+ const enableFrameChasing = ((_c = (_b = options == null ? void 0 : options.flv) == null ? void 0 : _b.lowLatency) == null ? void 0 : _c.enableFrameChasing) ?? true;
19881
+ const abrPts = ((_e = (_d = options == null ? void 0 : options.flv) == null ? void 0 : _d.lowLatency) == null ? void 0 : _e.abrPts) ?? "-800";
19882
+ const codec = await getCodec(options);
19883
+ const isSoftDecode$1 = await isSoftDecode(options, codec);
19884
+ if (isSoftDecode$1) {
19885
+ softStrategy = codec === Codec.H265 ? createSoftDecodeH265Strategy() : createSoftDecodeH264Strategy();
19886
+ mseStrategy = createFlvMseStrategy(options);
19887
+ }
19888
+ if (codec === "unknown" ? isFLVSupported(Codec.H264) : isFLVSupported(codec)) {
19889
+ mseStrategy = enableMMS() ? createFlvMssStrategy(options) : createFlvMseStrategy(options);
19890
+ }
19891
+ if (!mseStrategy && !softStrategy) {
19892
+ return {};
19893
+ }
19894
+ const [mseModule, softModule] = await Promise.all([
19895
+ (mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
19896
+ (softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
19897
+ ]);
19898
+ (softModule == null ? void 0 : softModule.XGVideoPlugin) && ((_f = softStrategy == null ? void 0 : softStrategy.afterLoad) == null ? void 0 : _f.call(softStrategy, softModule == null ? void 0 : softModule.XGVideoPlugin));
19899
+ const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
19900
+ const plugins = [];
19901
+ if (enableLowLatency) {
19902
+ combineOptions$1.url = appendSearchParams(options.url, { abr_pts: abrPts });
19903
+ }
19904
+ if (mseModule) {
19905
+ plugins.push(mseModule.FlvPlugin);
19906
+ if (enableLowLatency && enableFrameChasing) {
19907
+ plugins.push(mseModule.Adaptive);
19908
+ }
19909
+ }
19910
+ return {
19911
+ options: combineOptions$1,
19912
+ plugins
19913
+ };
19914
+ };
19915
+ const getTypeStrategy = async (options, player, i18n) => {
19287
19916
  const type = options.url ? util.getStreamType(options.url) : "";
19288
19917
  if (!type || type === "unknown") {
19289
19918
  return { options: {}, plugins: [] };
19290
19919
  }
19291
19920
  if (type === "rtm") {
19292
- return await getRtmStrategy(options, player);
19921
+ return await getRtmStrategy(options, player, i18n);
19293
19922
  }
19294
19923
  if (type === "flv") {
19295
19924
  return await getFlvStrategy(options);
@@ -19895,9 +20524,9 @@ var __publicField = (obj, key, value) => {
19895
20524
  // render_fps: this.render_fps, //帧率
19896
20525
  decode_fps: 0,
19897
20526
  render_fps: 0,
19898
- drop_count: 0,
20527
+ drop_count: -1,
19899
20528
  // 丢帧数
19900
- drop_percent: 0,
20529
+ drop_percent: -1,
19901
20530
  // 丢帧率
19902
20531
  sei_source: "",
19903
20532
  sei_delay: 0,
@@ -20003,7 +20632,7 @@ var __publicField = (obj, key, value) => {
20003
20632
  live_sdk_version: getPlayerCore(player) || player.hlsOps ? "2" : "-1",
20004
20633
  player_sdk_version: player.version,
20005
20634
  // eslint-disable-next-line no-undef
20006
- logger_version: "1.1.0-alpha.10",
20635
+ logger_version: "1.1.0-alpha.12",
20007
20636
  // 由rollup 在编译时注入
20008
20637
  report_version: "5",
20009
20638
  product_line: options.product_line,
@@ -20659,10 +21288,14 @@ var __publicField = (obj, key, value) => {
20659
21288
  if (video.getVideoPlaybackQuality) {
20660
21289
  var quality = video.getVideoPlaybackQuality();
20661
21290
  this.log.playing.drop_count = quality.droppedVideoFrames - this.tempDroppedFrameCount;
20662
- this.log.playing.drop_percent = Number.parseFloat(this.tempTotalFrameCount / quality.totalVideoFrames).toFixed(1);
21291
+ this.log.playing.drop_percent = Number.parseFloat((quality.droppedVideoFrames - this.tempDroppedFrameCount) / (quality.totalVideoFrames - this.tempTotalFrameCount)).toFixed(1);
20663
21292
  this.log.play_stop.drop_percent = Number.parseFloat(quality.droppedVideoFrames / quality.totalVideoFrames).toFixed(1);
20664
21293
  this.tempDroppedFrameCount = quality.droppedVideoFrames;
20665
21294
  this.tempTotalFrameCount = quality.totalVideoFrames;
21295
+ } else if (video.webkitDroppedFrameCount != void 0) {
21296
+ var droppedVideoFrames = video.webkitDroppedFrameCount;
21297
+ this.log.playing.drop_count = droppedVideoFrames - this.tempDroppedFrameCount;
21298
+ this.tempDroppedFrameCount = droppedVideoFrames;
20666
21299
  }
20667
21300
  };
20668
21301
  _proto2.getRtcStats = function getRtcStats(duration, first) {
@@ -20849,7 +21482,7 @@ var __publicField = (obj, key, value) => {
20849
21482
  }
20850
21483
  _this9.player.off("playing", _this9.handlePlayerPlaying);
20851
21484
  _this9.player.off("timeupdate", _this9.handlePlayerPlaying);
20852
- if (_this9.core) {
21485
+ if (_this9.core && _this9.core.getStats) {
20853
21486
  var _ref5 = _this9.core.getStats() || {}, fps = _ref5.fps;
20854
21487
  _this9.commonParams.fps = fps;
20855
21488
  }
@@ -21150,7 +21783,7 @@ var __publicField = (obj, key, value) => {
21150
21783
  if (this.firstFrameViewed) {
21151
21784
  return;
21152
21785
  }
21153
- if (this.core) {
21786
+ if (this.core && this.core.getStats) {
21154
21787
  var _ref6 = this.core.getStats() || {}, fps = _ref6.fps;
21155
21788
  this.commonParams.fps = fps;
21156
21789
  }
@@ -22046,22 +22679,23 @@ var __publicField = (obj, key, value) => {
22046
22679
  }
22047
22680
  static get defaultConfig() {
22048
22681
  return {
22049
- appId: "",
22682
+ appId: 654925,
22050
22683
  enable: true,
22051
22684
  showUserIdInErrorPanel: true
22052
22685
  };
22053
22686
  }
22054
- afterCreate() {
22687
+ beforeCreate(args) {
22055
22688
  var _a, _b;
22056
- if (!this.config.enable) {
22689
+ if (!args.config.enable) {
22057
22690
  return;
22058
22691
  }
22059
- if (!this.config.appId) {
22060
- console.info("not found appId, please generate an appId");
22692
+ args.config.userId = ((_a = args.config) == null ? void 0 : _a.userId) || getUserId();
22693
+ args.config.deviceId = ((_b = args.config) == null ? void 0 : _b.deviceId) || getDeviceID();
22694
+ }
22695
+ afterCreate() {
22696
+ if (!this.config.enable) {
22061
22697
  return;
22062
22698
  }
22063
- this._userId = ((_a = this.config) == null ? void 0 : _a.userId) || getUserId();
22064
- this._deviceId = ((_b = this.config) == null ? void 0 : _b.deviceId) || getDeviceID();
22065
22699
  this.open();
22066
22700
  }
22067
22701
  destroy() {
@@ -22102,16 +22736,17 @@ var __publicField = (obj, key, value) => {
22102
22736
  this._liveLogger = new LoggerControl({
22103
22737
  Tea: q,
22104
22738
  player: this.player,
22105
- aid: this.config.appId,
22739
+ aid: this.config.appId || 654925,
22106
22740
  project_key: this.config.appId,
22107
22741
  app_name: this.config.appName || this.config.appId,
22108
22742
  user_id: this._userId,
22109
22743
  device_id: this._deviceId,
22744
+ error_report_stop: true,
22110
22745
  ext: {
22111
- veplayer_version: "2.6.0-rc.4",
22112
- flv_version: "3.0.21-rc.3",
22113
- hls_version: "3.0.21-rc.3",
22114
- rts_version: "0.2.1-alpha.0"
22746
+ veplayer_version: "2.6.0",
22747
+ flv_version: "3.0.21-rc.5",
22748
+ hls_version: "3.0.21-rc.5",
22749
+ rts_version: "0.2.1-alpha.14"
22115
22750
  }
22116
22751
  });
22117
22752
  }
@@ -22340,9 +22975,16 @@ var __publicField = (obj, key, value) => {
22340
22975
  return rowDom;
22341
22976
  }
22342
22977
  }
22978
+ const logDoc = (
22979
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
22980
+ // @ts-ignore
22981
+ "https://www.volcengine.com/docs/6469/138655#日志上报"
22982
+ );
22343
22983
  const EN = {
22344
22984
  ...EN$1,
22345
22985
  INVALID_PARAMETER: "The imported parameter is empty, please pass in necessary parameters such as the stream address",
22986
+ INVALID_LOGGER: `Log options not configured correctly. Please refer to this document ${logDoc} to configure the logs.`,
22987
+ EMPTY_RTM_FALLBACK_PARAMETER: "Fallback URL for RTM is not configured. Please set enableFallback: false to disable fallback, or configure fallbackUrl for FLV and HLS formats based on the browser environment.",
22346
22988
  // info-panel
22347
22989
  FORMAT: "format",
22348
22990
  FPS: "fps",
@@ -22360,6 +23002,8 @@ var __publicField = (obj, key, value) => {
22360
23002
  const ZH_CN = {
22361
23003
  ...ZH_CN$1,
22362
23004
  INVALID_PARAMETER: "入参为空,请传入流地址等必要参数",
23005
+ INVALID_LOGGER: `未正确配置质量日志参数, 请参考 ${logDoc} 配置`,
23006
+ EMPTY_RTM_FALLBACK_PARAMETER: "未配置 RTM 降级地址 fallbackUrl,请设置 enableFallback: false 取消降级或根据浏览器环境配置 FLV、HLS 格式降级地址",
22363
23007
  // info-panel
22364
23008
  FORMAT: "格式",
22365
23009
  FPS: "帧率",
@@ -22480,6 +23124,10 @@ var __publicField = (obj, key, value) => {
22480
23124
  }
22481
23125
  return time;
22482
23126
  }
23127
+ get ad() {
23128
+ var _a, _b;
23129
+ return (_b = (_a = this._player.plugins) == null ? void 0 : _a.ad) == null ? void 0 : _b.adManager;
23130
+ }
22483
23131
  /** {zh}
22484
23132
  * @brief 调用此方法开启直播日志上报。
22485
23133
  */
@@ -22630,15 +23278,18 @@ var __publicField = (obj, key, value) => {
22630
23278
  }
22631
23279
  }
22632
23280
  async function createLivePlayer(options) {
22633
- var _a, _b;
23281
+ var _a, _b, _c, _d;
22634
23282
  let player = void 0;
22635
- if (!options || !options.url && !options.playlist) {
22636
- throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
22637
- }
22638
23283
  const i18n = new VeI18n({
22639
23284
  lang: options == null ? void 0 : options.lang,
22640
23285
  i18n: options == null ? void 0 : options.i18n
22641
23286
  });
23287
+ if (!options || !options.url && !options.playlist) {
23288
+ throw create(ErrorCode.INVALID_PARAMETER, i18n);
23289
+ }
23290
+ if (!((_a = options.logger) == null ? void 0 : _a.appId) && ((_b = options == null ? void 0 : options.logger) == null ? void 0 : _b.enable) !== false) {
23291
+ console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
23292
+ }
22642
23293
  const finalOptions = {
22643
23294
  ...options,
22644
23295
  plugins: [...LIVE_DEFAULT_PLUGINS, ...options.plugins ?? []]
@@ -22650,18 +23301,23 @@ var __publicField = (obj, key, value) => {
22650
23301
  isLive: true,
22651
23302
  i18nManager: i18n,
22652
23303
  preProcessUrl: (url) => {
23304
+ if (isType(".ts", url)) {
23305
+ return { url };
23306
+ }
22653
23307
  return {
22654
23308
  url: generateUrlWithSessionId(url)
22655
23309
  };
22656
23310
  },
22657
23311
  async preparePlugins(url) {
23312
+ var _a2;
22658
23313
  const [typeStrategy, drmStrategy, abrStrategy] = await Promise.all([
22659
23314
  getTypeStrategy(
22660
23315
  {
22661
23316
  ...finalOptions,
22662
23317
  url
22663
23318
  },
22664
- player
23319
+ player,
23320
+ i18n
22665
23321
  ),
22666
23322
  getDrmStrategy(
22667
23323
  {
@@ -22684,14 +23340,15 @@ var __publicField = (obj, key, value) => {
22684
23340
  ...plugins ?? [],
22685
23341
  ...drmPlugins ?? [],
22686
23342
  ...abrPlugins ?? []
22687
- ]
23343
+ ],
23344
+ useSrc: !((_a2 = typeStrategy.plugins) == null ? void 0 : _a2.length)
22688
23345
  };
22689
23346
  }
22690
23347
  },
22691
23348
  VePlayerLive
22692
23349
  );
22693
23350
  if (player) {
22694
- const RTMDegrade = (_b = (_a = player == null ? void 0 : player._player) == null ? void 0 : _a.config) == null ? void 0 : _b._RTMdegrade;
23351
+ const RTMDegrade = (_d = (_c = player == null ? void 0 : player._player) == null ? void 0 : _c.config) == null ? void 0 : _d._RTMdegrade;
22695
23352
  if (RTMDegrade) {
22696
23353
  player.emit("degrade", {
22697
23354
  originRtmUrl: RTMDegrade._originRtmUrl,
@@ -22712,6 +23369,7 @@ var __publicField = (obj, key, value) => {
22712
23369
  setModuleSystem("esm");
22713
23370
  util.isMseSupported;
22714
23371
  util.isSoftDecodeSupported;
23372
+ util.isMMSSupported;
22715
23373
  setModuleSystem("umd");
22716
23374
  exports2.Codec = Codec;
22717
23375
  exports2.DecodeType = DecodeType;
@@ -22725,7 +23383,9 @@ var __publicField = (obj, key, value) => {
22725
23383
  exports2.Sniffer = sniffer$1;
22726
23384
  exports2.ZH_CN = ZH_CN$1;
22727
23385
  exports2.createLivePlayer = createLivePlayer;
22728
- exports2.isMseSupported = isMseSupported;
23386
+ exports2.isFLVSupported = isFLVSupported;
23387
+ exports2.isMMSSupported = isMMSSupported$1;
23388
+ exports2.isMseSupported = isMseSupported$1;
22729
23389
  exports2.isRTMSupportCodec = isRTMSupportCodec;
22730
23390
  exports2.isRTMSupported = isRTMSupported;
22731
23391
  exports2.isSoftDecodeSupported = isSoftDecodeSupported;