@volcengine/veplayer 2.6.0-rc.3 → 2.6.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.d.ts +78 -27
- package/esm/veplayer.biz.live.development.js +741 -118
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +452 -147
- package/esm/veplayer.development.js +914 -254
- package/esm/veplayer.live.d.ts +453 -147
- package/esm/veplayer.live.development.js +913 -253
- package/esm/veplayer.live.production.js +3 -5
- package/esm/veplayer.production.js +3 -5
- package/esm/veplayer.vod.d.ts +78 -27
- package/esm/veplayer.vod.development.js +764 -205
- package/esm/veplayer.vod.production.js +3 -5
- package/package.json +1 -1
- package/umd/index.d.ts +78 -27
- package/umd/veplayer.biz.live.development.js +741 -118
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +452 -147
- package/umd/veplayer.development.js +914 -254
- package/umd/veplayer.live.d.ts +453 -147
- package/umd/veplayer.live.development.js +913 -253
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +78 -27
- package/umd/veplayer.vod.development.js +764 -205
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +452 -147
- package/veplayer.live.d.ts +453 -147
- package/veplayer.vod.d.ts +78 -27
|
@@ -1161,7 +1161,7 @@ util$1.getCurrentTimeByOffset = function(offsetTime, segments) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
return offsetTime;
|
|
1163
1163
|
};
|
|
1164
|
-
function isObject$
|
|
1164
|
+
function isObject$2(value) {
|
|
1165
1165
|
var type = _typeof(value);
|
|
1166
1166
|
return value !== null && (type === "object" || type === "function");
|
|
1167
1167
|
}
|
|
@@ -1176,7 +1176,7 @@ function debounce$2(func, wait, options) {
|
|
|
1176
1176
|
throw new TypeError("Expected a function");
|
|
1177
1177
|
}
|
|
1178
1178
|
wait = +wait || 0;
|
|
1179
|
-
if (isObject$
|
|
1179
|
+
if (isObject$2(options)) {
|
|
1180
1180
|
leading = !!options.leading;
|
|
1181
1181
|
maxing = "maxWait" in options;
|
|
1182
1182
|
maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait;
|
|
@@ -1281,7 +1281,7 @@ function throttle(func, wait, options) {
|
|
|
1281
1281
|
if (typeof func !== "function") {
|
|
1282
1282
|
throw new TypeError("Expected a function");
|
|
1283
1283
|
}
|
|
1284
|
-
if (isObject$
|
|
1284
|
+
if (isObject$2(options)) {
|
|
1285
1285
|
leading = "leading" in options ? !!options.leading : leading;
|
|
1286
1286
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
1287
1287
|
}
|
|
@@ -1457,7 +1457,7 @@ var sniffer$1 = {
|
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
1459
1459
|
};
|
|
1460
|
-
var version = "3.0.21-rc.
|
|
1460
|
+
var version = "3.0.21-rc.5";
|
|
1461
1461
|
var ERROR_TYPE_MAP = {
|
|
1462
1462
|
1: "media",
|
|
1463
1463
|
2: "media",
|
|
@@ -1913,7 +1913,7 @@ var MediaProxy = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
1913
1913
|
var _e = this.media.error || error2;
|
|
1914
1914
|
var type = _e.code ? ERROR_TYPE_MAP[_e.code] : "other";
|
|
1915
1915
|
var message = _e.message;
|
|
1916
|
-
if (!this.media.currentSrc) {
|
|
1916
|
+
if (!(this.media.currentSrc || this.media.srcObject)) {
|
|
1917
1917
|
message = "empty_src";
|
|
1918
1918
|
_e = {
|
|
1919
1919
|
code: 6,
|
|
@@ -4127,6 +4127,10 @@ var Controls = /* @__PURE__ */ function(_Plugin) {
|
|
|
4127
4127
|
this.unbind("mouseenter", this.onMouseEnter);
|
|
4128
4128
|
this.unbind("mouseleave", this.onMouseLeave);
|
|
4129
4129
|
}
|
|
4130
|
+
this.left = null;
|
|
4131
|
+
this.center = null;
|
|
4132
|
+
this.right = null;
|
|
4133
|
+
this.innerRoot = null;
|
|
4130
4134
|
}
|
|
4131
4135
|
}, {
|
|
4132
4136
|
key: "render",
|
|
@@ -6498,6 +6502,7 @@ var index_min = "";
|
|
|
6498
6502
|
var Level = /* @__PURE__ */ ((Level2) => {
|
|
6499
6503
|
Level2["Fatal"] = "Fatal";
|
|
6500
6504
|
Level2["Error"] = "Error";
|
|
6505
|
+
Level2["Warn"] = "Warn";
|
|
6501
6506
|
return Level2;
|
|
6502
6507
|
})(Level || {});
|
|
6503
6508
|
var ErrorCode$1 = /* @__PURE__ */ ((ErrorCode2) => {
|
|
@@ -10733,7 +10738,22 @@ const BaseEvents = {
|
|
|
10733
10738
|
SOURCE_CHANGE: "sourceChange",
|
|
10734
10739
|
ABR_SWITCH_START: "abrSwitchStart",
|
|
10735
10740
|
ABR_SWITCH_SUCCESS: "abrSwitchSuccess",
|
|
10736
|
-
ABR_SWITCH_FAILED: "abrSwitchFailed"
|
|
10741
|
+
ABR_SWITCH_FAILED: "abrSwitchFailed",
|
|
10742
|
+
// 广告插件
|
|
10743
|
+
AD_FIRST_QUARTILE: "ad_first_quartile",
|
|
10744
|
+
AD_MIDPOINT: "ad_midpoint",
|
|
10745
|
+
AD_THIRD_QUARTILE: "ad_third_quartile",
|
|
10746
|
+
AD_CLICK: "ad_click",
|
|
10747
|
+
AD_IMPRESSION: "ad_impression",
|
|
10748
|
+
AD_RESUME: "ad_resume",
|
|
10749
|
+
AD_START: "ad_start",
|
|
10750
|
+
AD_PLAY: "ad_play",
|
|
10751
|
+
AD_PAUSE: "ad_pause",
|
|
10752
|
+
AD_TIME_UPDATE: "ad_time_update",
|
|
10753
|
+
AD_SKIPPED: "ad_skipped",
|
|
10754
|
+
AD_ERROR: "ad_error",
|
|
10755
|
+
AD_COMPLETE: "ad_complete",
|
|
10756
|
+
AD_ALL_COMPLETED: "ad_all_completed"
|
|
10737
10757
|
};
|
|
10738
10758
|
const Events$1 = {
|
|
10739
10759
|
...XGEvents,
|
|
@@ -11869,16 +11889,16 @@ lodash_clonedeep.exports;
|
|
|
11869
11889
|
(function(module, exports) {
|
|
11870
11890
|
var LARGE_ARRAY_SIZE = 200;
|
|
11871
11891
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
11872
|
-
var
|
|
11873
|
-
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]",
|
|
11892
|
+
var MAX_SAFE_INTEGER2 = 9007199254740991;
|
|
11893
|
+
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]";
|
|
11874
11894
|
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]";
|
|
11875
|
-
var
|
|
11895
|
+
var reRegExpChar2 = /[\\^$.*+?()[\]{}|]/g;
|
|
11876
11896
|
var reFlags = /\w*$/;
|
|
11877
|
-
var
|
|
11878
|
-
var
|
|
11897
|
+
var reIsHostCtor2 = /^\[object .+?Constructor\]$/;
|
|
11898
|
+
var reIsUint2 = /^(?:0|[1-9]\d*)$/;
|
|
11879
11899
|
var cloneableTags = {};
|
|
11880
11900
|
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;
|
|
11881
|
-
cloneableTags[errorTag] = cloneableTags[
|
|
11901
|
+
cloneableTags[errorTag] = cloneableTags[funcTag2] = cloneableTags[weakMapTag] = false;
|
|
11882
11902
|
var freeGlobal2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
11883
11903
|
var freeSelf2 = typeof self == "object" && self && self.Object === Object && self;
|
|
11884
11904
|
var root2 = freeGlobal2 || freeSelf2 || Function("return this")();
|
|
@@ -11893,7 +11913,7 @@ lodash_clonedeep.exports;
|
|
|
11893
11913
|
set.add(value);
|
|
11894
11914
|
return set;
|
|
11895
11915
|
}
|
|
11896
|
-
function
|
|
11916
|
+
function arrayEach2(array, iteratee) {
|
|
11897
11917
|
var index = -1, length = array ? array.length : 0;
|
|
11898
11918
|
while (++index < length) {
|
|
11899
11919
|
if (iteratee(array[index], index, array) === false) {
|
|
@@ -11926,10 +11946,10 @@ lodash_clonedeep.exports;
|
|
|
11926
11946
|
}
|
|
11927
11947
|
return result;
|
|
11928
11948
|
}
|
|
11929
|
-
function
|
|
11949
|
+
function getValue2(object, key) {
|
|
11930
11950
|
return object == null ? void 0 : object[key];
|
|
11931
11951
|
}
|
|
11932
|
-
function
|
|
11952
|
+
function isHostObject2(value) {
|
|
11933
11953
|
var result = false;
|
|
11934
11954
|
if (value != null && typeof value.toString != "function") {
|
|
11935
11955
|
try {
|
|
@@ -11958,22 +11978,22 @@ lodash_clonedeep.exports;
|
|
|
11958
11978
|
});
|
|
11959
11979
|
return result;
|
|
11960
11980
|
}
|
|
11961
|
-
var arrayProto = Array.prototype,
|
|
11962
|
-
var
|
|
11963
|
-
var
|
|
11964
|
-
var uid = /[^.]+$/.exec(
|
|
11981
|
+
var arrayProto = Array.prototype, funcProto2 = Function.prototype, objectProto2 = Object.prototype;
|
|
11982
|
+
var coreJsData2 = root2["__core-js_shared__"];
|
|
11983
|
+
var maskSrcKey2 = function() {
|
|
11984
|
+
var uid = /[^.]+$/.exec(coreJsData2 && coreJsData2.keys && coreJsData2.keys.IE_PROTO || "");
|
|
11965
11985
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
11966
11986
|
}();
|
|
11967
|
-
var
|
|
11968
|
-
var
|
|
11987
|
+
var funcToString2 = funcProto2.toString;
|
|
11988
|
+
var hasOwnProperty2 = objectProto2.hasOwnProperty;
|
|
11969
11989
|
var objectToString2 = objectProto2.toString;
|
|
11970
|
-
var
|
|
11971
|
-
"^" +
|
|
11990
|
+
var reIsNative2 = RegExp(
|
|
11991
|
+
"^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
11972
11992
|
);
|
|
11973
|
-
var Buffer2 = moduleExports ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, getPrototype = overArg(Object.getPrototypeOf, Object),
|
|
11993
|
+
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;
|
|
11974
11994
|
var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
|
|
11975
|
-
var DataView2 =
|
|
11976
|
-
var dataViewCtorString =
|
|
11995
|
+
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");
|
|
11996
|
+
var dataViewCtorString = toSource2(DataView2), mapCtorString = toSource2(Map2), promiseCtorString = toSource2(Promise2), setCtorString = toSource2(Set), weakMapCtorString = toSource2(WeakMap);
|
|
11977
11997
|
var symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
11978
11998
|
function Hash(entries) {
|
|
11979
11999
|
var index = -1, length = entries ? entries.length : 0;
|
|
@@ -11995,11 +12015,11 @@ lodash_clonedeep.exports;
|
|
|
11995
12015
|
var result = data[key];
|
|
11996
12016
|
return result === HASH_UNDEFINED ? void 0 : result;
|
|
11997
12017
|
}
|
|
11998
|
-
return
|
|
12018
|
+
return hasOwnProperty2.call(data, key) ? data[key] : void 0;
|
|
11999
12019
|
}
|
|
12000
12020
|
function hashHas(key) {
|
|
12001
12021
|
var data = this.__data__;
|
|
12002
|
-
return nativeCreate ? data[key] !== void 0 :
|
|
12022
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty2.call(data, key);
|
|
12003
12023
|
}
|
|
12004
12024
|
function hashSet(key, value) {
|
|
12005
12025
|
var data = this.__data__;
|
|
@@ -12126,7 +12146,7 @@ lodash_clonedeep.exports;
|
|
|
12126
12146
|
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
|
|
12127
12147
|
var length = result.length, skipIndexes = !!length;
|
|
12128
12148
|
for (var key in value) {
|
|
12129
|
-
if ((inherited ||
|
|
12149
|
+
if ((inherited || hasOwnProperty2.call(value, key)) && !(skipIndexes && (key == "length" || isIndex2(key, length)))) {
|
|
12130
12150
|
result.push(key);
|
|
12131
12151
|
}
|
|
12132
12152
|
}
|
|
@@ -12134,7 +12154,7 @@ lodash_clonedeep.exports;
|
|
|
12134
12154
|
}
|
|
12135
12155
|
function assignValue(object, key, value) {
|
|
12136
12156
|
var objValue = object[key];
|
|
12137
|
-
if (!(
|
|
12157
|
+
if (!(hasOwnProperty2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
12138
12158
|
object[key] = value;
|
|
12139
12159
|
}
|
|
12140
12160
|
}
|
|
@@ -12165,15 +12185,15 @@ lodash_clonedeep.exports;
|
|
|
12165
12185
|
if (isArr) {
|
|
12166
12186
|
result = initCloneArray(value);
|
|
12167
12187
|
if (!isDeep) {
|
|
12168
|
-
return
|
|
12188
|
+
return copyArray2(value, result);
|
|
12169
12189
|
}
|
|
12170
12190
|
} else {
|
|
12171
|
-
var tag = getTag(value), isFunc = tag ==
|
|
12191
|
+
var tag = getTag(value), isFunc = tag == funcTag2 || tag == genTag2;
|
|
12172
12192
|
if (isBuffer(value)) {
|
|
12173
12193
|
return cloneBuffer(value, isDeep);
|
|
12174
12194
|
}
|
|
12175
12195
|
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
12176
|
-
if (
|
|
12196
|
+
if (isHostObject2(value)) {
|
|
12177
12197
|
return object ? value : {};
|
|
12178
12198
|
}
|
|
12179
12199
|
result = initCloneObject(isFunc ? {} : value);
|
|
@@ -12196,7 +12216,7 @@ lodash_clonedeep.exports;
|
|
|
12196
12216
|
if (!isArr) {
|
|
12197
12217
|
var props = isFull ? getAllKeys(value) : keys(value);
|
|
12198
12218
|
}
|
|
12199
|
-
|
|
12219
|
+
arrayEach2(props || value, function(subValue, key2) {
|
|
12200
12220
|
if (props) {
|
|
12201
12221
|
key2 = subValue;
|
|
12202
12222
|
subValue = value[key2];
|
|
@@ -12205,8 +12225,8 @@ lodash_clonedeep.exports;
|
|
|
12205
12225
|
});
|
|
12206
12226
|
return result;
|
|
12207
12227
|
}
|
|
12208
|
-
function
|
|
12209
|
-
return isObject2(proto) ?
|
|
12228
|
+
function baseCreate2(proto) {
|
|
12229
|
+
return isObject2(proto) ? objectCreate2(proto) : {};
|
|
12210
12230
|
}
|
|
12211
12231
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
12212
12232
|
var result = keysFunc(object);
|
|
@@ -12215,12 +12235,12 @@ lodash_clonedeep.exports;
|
|
|
12215
12235
|
function baseGetTag(value) {
|
|
12216
12236
|
return objectToString2.call(value);
|
|
12217
12237
|
}
|
|
12218
|
-
function
|
|
12219
|
-
if (!isObject2(value) ||
|
|
12238
|
+
function baseIsNative2(value) {
|
|
12239
|
+
if (!isObject2(value) || isMasked2(value)) {
|
|
12220
12240
|
return false;
|
|
12221
12241
|
}
|
|
12222
|
-
var pattern =
|
|
12223
|
-
return pattern.test(
|
|
12242
|
+
var pattern = isFunction2(value) || isHostObject2(value) ? reIsNative2 : reIsHostCtor2;
|
|
12243
|
+
return pattern.test(toSource2(value));
|
|
12224
12244
|
}
|
|
12225
12245
|
function baseKeys(object) {
|
|
12226
12246
|
if (!isPrototype(object)) {
|
|
@@ -12228,7 +12248,7 @@ lodash_clonedeep.exports;
|
|
|
12228
12248
|
}
|
|
12229
12249
|
var result = [];
|
|
12230
12250
|
for (var key in Object(object)) {
|
|
12231
|
-
if (
|
|
12251
|
+
if (hasOwnProperty2.call(object, key) && key != "constructor") {
|
|
12232
12252
|
result.push(key);
|
|
12233
12253
|
}
|
|
12234
12254
|
}
|
|
@@ -12271,7 +12291,7 @@ lodash_clonedeep.exports;
|
|
|
12271
12291
|
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
12272
12292
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
12273
12293
|
}
|
|
12274
|
-
function
|
|
12294
|
+
function copyArray2(source, array) {
|
|
12275
12295
|
var index = -1, length = source.length;
|
|
12276
12296
|
array || (array = Array(length));
|
|
12277
12297
|
while (++index < length) {
|
|
@@ -12299,15 +12319,15 @@ lodash_clonedeep.exports;
|
|
|
12299
12319
|
var data = map.__data__;
|
|
12300
12320
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
12301
12321
|
}
|
|
12302
|
-
function
|
|
12303
|
-
var value =
|
|
12304
|
-
return
|
|
12322
|
+
function getNative2(object, key) {
|
|
12323
|
+
var value = getValue2(object, key);
|
|
12324
|
+
return baseIsNative2(value) ? value : void 0;
|
|
12305
12325
|
}
|
|
12306
12326
|
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
|
12307
12327
|
var getTag = baseGetTag;
|
|
12308
12328
|
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) {
|
|
12309
12329
|
getTag = function(value) {
|
|
12310
|
-
var result = objectToString2.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ?
|
|
12330
|
+
var result = objectToString2.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource2(Ctor) : void 0;
|
|
12311
12331
|
if (ctorString) {
|
|
12312
12332
|
switch (ctorString) {
|
|
12313
12333
|
case dataViewCtorString:
|
|
@@ -12327,14 +12347,14 @@ lodash_clonedeep.exports;
|
|
|
12327
12347
|
}
|
|
12328
12348
|
function initCloneArray(array) {
|
|
12329
12349
|
var length = array.length, result = array.constructor(length);
|
|
12330
|
-
if (length && typeof array[0] == "string" &&
|
|
12350
|
+
if (length && typeof array[0] == "string" && hasOwnProperty2.call(array, "index")) {
|
|
12331
12351
|
result.index = array.index;
|
|
12332
12352
|
result.input = array.input;
|
|
12333
12353
|
}
|
|
12334
12354
|
return result;
|
|
12335
12355
|
}
|
|
12336
12356
|
function initCloneObject(object) {
|
|
12337
|
-
return typeof object.constructor == "function" && !isPrototype(object) ?
|
|
12357
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate2(getPrototype(object)) : {};
|
|
12338
12358
|
}
|
|
12339
12359
|
function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
|
12340
12360
|
var Ctor = object.constructor;
|
|
@@ -12369,25 +12389,25 @@ lodash_clonedeep.exports;
|
|
|
12369
12389
|
return cloneSymbol(object);
|
|
12370
12390
|
}
|
|
12371
12391
|
}
|
|
12372
|
-
function
|
|
12373
|
-
length = length == null ?
|
|
12374
|
-
return !!length && (typeof value == "number" ||
|
|
12392
|
+
function isIndex2(value, length) {
|
|
12393
|
+
length = length == null ? MAX_SAFE_INTEGER2 : length;
|
|
12394
|
+
return !!length && (typeof value == "number" || reIsUint2.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
12375
12395
|
}
|
|
12376
12396
|
function isKeyable(value) {
|
|
12377
12397
|
var type = typeof value;
|
|
12378
12398
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
12379
12399
|
}
|
|
12380
|
-
function
|
|
12381
|
-
return !!
|
|
12400
|
+
function isMasked2(func) {
|
|
12401
|
+
return !!maskSrcKey2 && maskSrcKey2 in func;
|
|
12382
12402
|
}
|
|
12383
12403
|
function isPrototype(value) {
|
|
12384
12404
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto2;
|
|
12385
12405
|
return value === proto;
|
|
12386
12406
|
}
|
|
12387
|
-
function
|
|
12407
|
+
function toSource2(func) {
|
|
12388
12408
|
if (func != null) {
|
|
12389
12409
|
try {
|
|
12390
|
-
return
|
|
12410
|
+
return funcToString2.call(func);
|
|
12391
12411
|
} catch (e3) {
|
|
12392
12412
|
}
|
|
12393
12413
|
try {
|
|
@@ -12404,22 +12424,22 @@ lodash_clonedeep.exports;
|
|
|
12404
12424
|
return value === other || value !== value && other !== other;
|
|
12405
12425
|
}
|
|
12406
12426
|
function isArguments(value) {
|
|
12407
|
-
return isArrayLikeObject(value) &&
|
|
12427
|
+
return isArrayLikeObject(value) && hasOwnProperty2.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag);
|
|
12408
12428
|
}
|
|
12409
12429
|
var isArray = Array.isArray;
|
|
12410
12430
|
function isArrayLike(value) {
|
|
12411
|
-
return value != null && isLength(value.length) && !
|
|
12431
|
+
return value != null && isLength(value.length) && !isFunction2(value);
|
|
12412
12432
|
}
|
|
12413
12433
|
function isArrayLikeObject(value) {
|
|
12414
12434
|
return isObjectLike2(value) && isArrayLike(value);
|
|
12415
12435
|
}
|
|
12416
12436
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
12417
|
-
function
|
|
12437
|
+
function isFunction2(value) {
|
|
12418
12438
|
var tag = isObject2(value) ? objectToString2.call(value) : "";
|
|
12419
|
-
return tag ==
|
|
12439
|
+
return tag == funcTag2 || tag == genTag2;
|
|
12420
12440
|
}
|
|
12421
12441
|
function isLength(value) {
|
|
12422
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <=
|
|
12442
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
|
|
12423
12443
|
}
|
|
12424
12444
|
function isObject2(value) {
|
|
12425
12445
|
var type = typeof value;
|
|
@@ -12684,6 +12704,7 @@ const NAME_MAP = {
|
|
|
12684
12704
|
"plugin:flv": "veplayer.plugin.flv.[env].[ext]",
|
|
12685
12705
|
"plugin:mp4": "veplayer.plugin.mp4.[env].[ext]",
|
|
12686
12706
|
"plugin:hls": "veplayer.plugin.hls.[env].[ext]",
|
|
12707
|
+
"plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]",
|
|
12687
12708
|
"plugin:shaka": "veplayer.plugin.shaka.[env].[ext]",
|
|
12688
12709
|
"plugin:rtm": "veplayer.plugin.rtm.[env].[ext]",
|
|
12689
12710
|
"plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]",
|
|
@@ -12696,6 +12717,7 @@ var DynamicModule = /* @__PURE__ */ ((DynamicModule2) => {
|
|
|
12696
12717
|
DynamicModule2["PluginFlv"] = "plugin:flv";
|
|
12697
12718
|
DynamicModule2["PluginMp4"] = "plugin:mp4";
|
|
12698
12719
|
DynamicModule2["PluginHls"] = "plugin:hls";
|
|
12720
|
+
DynamicModule2["PluginHlsJs"] = "plugin:hlsjs";
|
|
12699
12721
|
DynamicModule2["PluginShaka"] = "plugin:shaka";
|
|
12700
12722
|
DynamicModule2["PluginRtm"] = "plugin:rtm";
|
|
12701
12723
|
DynamicModule2["PluginXgvideo"] = "plugin:xgvideo";
|
|
@@ -12816,6 +12838,495 @@ class Loader {
|
|
|
12816
12838
|
});
|
|
12817
12839
|
}
|
|
12818
12840
|
}
|
|
12841
|
+
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
12842
|
+
var PLACEHOLDER = "__lodash_placeholder__";
|
|
12843
|
+
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;
|
|
12844
|
+
var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN$1 = 0 / 0;
|
|
12845
|
+
var wrapFlags = [
|
|
12846
|
+
["ary", ARY_FLAG],
|
|
12847
|
+
["bind", BIND_FLAG],
|
|
12848
|
+
["bindKey", BIND_KEY_FLAG],
|
|
12849
|
+
["curry", CURRY_FLAG],
|
|
12850
|
+
["curryRight", CURRY_RIGHT_FLAG],
|
|
12851
|
+
["flip", FLIP_FLAG],
|
|
12852
|
+
["partial", PARTIAL_FLAG],
|
|
12853
|
+
["partialRight", PARTIAL_RIGHT_FLAG],
|
|
12854
|
+
["rearg", REARG_FLAG]
|
|
12855
|
+
];
|
|
12856
|
+
var funcTag = "[object Function]", genTag = "[object GeneratorFunction]", symbolTag$1 = "[object Symbol]";
|
|
12857
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
12858
|
+
var reTrim$1 = /^\s+|\s+$/g;
|
|
12859
|
+
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
|
|
12860
|
+
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
|
12861
|
+
var reIsBinary$1 = /^0b[01]+$/i;
|
|
12862
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
12863
|
+
var reIsOctal$1 = /^0o[0-7]+$/i;
|
|
12864
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
12865
|
+
var freeParseInt$1 = parseInt;
|
|
12866
|
+
var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
12867
|
+
var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
|
|
12868
|
+
var root$1 = freeGlobal$1 || freeSelf$1 || Function("return this")();
|
|
12869
|
+
function apply(func, thisArg, args) {
|
|
12870
|
+
switch (args.length) {
|
|
12871
|
+
case 0:
|
|
12872
|
+
return func.call(thisArg);
|
|
12873
|
+
case 1:
|
|
12874
|
+
return func.call(thisArg, args[0]);
|
|
12875
|
+
case 2:
|
|
12876
|
+
return func.call(thisArg, args[0], args[1]);
|
|
12877
|
+
case 3:
|
|
12878
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
12879
|
+
}
|
|
12880
|
+
return func.apply(thisArg, args);
|
|
12881
|
+
}
|
|
12882
|
+
function arrayEach(array, iteratee) {
|
|
12883
|
+
var index = -1, length = array ? array.length : 0;
|
|
12884
|
+
while (++index < length) {
|
|
12885
|
+
if (iteratee(array[index], index, array) === false) {
|
|
12886
|
+
break;
|
|
12887
|
+
}
|
|
12888
|
+
}
|
|
12889
|
+
return array;
|
|
12890
|
+
}
|
|
12891
|
+
function arrayIncludes(array, value) {
|
|
12892
|
+
var length = array ? array.length : 0;
|
|
12893
|
+
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
12894
|
+
}
|
|
12895
|
+
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
12896
|
+
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
12897
|
+
while (fromRight ? index-- : ++index < length) {
|
|
12898
|
+
if (predicate(array[index], index, array)) {
|
|
12899
|
+
return index;
|
|
12900
|
+
}
|
|
12901
|
+
}
|
|
12902
|
+
return -1;
|
|
12903
|
+
}
|
|
12904
|
+
function baseIndexOf(array, value, fromIndex) {
|
|
12905
|
+
if (value !== value) {
|
|
12906
|
+
return baseFindIndex(array, baseIsNaN, fromIndex);
|
|
12907
|
+
}
|
|
12908
|
+
var index = fromIndex - 1, length = array.length;
|
|
12909
|
+
while (++index < length) {
|
|
12910
|
+
if (array[index] === value) {
|
|
12911
|
+
return index;
|
|
12912
|
+
}
|
|
12913
|
+
}
|
|
12914
|
+
return -1;
|
|
12915
|
+
}
|
|
12916
|
+
function baseIsNaN(value) {
|
|
12917
|
+
return value !== value;
|
|
12918
|
+
}
|
|
12919
|
+
function countHolders(array, placeholder) {
|
|
12920
|
+
var length = array.length, result = 0;
|
|
12921
|
+
while (length--) {
|
|
12922
|
+
if (array[length] === placeholder) {
|
|
12923
|
+
result++;
|
|
12924
|
+
}
|
|
12925
|
+
}
|
|
12926
|
+
return result;
|
|
12927
|
+
}
|
|
12928
|
+
function getValue(object, key) {
|
|
12929
|
+
return object == null ? void 0 : object[key];
|
|
12930
|
+
}
|
|
12931
|
+
function isHostObject(value) {
|
|
12932
|
+
var result = false;
|
|
12933
|
+
if (value != null && typeof value.toString != "function") {
|
|
12934
|
+
try {
|
|
12935
|
+
result = !!(value + "");
|
|
12936
|
+
} catch (e3) {
|
|
12937
|
+
}
|
|
12938
|
+
}
|
|
12939
|
+
return result;
|
|
12940
|
+
}
|
|
12941
|
+
function replaceHolders(array, placeholder) {
|
|
12942
|
+
var index = -1, length = array.length, resIndex = 0, result = [];
|
|
12943
|
+
while (++index < length) {
|
|
12944
|
+
var value = array[index];
|
|
12945
|
+
if (value === placeholder || value === PLACEHOLDER) {
|
|
12946
|
+
array[index] = PLACEHOLDER;
|
|
12947
|
+
result[resIndex++] = index;
|
|
12948
|
+
}
|
|
12949
|
+
}
|
|
12950
|
+
return result;
|
|
12951
|
+
}
|
|
12952
|
+
var funcProto = Function.prototype, objectProto$1 = Object.prototype;
|
|
12953
|
+
var coreJsData = root$1["__core-js_shared__"];
|
|
12954
|
+
var maskSrcKey = function() {
|
|
12955
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
12956
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
12957
|
+
}();
|
|
12958
|
+
var funcToString = funcProto.toString;
|
|
12959
|
+
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
|
12960
|
+
var objectToString$1 = objectProto$1.toString;
|
|
12961
|
+
var reIsNative = RegExp(
|
|
12962
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
12963
|
+
);
|
|
12964
|
+
var objectCreate = Object.create;
|
|
12965
|
+
var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
|
|
12966
|
+
var defineProperty = function() {
|
|
12967
|
+
var func = getNative(Object, "defineProperty"), name = getNative.name;
|
|
12968
|
+
return name && name.length > 2 ? func : void 0;
|
|
12969
|
+
}();
|
|
12970
|
+
function baseCreate(proto) {
|
|
12971
|
+
return isObject$1(proto) ? objectCreate(proto) : {};
|
|
12972
|
+
}
|
|
12973
|
+
function baseIsNative(value) {
|
|
12974
|
+
if (!isObject$1(value) || isMasked(value)) {
|
|
12975
|
+
return false;
|
|
12976
|
+
}
|
|
12977
|
+
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
12978
|
+
return pattern.test(toSource(value));
|
|
12979
|
+
}
|
|
12980
|
+
function composeArgs(args, partials, holders, isCurried) {
|
|
12981
|
+
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;
|
|
12982
|
+
while (++leftIndex < leftLength) {
|
|
12983
|
+
result[leftIndex] = partials[leftIndex];
|
|
12984
|
+
}
|
|
12985
|
+
while (++argsIndex < holdersLength) {
|
|
12986
|
+
if (isUncurried || argsIndex < argsLength) {
|
|
12987
|
+
result[holders[argsIndex]] = args[argsIndex];
|
|
12988
|
+
}
|
|
12989
|
+
}
|
|
12990
|
+
while (rangeLength--) {
|
|
12991
|
+
result[leftIndex++] = args[argsIndex++];
|
|
12992
|
+
}
|
|
12993
|
+
return result;
|
|
12994
|
+
}
|
|
12995
|
+
function composeArgsRight(args, partials, holders, isCurried) {
|
|
12996
|
+
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;
|
|
12997
|
+
while (++argsIndex < rangeLength) {
|
|
12998
|
+
result[argsIndex] = args[argsIndex];
|
|
12999
|
+
}
|
|
13000
|
+
var offset = argsIndex;
|
|
13001
|
+
while (++rightIndex < rightLength) {
|
|
13002
|
+
result[offset + rightIndex] = partials[rightIndex];
|
|
13003
|
+
}
|
|
13004
|
+
while (++holdersIndex < holdersLength) {
|
|
13005
|
+
if (isUncurried || argsIndex < argsLength) {
|
|
13006
|
+
result[offset + holders[holdersIndex]] = args[argsIndex++];
|
|
13007
|
+
}
|
|
13008
|
+
}
|
|
13009
|
+
return result;
|
|
13010
|
+
}
|
|
13011
|
+
function copyArray(source, array) {
|
|
13012
|
+
var index = -1, length = source.length;
|
|
13013
|
+
array || (array = Array(length));
|
|
13014
|
+
while (++index < length) {
|
|
13015
|
+
array[index] = source[index];
|
|
13016
|
+
}
|
|
13017
|
+
return array;
|
|
13018
|
+
}
|
|
13019
|
+
function createBind(func, bitmask, thisArg) {
|
|
13020
|
+
var isBind = bitmask & BIND_FLAG, Ctor = createCtor(func);
|
|
13021
|
+
function wrapper() {
|
|
13022
|
+
var fn = this && this !== root$1 && this instanceof wrapper ? Ctor : func;
|
|
13023
|
+
return fn.apply(isBind ? thisArg : this, arguments);
|
|
13024
|
+
}
|
|
13025
|
+
return wrapper;
|
|
13026
|
+
}
|
|
13027
|
+
function createCtor(Ctor) {
|
|
13028
|
+
return function() {
|
|
13029
|
+
var args = arguments;
|
|
13030
|
+
switch (args.length) {
|
|
13031
|
+
case 0:
|
|
13032
|
+
return new Ctor();
|
|
13033
|
+
case 1:
|
|
13034
|
+
return new Ctor(args[0]);
|
|
13035
|
+
case 2:
|
|
13036
|
+
return new Ctor(args[0], args[1]);
|
|
13037
|
+
case 3:
|
|
13038
|
+
return new Ctor(args[0], args[1], args[2]);
|
|
13039
|
+
case 4:
|
|
13040
|
+
return new Ctor(args[0], args[1], args[2], args[3]);
|
|
13041
|
+
case 5:
|
|
13042
|
+
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
|
13043
|
+
case 6:
|
|
13044
|
+
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
|
13045
|
+
case 7:
|
|
13046
|
+
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|
13047
|
+
}
|
|
13048
|
+
var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args);
|
|
13049
|
+
return isObject$1(result) ? result : thisBinding;
|
|
13050
|
+
};
|
|
13051
|
+
}
|
|
13052
|
+
function createCurry(func, bitmask, arity) {
|
|
13053
|
+
var Ctor = createCtor(func);
|
|
13054
|
+
function wrapper() {
|
|
13055
|
+
var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper);
|
|
13056
|
+
while (index--) {
|
|
13057
|
+
args[index] = arguments[index];
|
|
13058
|
+
}
|
|
13059
|
+
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
|
13060
|
+
length -= holders.length;
|
|
13061
|
+
if (length < arity) {
|
|
13062
|
+
return createRecurry(
|
|
13063
|
+
func,
|
|
13064
|
+
bitmask,
|
|
13065
|
+
createHybrid,
|
|
13066
|
+
wrapper.placeholder,
|
|
13067
|
+
void 0,
|
|
13068
|
+
args,
|
|
13069
|
+
holders,
|
|
13070
|
+
void 0,
|
|
13071
|
+
void 0,
|
|
13072
|
+
arity - length
|
|
13073
|
+
);
|
|
13074
|
+
}
|
|
13075
|
+
var fn = this && this !== root$1 && this instanceof wrapper ? Ctor : func;
|
|
13076
|
+
return apply(fn, this, args);
|
|
13077
|
+
}
|
|
13078
|
+
return wrapper;
|
|
13079
|
+
}
|
|
13080
|
+
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
|
|
13081
|
+
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);
|
|
13082
|
+
function wrapper() {
|
|
13083
|
+
var length = arguments.length, args = Array(length), index = length;
|
|
13084
|
+
while (index--) {
|
|
13085
|
+
args[index] = arguments[index];
|
|
13086
|
+
}
|
|
13087
|
+
if (isCurried) {
|
|
13088
|
+
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
|
|
13089
|
+
}
|
|
13090
|
+
if (partials) {
|
|
13091
|
+
args = composeArgs(args, partials, holders, isCurried);
|
|
13092
|
+
}
|
|
13093
|
+
if (partialsRight) {
|
|
13094
|
+
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
|
|
13095
|
+
}
|
|
13096
|
+
length -= holdersCount;
|
|
13097
|
+
if (isCurried && length < arity) {
|
|
13098
|
+
var newHolders = replaceHolders(args, placeholder);
|
|
13099
|
+
return createRecurry(
|
|
13100
|
+
func,
|
|
13101
|
+
bitmask,
|
|
13102
|
+
createHybrid,
|
|
13103
|
+
wrapper.placeholder,
|
|
13104
|
+
thisArg,
|
|
13105
|
+
args,
|
|
13106
|
+
newHolders,
|
|
13107
|
+
argPos,
|
|
13108
|
+
ary,
|
|
13109
|
+
arity - length
|
|
13110
|
+
);
|
|
13111
|
+
}
|
|
13112
|
+
var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
|
|
13113
|
+
length = args.length;
|
|
13114
|
+
if (argPos) {
|
|
13115
|
+
args = reorder(args, argPos);
|
|
13116
|
+
} else if (isFlip && length > 1) {
|
|
13117
|
+
args.reverse();
|
|
13118
|
+
}
|
|
13119
|
+
if (isAry && ary < length) {
|
|
13120
|
+
args.length = ary;
|
|
13121
|
+
}
|
|
13122
|
+
if (this && this !== root$1 && this instanceof wrapper) {
|
|
13123
|
+
fn = Ctor || createCtor(fn);
|
|
13124
|
+
}
|
|
13125
|
+
return fn.apply(thisBinding, args);
|
|
13126
|
+
}
|
|
13127
|
+
return wrapper;
|
|
13128
|
+
}
|
|
13129
|
+
function createPartial(func, bitmask, thisArg, partials) {
|
|
13130
|
+
var isBind = bitmask & BIND_FLAG, Ctor = createCtor(func);
|
|
13131
|
+
function wrapper() {
|
|
13132
|
+
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;
|
|
13133
|
+
while (++leftIndex < leftLength) {
|
|
13134
|
+
args[leftIndex] = partials[leftIndex];
|
|
13135
|
+
}
|
|
13136
|
+
while (argsLength--) {
|
|
13137
|
+
args[leftIndex++] = arguments[++argsIndex];
|
|
13138
|
+
}
|
|
13139
|
+
return apply(fn, isBind ? thisArg : this, args);
|
|
13140
|
+
}
|
|
13141
|
+
return wrapper;
|
|
13142
|
+
}
|
|
13143
|
+
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
|
|
13144
|
+
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;
|
|
13145
|
+
bitmask |= isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG;
|
|
13146
|
+
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
|
|
13147
|
+
if (!(bitmask & CURRY_BOUND_FLAG)) {
|
|
13148
|
+
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
|
|
13149
|
+
}
|
|
13150
|
+
var result = wrapFunc(func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity);
|
|
13151
|
+
result.placeholder = placeholder;
|
|
13152
|
+
return setWrapToString(result, func, bitmask);
|
|
13153
|
+
}
|
|
13154
|
+
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
|
|
13155
|
+
var isBindKey = bitmask & BIND_KEY_FLAG;
|
|
13156
|
+
if (!isBindKey && typeof func != "function") {
|
|
13157
|
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
13158
|
+
}
|
|
13159
|
+
var length = partials ? partials.length : 0;
|
|
13160
|
+
if (!length) {
|
|
13161
|
+
bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
|
|
13162
|
+
partials = holders = void 0;
|
|
13163
|
+
}
|
|
13164
|
+
ary = ary === void 0 ? ary : nativeMax$1(toInteger(ary), 0);
|
|
13165
|
+
arity = arity === void 0 ? arity : toInteger(arity);
|
|
13166
|
+
length -= holders ? holders.length : 0;
|
|
13167
|
+
if (bitmask & PARTIAL_RIGHT_FLAG) {
|
|
13168
|
+
var partialsRight = partials, holdersRight = holders;
|
|
13169
|
+
partials = holders = void 0;
|
|
13170
|
+
}
|
|
13171
|
+
var newData = [
|
|
13172
|
+
func,
|
|
13173
|
+
bitmask,
|
|
13174
|
+
thisArg,
|
|
13175
|
+
partials,
|
|
13176
|
+
holders,
|
|
13177
|
+
partialsRight,
|
|
13178
|
+
holdersRight,
|
|
13179
|
+
argPos,
|
|
13180
|
+
ary,
|
|
13181
|
+
arity
|
|
13182
|
+
];
|
|
13183
|
+
func = newData[0];
|
|
13184
|
+
bitmask = newData[1];
|
|
13185
|
+
thisArg = newData[2];
|
|
13186
|
+
partials = newData[3];
|
|
13187
|
+
holders = newData[4];
|
|
13188
|
+
arity = newData[9] = newData[9] == null ? isBindKey ? 0 : func.length : nativeMax$1(newData[9] - length, 0);
|
|
13189
|
+
if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
|
|
13190
|
+
bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
|
|
13191
|
+
}
|
|
13192
|
+
if (!bitmask || bitmask == BIND_FLAG) {
|
|
13193
|
+
var result = createBind(func, bitmask, thisArg);
|
|
13194
|
+
} else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
|
|
13195
|
+
result = createCurry(func, bitmask, arity);
|
|
13196
|
+
} else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
|
|
13197
|
+
result = createPartial(func, bitmask, thisArg, partials);
|
|
13198
|
+
} else {
|
|
13199
|
+
result = createHybrid.apply(void 0, newData);
|
|
13200
|
+
}
|
|
13201
|
+
return setWrapToString(result, func, bitmask);
|
|
13202
|
+
}
|
|
13203
|
+
function getHolder(func) {
|
|
13204
|
+
var object = func;
|
|
13205
|
+
return object.placeholder;
|
|
13206
|
+
}
|
|
13207
|
+
function getNative(object, key) {
|
|
13208
|
+
var value = getValue(object, key);
|
|
13209
|
+
return baseIsNative(value) ? value : void 0;
|
|
13210
|
+
}
|
|
13211
|
+
function getWrapDetails(source) {
|
|
13212
|
+
var match = source.match(reWrapDetails);
|
|
13213
|
+
return match ? match[1].split(reSplitDetails) : [];
|
|
13214
|
+
}
|
|
13215
|
+
function insertWrapDetails(source, details) {
|
|
13216
|
+
var length = details.length, lastIndex = length - 1;
|
|
13217
|
+
details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
|
|
13218
|
+
details = details.join(length > 2 ? ", " : " ");
|
|
13219
|
+
return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
|
|
13220
|
+
}
|
|
13221
|
+
function isIndex(value, length) {
|
|
13222
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
13223
|
+
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
13224
|
+
}
|
|
13225
|
+
function isMasked(func) {
|
|
13226
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
13227
|
+
}
|
|
13228
|
+
function reorder(array, indexes) {
|
|
13229
|
+
var arrLength = array.length, length = nativeMin$1(indexes.length, arrLength), oldArray = copyArray(array);
|
|
13230
|
+
while (length--) {
|
|
13231
|
+
var index = indexes[length];
|
|
13232
|
+
array[length] = isIndex(index, arrLength) ? oldArray[index] : void 0;
|
|
13233
|
+
}
|
|
13234
|
+
return array;
|
|
13235
|
+
}
|
|
13236
|
+
var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) {
|
|
13237
|
+
var source = reference + "";
|
|
13238
|
+
return defineProperty(wrapper, "toString", {
|
|
13239
|
+
"configurable": true,
|
|
13240
|
+
"enumerable": false,
|
|
13241
|
+
"value": constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)))
|
|
13242
|
+
});
|
|
13243
|
+
};
|
|
13244
|
+
function toSource(func) {
|
|
13245
|
+
if (func != null) {
|
|
13246
|
+
try {
|
|
13247
|
+
return funcToString.call(func);
|
|
13248
|
+
} catch (e3) {
|
|
13249
|
+
}
|
|
13250
|
+
try {
|
|
13251
|
+
return func + "";
|
|
13252
|
+
} catch (e3) {
|
|
13253
|
+
}
|
|
13254
|
+
}
|
|
13255
|
+
return "";
|
|
13256
|
+
}
|
|
13257
|
+
function updateWrapDetails(details, bitmask) {
|
|
13258
|
+
arrayEach(wrapFlags, function(pair) {
|
|
13259
|
+
var value = "_." + pair[0];
|
|
13260
|
+
if (bitmask & pair[1] && !arrayIncludes(details, value)) {
|
|
13261
|
+
details.push(value);
|
|
13262
|
+
}
|
|
13263
|
+
});
|
|
13264
|
+
return details.sort();
|
|
13265
|
+
}
|
|
13266
|
+
function curry(func, arity, guard) {
|
|
13267
|
+
arity = guard ? void 0 : arity;
|
|
13268
|
+
var result = createWrap(func, CURRY_FLAG, void 0, void 0, void 0, void 0, void 0, arity);
|
|
13269
|
+
result.placeholder = curry.placeholder;
|
|
13270
|
+
return result;
|
|
13271
|
+
}
|
|
13272
|
+
function isFunction(value) {
|
|
13273
|
+
var tag = isObject$1(value) ? objectToString$1.call(value) : "";
|
|
13274
|
+
return tag == funcTag || tag == genTag;
|
|
13275
|
+
}
|
|
13276
|
+
function isObject$1(value) {
|
|
13277
|
+
var type = typeof value;
|
|
13278
|
+
return !!value && (type == "object" || type == "function");
|
|
13279
|
+
}
|
|
13280
|
+
function isObjectLike$1(value) {
|
|
13281
|
+
return !!value && typeof value == "object";
|
|
13282
|
+
}
|
|
13283
|
+
function isSymbol$1(value) {
|
|
13284
|
+
return typeof value == "symbol" || isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1;
|
|
13285
|
+
}
|
|
13286
|
+
function toFinite(value) {
|
|
13287
|
+
if (!value) {
|
|
13288
|
+
return value === 0 ? value : 0;
|
|
13289
|
+
}
|
|
13290
|
+
value = toNumber$1(value);
|
|
13291
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
13292
|
+
var sign = value < 0 ? -1 : 1;
|
|
13293
|
+
return sign * MAX_INTEGER;
|
|
13294
|
+
}
|
|
13295
|
+
return value === value ? value : 0;
|
|
13296
|
+
}
|
|
13297
|
+
function toInteger(value) {
|
|
13298
|
+
var result = toFinite(value), remainder = result % 1;
|
|
13299
|
+
return result === result ? remainder ? result - remainder : result : 0;
|
|
13300
|
+
}
|
|
13301
|
+
function toNumber$1(value) {
|
|
13302
|
+
if (typeof value == "number") {
|
|
13303
|
+
return value;
|
|
13304
|
+
}
|
|
13305
|
+
if (isSymbol$1(value)) {
|
|
13306
|
+
return NAN$1;
|
|
13307
|
+
}
|
|
13308
|
+
if (isObject$1(value)) {
|
|
13309
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
13310
|
+
value = isObject$1(other) ? other + "" : other;
|
|
13311
|
+
}
|
|
13312
|
+
if (typeof value != "string") {
|
|
13313
|
+
return value === 0 ? value : +value;
|
|
13314
|
+
}
|
|
13315
|
+
value = value.replace(reTrim$1, "");
|
|
13316
|
+
var isBinary = reIsBinary$1.test(value);
|
|
13317
|
+
return isBinary || reIsOctal$1.test(value) ? freeParseInt$1(value.slice(2), isBinary ? 2 : 8) : reIsBadHex$1.test(value) ? NAN$1 : +value;
|
|
13318
|
+
}
|
|
13319
|
+
function constant(value) {
|
|
13320
|
+
return function() {
|
|
13321
|
+
return value;
|
|
13322
|
+
};
|
|
13323
|
+
}
|
|
13324
|
+
function identity(value) {
|
|
13325
|
+
return value;
|
|
13326
|
+
}
|
|
13327
|
+
curry.placeholder = {};
|
|
13328
|
+
var lodash_curry = curry;
|
|
13329
|
+
var curry$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_curry);
|
|
12819
13330
|
const src = import.meta.url;
|
|
12820
13331
|
const baseUrl = src.slice(0, src.lastIndexOf("/"));
|
|
12821
13332
|
const loader = new Loader({
|
|
@@ -12840,7 +13351,7 @@ async function load(name, src2) {
|
|
|
12840
13351
|
});
|
|
12841
13352
|
}
|
|
12842
13353
|
}
|
|
12843
|
-
const appendSearchParams = (url, searchParams) => {
|
|
13354
|
+
const appendSearchParams$1 = (url, searchParams) => {
|
|
12844
13355
|
var _a, _b;
|
|
12845
13356
|
const urlObject = getUrlObject(url);
|
|
12846
13357
|
if (!url || !urlObject) {
|
|
@@ -12875,11 +13386,16 @@ const getUrlObject = (url) => {
|
|
|
12875
13386
|
return;
|
|
12876
13387
|
}
|
|
12877
13388
|
};
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
13389
|
+
const H264_MIME = 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
|
|
13390
|
+
const H265_MIME = [
|
|
13391
|
+
'video/mp4;codecs="hev1.1.6.L120.90"',
|
|
13392
|
+
'video/mp4;codecs="hev1.2.4.L120.90"',
|
|
13393
|
+
'video/mp4;codecs="hev1.3.E.L120.90"',
|
|
13394
|
+
'video/mp4;codecs="hev1.4.10.L120.90"'
|
|
13395
|
+
];
|
|
13396
|
+
const isType = curry$1(function(suffix, url) {
|
|
13397
|
+
return url == null ? void 0 : url.split("?")[0].toLowerCase().includes(suffix);
|
|
13398
|
+
});
|
|
12883
13399
|
const isHls = isType(".m3u8");
|
|
12884
13400
|
const isMp4 = isType(".mp4");
|
|
12885
13401
|
const isFlv = isType(".flv");
|
|
@@ -12903,22 +13419,40 @@ function getStreamType(url) {
|
|
|
12903
13419
|
}
|
|
12904
13420
|
return "unknown";
|
|
12905
13421
|
}
|
|
12906
|
-
function isMseSupported$
|
|
13422
|
+
function isMseSupported$2(codec = Codec.H264) {
|
|
12907
13423
|
if (codec === Codec.H265) {
|
|
12908
13424
|
return sniffer$1.isHevcSupported();
|
|
12909
13425
|
}
|
|
12910
|
-
|
|
13426
|
+
if (codec === Codec.H264) {
|
|
13427
|
+
return sniffer$1.isMSESupport();
|
|
13428
|
+
}
|
|
13429
|
+
return sniffer$1.isMSESupport(codec);
|
|
12911
13430
|
}
|
|
12912
13431
|
async function isSoftDecodeSupported$1() {
|
|
12913
13432
|
const { XGVideoPlugin } = await load(DynamicModule.PluginXgvideo);
|
|
12914
13433
|
return XGVideoPlugin == null ? void 0 : XGVideoPlugin.isSupported();
|
|
12915
13434
|
}
|
|
13435
|
+
function isMMSSupported$2(codec = Codec.H264) {
|
|
13436
|
+
if (typeof window.ManagedMediaSource === "undefined") {
|
|
13437
|
+
return false;
|
|
13438
|
+
}
|
|
13439
|
+
if (codec === Codec.H264) {
|
|
13440
|
+
return window.ManagedMediaSource.isTypeSupported(H264_MIME);
|
|
13441
|
+
}
|
|
13442
|
+
if (codec === Codec.H265) {
|
|
13443
|
+
return H265_MIME.some((mine) => {
|
|
13444
|
+
return window.ManagedMediaSource.isTypeSupported(mine);
|
|
13445
|
+
});
|
|
13446
|
+
}
|
|
13447
|
+
return window.ManagedMediaSource.isTypeSupported(codec);
|
|
13448
|
+
}
|
|
12916
13449
|
const util = {
|
|
12917
13450
|
...util$1,
|
|
12918
13451
|
getStreamType,
|
|
12919
|
-
isMseSupported: isMseSupported$
|
|
13452
|
+
isMseSupported: isMseSupported$2,
|
|
12920
13453
|
isSoftDecodeSupported: isSoftDecodeSupported$1,
|
|
12921
|
-
|
|
13454
|
+
isMMSSupported: isMMSSupported$2,
|
|
13455
|
+
appendSearchParams: appendSearchParams$1,
|
|
12922
13456
|
getUrlObject
|
|
12923
13457
|
};
|
|
12924
13458
|
var autoplay = "";
|
|
@@ -13840,7 +14374,7 @@ class VePlayerBase {
|
|
|
13840
14374
|
* @brief Retrieve the player SDK version number.
|
|
13841
14375
|
*/
|
|
13842
14376
|
get playerVersion() {
|
|
13843
|
-
return "2.6.0-rc.
|
|
14377
|
+
return "2.6.0-rc.5";
|
|
13844
14378
|
}
|
|
13845
14379
|
/** {zh}
|
|
13846
14380
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -14324,25 +14858,27 @@ class VePlayerBase {
|
|
|
14324
14858
|
* @hidden
|
|
14325
14859
|
*/
|
|
14326
14860
|
async prepare(url) {
|
|
14327
|
-
var _a, _b;
|
|
14861
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
14328
14862
|
const result = await ((_a = this._preparePlugins) == null ? void 0 : _a.call(this, url));
|
|
14329
|
-
const
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
)
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14336
|
-
}
|
|
14863
|
+
const newUrl = ((_b = result == null ? void 0 : result.options) == null ? void 0 : _b.url) ?? url;
|
|
14864
|
+
const oldUrl = (_d = (_c = this._player) == null ? void 0 : _c.config) == null ? void 0 : _d.url;
|
|
14865
|
+
const isSameProtocol = oldUrl && getStreamType(newUrl) === getStreamType(oldUrl);
|
|
14866
|
+
if (!isSameProtocol) {
|
|
14867
|
+
(_f = (_e = this._previousPrepareResult) == null ? void 0 : _e.plugins) == null ? void 0 : _f.forEach((plugin) => {
|
|
14868
|
+
this._player.unRegisterPlugin(plugin.pluginName);
|
|
14869
|
+
});
|
|
14870
|
+
}
|
|
14337
14871
|
this._previousPrepareResult = result;
|
|
14338
14872
|
if (result == null ? void 0 : result.options) {
|
|
14339
14873
|
this._player.setConfig(result.options);
|
|
14340
14874
|
}
|
|
14341
14875
|
return {
|
|
14342
|
-
plugins:
|
|
14876
|
+
plugins: isSameProtocol ? [] : (_g = result == null ? void 0 : result.plugins) == null ? void 0 : _g.map((plugin) => {
|
|
14343
14877
|
return this._player.registerPlugin(plugin);
|
|
14344
14878
|
}),
|
|
14345
|
-
options: result == null ? void 0 : result.options
|
|
14879
|
+
options: result == null ? void 0 : result.options,
|
|
14880
|
+
isSameProtocol,
|
|
14881
|
+
useSrc: result == null ? void 0 : result.useSrc
|
|
14346
14882
|
};
|
|
14347
14883
|
}
|
|
14348
14884
|
async _handleFallback(err) {
|
|
@@ -14385,81 +14921,105 @@ class VePlayerBase {
|
|
|
14385
14921
|
async _switch(targetDefinition) {
|
|
14386
14922
|
var _a, _b, _c, _d, _e, _f;
|
|
14387
14923
|
const preDefinition = clonedeep(this._sourceManager.definition);
|
|
14388
|
-
const
|
|
14924
|
+
const isPaused = this._player.paused && !this._player.isError;
|
|
14925
|
+
const {
|
|
14926
|
+
plugins: newPlugins,
|
|
14927
|
+
options,
|
|
14928
|
+
isSameProtocol,
|
|
14929
|
+
useSrc
|
|
14930
|
+
} = await this.prepare(targetDefinition.url) || {};
|
|
14389
14931
|
if (options == null ? void 0 : options.url) {
|
|
14390
14932
|
targetDefinition.url = options == null ? void 0 : options.url;
|
|
14391
14933
|
}
|
|
14392
14934
|
this._sourceManager.switch(targetDefinition);
|
|
14393
14935
|
(_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources.renderItemList();
|
|
14394
14936
|
(_d = (_c = this._player) == null ? void 0 : _c.plugins) == null ? void 0 : _d.definition.renderItemList();
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14937
|
+
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);
|
|
14938
|
+
this._player.config.url = targetDefinition.url;
|
|
14939
|
+
if (isSameProtocol) {
|
|
14940
|
+
if (isSourceSwitching) {
|
|
14941
|
+
this.emit(Events$1.SOURCE_CHANGE);
|
|
14942
|
+
this._player.switchURL(targetDefinition.url);
|
|
14943
|
+
} else {
|
|
14944
|
+
this._player.changeDefinition(targetDefinition, preDefinition);
|
|
14945
|
+
}
|
|
14402
14946
|
} else {
|
|
14403
|
-
this.
|
|
14947
|
+
this.emit(
|
|
14948
|
+
isSourceSwitching ? Events$1.SOURCE_CHANGE : Events$1.DEFINITION_CHANGE
|
|
14949
|
+
);
|
|
14950
|
+
await this._switchDifferentProtocolUrl(
|
|
14951
|
+
newPlugins,
|
|
14952
|
+
targetDefinition.url,
|
|
14953
|
+
isPaused,
|
|
14954
|
+
useSrc
|
|
14955
|
+
);
|
|
14956
|
+
!isSourceSwitching && this.emit(Events$1.AFTER_DEFINITION_CHANGE);
|
|
14957
|
+
}
|
|
14958
|
+
}
|
|
14959
|
+
async _switchDifferentProtocolUrl(plugins, url, isPaused, useSrc) {
|
|
14960
|
+
var _a, _b;
|
|
14961
|
+
if (useSrc && this._player.media) {
|
|
14962
|
+
if ((_a = this._player.config) == null ? void 0 : _a.preProcessUrl) {
|
|
14963
|
+
url = (_b = this._player.config) == null ? void 0 : _b.preProcessUrl(url).url;
|
|
14964
|
+
}
|
|
14965
|
+
this._player.media.src = url;
|
|
14966
|
+
}
|
|
14967
|
+
if (plugins == null ? void 0 : plugins.length) {
|
|
14968
|
+
await this._callBeforePlayerInitForUrl(plugins);
|
|
14404
14969
|
}
|
|
14970
|
+
return new Promise((resolve) => {
|
|
14971
|
+
const curTime = this._player.currentTime;
|
|
14972
|
+
const _canplay = () => {
|
|
14973
|
+
console.log("canplay canplay");
|
|
14974
|
+
this._player.currentTime = curTime;
|
|
14975
|
+
if (isPaused) {
|
|
14976
|
+
this._player.once(CANPLAY, () => {
|
|
14977
|
+
this._player.pause();
|
|
14978
|
+
});
|
|
14979
|
+
}
|
|
14980
|
+
resolve();
|
|
14981
|
+
};
|
|
14982
|
+
if (sniffer$1.os.isAndroid) {
|
|
14983
|
+
this.once(TIME_UPDATE, () => {
|
|
14984
|
+
_canplay();
|
|
14985
|
+
});
|
|
14986
|
+
} else {
|
|
14987
|
+
this.once(CANPLAY, () => {
|
|
14988
|
+
_canplay();
|
|
14989
|
+
});
|
|
14990
|
+
}
|
|
14991
|
+
this._player.play();
|
|
14992
|
+
});
|
|
14405
14993
|
}
|
|
14406
14994
|
async _switchUrl(url, config) {
|
|
14407
|
-
const
|
|
14995
|
+
const isPaused = this._player.paused && !this._player.isError;
|
|
14996
|
+
const {
|
|
14997
|
+
plugins: newPlugins,
|
|
14998
|
+
options,
|
|
14999
|
+
isSameProtocol,
|
|
15000
|
+
useSrc
|
|
15001
|
+
} = await this.prepare(url) || {};
|
|
14408
15002
|
const newUrl = (options == null ? void 0 : options.url) ?? url;
|
|
14409
15003
|
this._sourceManager.url = newUrl;
|
|
14410
|
-
|
|
14411
|
-
|
|
14412
|
-
} else {
|
|
15004
|
+
this._player.config.url = newUrl;
|
|
15005
|
+
if (isSameProtocol) {
|
|
14413
15006
|
const res = this._player.switchURL(newUrl, {
|
|
14414
15007
|
seamless: config == null ? void 0 : config.seamless
|
|
14415
15008
|
});
|
|
14416
|
-
const curTime = this._player.currentTime;
|
|
14417
15009
|
if (res && res.then) {
|
|
14418
15010
|
return res;
|
|
14419
|
-
} else {
|
|
14420
|
-
return new Promise((resolve) => {
|
|
14421
|
-
const isPaused = this._player.paused && !this._player.isError;
|
|
14422
|
-
const _canplay = () => {
|
|
14423
|
-
this._player.currentTime = curTime;
|
|
14424
|
-
if (isPaused) {
|
|
14425
|
-
this._player.once(CANPLAY, () => {
|
|
14426
|
-
this._player.pause();
|
|
14427
|
-
});
|
|
14428
|
-
}
|
|
14429
|
-
resolve();
|
|
14430
|
-
};
|
|
14431
|
-
if (sniffer$1.os.isAndroid) {
|
|
14432
|
-
this.once(TIME_UPDATE, () => {
|
|
14433
|
-
_canplay();
|
|
14434
|
-
});
|
|
14435
|
-
} else {
|
|
14436
|
-
this.once(CANPLAY, () => {
|
|
14437
|
-
_canplay();
|
|
14438
|
-
});
|
|
14439
|
-
}
|
|
14440
|
-
this._player.play();
|
|
14441
|
-
});
|
|
14442
15011
|
}
|
|
15012
|
+
} else {
|
|
15013
|
+
return this._switchDifferentProtocolUrl(
|
|
15014
|
+
newPlugins,
|
|
15015
|
+
newUrl,
|
|
15016
|
+
isPaused,
|
|
15017
|
+
useSrc
|
|
15018
|
+
);
|
|
14443
15019
|
}
|
|
14444
15020
|
}
|
|
14445
|
-
|
|
14446
|
-
_diffPlugins(previousPlugins, newPlugins) {
|
|
14447
|
-
const previousPluginNames = previousPlugins.map((item) => item.pluginName);
|
|
14448
|
-
const newPluginNames = newPlugins.map((item) => item.pluginName);
|
|
14449
|
-
const removedPlugins = previousPluginNames.filter(
|
|
14450
|
-
(name) => !newPluginNames.includes(name)
|
|
14451
|
-
);
|
|
14452
|
-
const addedPlugins = newPlugins.filter(
|
|
14453
|
-
(name) => !previousPluginNames.includes(name.pluginName)
|
|
14454
|
-
);
|
|
14455
|
-
return {
|
|
14456
|
-
removedPlugins,
|
|
14457
|
-
addedPlugins
|
|
14458
|
-
};
|
|
14459
|
-
}
|
|
14460
|
-
_callBeforePlayerInitForUrl(newPlugins, url) {
|
|
15021
|
+
_callBeforePlayerInitForUrl(newPlugins) {
|
|
14461
15022
|
return new Promise((resolve) => {
|
|
14462
|
-
this._player.config.url = url;
|
|
14463
15023
|
newPlugins == null ? void 0 : newPlugins.forEach((plugin) => {
|
|
14464
15024
|
plugin.beforePlayerInit();
|
|
14465
15025
|
});
|
|
@@ -18961,58 +19521,29 @@ class Lite {
|
|
|
18961
19521
|
return result;
|
|
18962
19522
|
}
|
|
18963
19523
|
}
|
|
18964
|
-
|
|
18965
|
-
var _a, _b
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
const enableLowLatency = ((_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.enableLowLatency) && sniffer$1.device === "pc";
|
|
18969
|
-
const enableFrameChasing = ((_c = (_b = options == null ? void 0 : options.flv) == null ? void 0 : _b.lowLatency) == null ? void 0 : _c.enableFrameChasing) ?? true;
|
|
18970
|
-
const abrPts = ((_e = (_d = options == null ? void 0 : options.flv) == null ? void 0 : _d.lowLatency) == null ? void 0 : _e.abrPts) ?? "-800";
|
|
18971
|
-
const codec = await getCodec(options);
|
|
18972
|
-
const isSoftDecode$1 = await isSoftDecode(options, codec);
|
|
18973
|
-
if (isSoftDecode$1) {
|
|
18974
|
-
softStrategy = codec === Codec.H265 ? createSoftDecodeH265Strategy() : createSoftDecodeH264Strategy();
|
|
18975
|
-
mseStrategy = createFlvMseStrategy(options);
|
|
18976
|
-
}
|
|
18977
|
-
if (codec === "unknown" ? isMseSupported$1(Codec.H264) : isMseSupported$1(codec)) {
|
|
18978
|
-
mseStrategy = createFlvMseStrategy(options);
|
|
18979
|
-
}
|
|
18980
|
-
if (!mseStrategy && !softStrategy) {
|
|
18981
|
-
return {};
|
|
18982
|
-
}
|
|
18983
|
-
const [mseModule, softModule] = await Promise.all([
|
|
18984
|
-
(mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
|
|
18985
|
-
(softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
|
|
18986
|
-
]);
|
|
18987
|
-
(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));
|
|
18988
|
-
const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
|
|
18989
|
-
const plugins = [];
|
|
18990
|
-
if (enableLowLatency) {
|
|
18991
|
-
combineOptions$1.url = appendSearchParams(options.url, { abr_pts: abrPts });
|
|
19524
|
+
function enableHlsJs(options) {
|
|
19525
|
+
var _a, _b;
|
|
19526
|
+
if ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableHlsJs) {
|
|
19527
|
+
return true;
|
|
18992
19528
|
}
|
|
18993
|
-
if (
|
|
18994
|
-
|
|
18995
|
-
if (enableLowLatency && enableFrameChasing) {
|
|
18996
|
-
plugins.push(mseModule.Adaptive);
|
|
18997
|
-
}
|
|
19529
|
+
if (((_b = options == null ? void 0 : options.ad) == null ? void 0 : _b.adType) === "ssai") {
|
|
19530
|
+
return true;
|
|
18998
19531
|
}
|
|
18999
|
-
return
|
|
19000
|
-
|
|
19001
|
-
plugins
|
|
19002
|
-
};
|
|
19003
|
-
};
|
|
19532
|
+
return false;
|
|
19533
|
+
}
|
|
19004
19534
|
const getHlsStrategy = async (options) => {
|
|
19005
19535
|
var _a, _b;
|
|
19006
19536
|
let mseStrategy;
|
|
19007
19537
|
let softStrategy;
|
|
19008
19538
|
const codec = await getCodec(options);
|
|
19009
19539
|
const isSoftDecode$1 = await isSoftDecode(options, codec);
|
|
19540
|
+
const useHlsJs = enableHlsJs(options);
|
|
19010
19541
|
if (isSoftDecode$1) {
|
|
19011
19542
|
softStrategy = codec === Codec.H265 ? createSoftDecodeH265Strategy() : createSoftDecodeH264Strategy();
|
|
19012
|
-
mseStrategy = createHlsMseStrategy(options);
|
|
19543
|
+
mseStrategy = createHlsMseStrategy(options, useHlsJs);
|
|
19013
19544
|
}
|
|
19014
|
-
if ((sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && (codec === "unknown" ? isMseSupported$
|
|
19015
|
-
mseStrategy = createHlsMseStrategy(options);
|
|
19545
|
+
if ((sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && (codec === "unknown" ? isMseSupported$2(Codec.H264) : isMseSupported$2(codec))) {
|
|
19546
|
+
mseStrategy = createHlsMseStrategy(options, useHlsJs);
|
|
19016
19547
|
}
|
|
19017
19548
|
if (!mseStrategy && !softStrategy) {
|
|
19018
19549
|
return {};
|
|
@@ -19028,28 +19559,42 @@ const getHlsStrategy = async (options) => {
|
|
|
19028
19559
|
plugins: (mseModule == null ? void 0 : mseModule.HlsPlugin) ? [mseModule.HlsPlugin] : []
|
|
19029
19560
|
};
|
|
19030
19561
|
};
|
|
19031
|
-
const
|
|
19562
|
+
const getDefaultFlvOptions = (options) => {
|
|
19032
19563
|
var _a;
|
|
19033
19564
|
return {
|
|
19034
|
-
|
|
19035
|
-
|
|
19036
|
-
retryCount: 0,
|
|
19037
|
-
disconnectRetryCount: ((_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.retryCount) ?? void 0,
|
|
19038
|
-
...(options == null ? void 0 : options.flv) ?? {}
|
|
19039
|
-
}
|
|
19040
|
-
},
|
|
19041
|
-
module: DynamicModule.PluginFlv
|
|
19565
|
+
retryCount: 0,
|
|
19566
|
+
disconnectRetryCount: ((_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.retryCount) ?? void 0
|
|
19042
19567
|
};
|
|
19043
19568
|
};
|
|
19044
|
-
const
|
|
19569
|
+
const createFlvMseStrategy = (options) => ({
|
|
19570
|
+
options: {
|
|
19571
|
+
flv: {
|
|
19572
|
+
...getDefaultFlvOptions(options),
|
|
19573
|
+
...(options == null ? void 0 : options.flv) ?? {}
|
|
19574
|
+
}
|
|
19575
|
+
},
|
|
19576
|
+
module: DynamicModule.PluginFlv
|
|
19577
|
+
});
|
|
19578
|
+
const createFlvMssStrategy = (options) => ({
|
|
19579
|
+
options: {
|
|
19580
|
+
flv: {
|
|
19581
|
+
preferMMS: true,
|
|
19582
|
+
...getDefaultFlvOptions(options),
|
|
19583
|
+
...(options == null ? void 0 : options.flv) ?? {}
|
|
19584
|
+
}
|
|
19585
|
+
},
|
|
19586
|
+
module: DynamicModule.PluginFlv
|
|
19587
|
+
});
|
|
19588
|
+
const createHlsMseStrategy = (options, useHlsJs) => ({
|
|
19045
19589
|
options: {
|
|
19046
19590
|
hls: {
|
|
19047
19591
|
retryCount: 0,
|
|
19048
19592
|
pollRetryCount: 0,
|
|
19593
|
+
allowedStreamTrackChange: false,
|
|
19049
19594
|
...(options == null ? void 0 : options.hls) ?? {}
|
|
19050
19595
|
}
|
|
19051
19596
|
},
|
|
19052
|
-
module: DynamicModule.PluginHls
|
|
19597
|
+
module: useHlsJs ? DynamicModule.PluginHlsJs : DynamicModule.PluginHls
|
|
19053
19598
|
});
|
|
19054
19599
|
const createSoftDecodeH264Strategy = () => ({
|
|
19055
19600
|
options: {
|
|
@@ -19144,6 +19689,8 @@ function combineOptions(strategyList) {
|
|
|
19144
19689
|
const { VeError: VeError2 } = error$1;
|
|
19145
19690
|
var LiveErrorCode = /* @__PURE__ */ ((LiveErrorCode2) => {
|
|
19146
19691
|
LiveErrorCode2[LiveErrorCode2["INVALID_PARAMETER"] = 210] = "INVALID_PARAMETER";
|
|
19692
|
+
LiveErrorCode2[LiveErrorCode2["EMPTY_RTM_FALLBACK_PARAMETER"] = 211] = "EMPTY_RTM_FALLBACK_PARAMETER";
|
|
19693
|
+
LiveErrorCode2[LiveErrorCode2["INVALID_LOGGER"] = 220] = "INVALID_LOGGER";
|
|
19147
19694
|
return LiveErrorCode2;
|
|
19148
19695
|
})(LiveErrorCode || {});
|
|
19149
19696
|
const ErrorCode = {
|
|
@@ -19158,10 +19705,30 @@ const ERRORS = {
|
|
|
19158
19705
|
]: {
|
|
19159
19706
|
messageTextKey: "INVALID_PARAMETER",
|
|
19160
19707
|
level: Level.Fatal
|
|
19708
|
+
},
|
|
19709
|
+
[
|
|
19710
|
+
211
|
|
19711
|
+
/* EMPTY_RTM_FALLBACK_PARAMETER */
|
|
19712
|
+
]: {
|
|
19713
|
+
messageTextKey: "EMPTY_RTM_FALLBACK_PARAMETER",
|
|
19714
|
+
level: Level.Warn
|
|
19715
|
+
},
|
|
19716
|
+
[
|
|
19717
|
+
220
|
|
19718
|
+
/* INVALID_LOGGER */
|
|
19719
|
+
]: {
|
|
19720
|
+
messageTextKey: "INVALID_LOGGER",
|
|
19721
|
+
level: Level.Warn
|
|
19161
19722
|
}
|
|
19162
19723
|
};
|
|
19163
19724
|
function create(errorCode, i18n) {
|
|
19164
|
-
return new VeError2(
|
|
19725
|
+
return new VeError2(
|
|
19726
|
+
{
|
|
19727
|
+
errorCode,
|
|
19728
|
+
...ERRORS[errorCode]
|
|
19729
|
+
},
|
|
19730
|
+
i18n
|
|
19731
|
+
);
|
|
19165
19732
|
}
|
|
19166
19733
|
async function isRTMSupported() {
|
|
19167
19734
|
const { RtmPlugin } = await load(DynamicModule.PluginRtm);
|
|
@@ -19184,21 +19751,32 @@ const generateFallbackUrl = (url) => {
|
|
|
19184
19751
|
return url.replace(".sdp", ".m3u8");
|
|
19185
19752
|
}
|
|
19186
19753
|
};
|
|
19187
|
-
const getRtmStrategy = async (options, player) => {
|
|
19188
|
-
var _a;
|
|
19754
|
+
const getRtmStrategy = async (options, player, i18n) => {
|
|
19755
|
+
var _a, _b;
|
|
19189
19756
|
let backupStrategy;
|
|
19190
|
-
|
|
19191
|
-
const {
|
|
19192
|
-
|
|
19193
|
-
|
|
19194
|
-
|
|
19195
|
-
|
|
19196
|
-
}
|
|
19197
|
-
const
|
|
19757
|
+
let actualFallbackUrl = "";
|
|
19758
|
+
const { url, playlist } = options;
|
|
19759
|
+
const { fallbackUrl, enableRTMAutoTranscode, ...ret } = options.rtm || {};
|
|
19760
|
+
let { enableFallback = true } = options.rtm || {};
|
|
19761
|
+
if (playlist == null ? void 0 : playlist.length) {
|
|
19762
|
+
enableFallback = false;
|
|
19763
|
+
}
|
|
19764
|
+
const isRTMAutoTranscode = enableRTMAutoTranscode || ((_a = getUrlObject(url)) == null ? void 0 : _a.searchParams.get("enableRTMAutoTranscode")) === "true";
|
|
19765
|
+
if (enableFallback) {
|
|
19766
|
+
if (fallbackUrl) {
|
|
19767
|
+
actualFallbackUrl = fallbackUrl;
|
|
19768
|
+
} else if (isRTMAutoTranscode && url) {
|
|
19769
|
+
actualFallbackUrl = generateFallbackUrl(url);
|
|
19770
|
+
} else {
|
|
19771
|
+
console.warn(
|
|
19772
|
+
create(ErrorCode.EMPTY_RTM_FALLBACK_PARAMETER, i18n).message
|
|
19773
|
+
);
|
|
19774
|
+
}
|
|
19775
|
+
}
|
|
19198
19776
|
const backupType = actualFallbackUrl && util.getStreamType(actualFallbackUrl);
|
|
19199
19777
|
if (backupType === "flv" && util.isMseSupported(Codec.H264)) {
|
|
19200
19778
|
backupStrategy = createFlvMseStrategy(options);
|
|
19201
|
-
} else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((
|
|
19779
|
+
} else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((_b = options == null ? void 0 : options.hls) == null ? void 0 : _b.enableMSE)) && util.isMseSupported(Codec.H264)) {
|
|
19202
19780
|
backupStrategy = createHlsMseStrategy(options);
|
|
19203
19781
|
}
|
|
19204
19782
|
const [rtmCdn, backupCdn] = await Promise.all([
|
|
@@ -19213,33 +19791,35 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19213
19791
|
}
|
|
19214
19792
|
}).catch(() => void 0)
|
|
19215
19793
|
]);
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19221
|
-
if (
|
|
19222
|
-
player
|
|
19223
|
-
|
|
19224
|
-
|
|
19225
|
-
|
|
19226
|
-
|
|
19227
|
-
|
|
19228
|
-
|
|
19229
|
-
|
|
19794
|
+
if (actualFallbackUrl) {
|
|
19795
|
+
const [RTMSupported, RTMSupportCodec] = await Promise.all([
|
|
19796
|
+
isRTMSupported(),
|
|
19797
|
+
isRTMSupportCodec()
|
|
19798
|
+
]);
|
|
19799
|
+
if (!RTMSupported || !RTMSupportCodec) {
|
|
19800
|
+
if (player) {
|
|
19801
|
+
player.emit("degrade", {
|
|
19802
|
+
url: actualFallbackUrl,
|
|
19803
|
+
originRtmUrl: url,
|
|
19804
|
+
code: "NOT_SUPPORT",
|
|
19805
|
+
message: "not support rtm or h264",
|
|
19806
|
+
isRTMSupported: RTMSupported,
|
|
19807
|
+
isRTMSupportCodec: RTMSupportCodec
|
|
19808
|
+
});
|
|
19809
|
+
}
|
|
19810
|
+
return {
|
|
19811
|
+
options: {
|
|
19812
|
+
...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
|
|
19813
|
+
url: actualFallbackUrl,
|
|
19814
|
+
_RTMdegrade: {
|
|
19815
|
+
_originRtmUrl: url,
|
|
19816
|
+
_isRTMSupported: RTMSupported,
|
|
19817
|
+
_isRTMSupportCodec: RTMSupportCodec
|
|
19818
|
+
}
|
|
19819
|
+
},
|
|
19820
|
+
plugins: backupCdn ? [backupCdn] : []
|
|
19821
|
+
};
|
|
19230
19822
|
}
|
|
19231
|
-
return {
|
|
19232
|
-
options: {
|
|
19233
|
-
...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
|
|
19234
|
-
url: actualFallbackUrl,
|
|
19235
|
-
_RTMdegrade: {
|
|
19236
|
-
_originRtmUrl: url,
|
|
19237
|
-
_isRTMSupported: RTMSupported,
|
|
19238
|
-
_isRTMSupportCodec: RTMSupportCodec
|
|
19239
|
-
}
|
|
19240
|
-
},
|
|
19241
|
-
plugins: backupCdn ? [backupCdn] : []
|
|
19242
|
-
};
|
|
19243
19823
|
}
|
|
19244
19824
|
return {
|
|
19245
19825
|
options: {
|
|
@@ -19279,13 +19859,62 @@ function isMseSupportedWithDrm({
|
|
|
19279
19859
|
}
|
|
19280
19860
|
return true;
|
|
19281
19861
|
}
|
|
19282
|
-
const
|
|
19862
|
+
const { isMMSSupported: isMMSSupported$1, isMseSupported: isMseSupported$1 } = util;
|
|
19863
|
+
function enableMMS() {
|
|
19864
|
+
return sniffer$1.os.isIos;
|
|
19865
|
+
}
|
|
19866
|
+
function isFLVSupported(codec = Codec.H264) {
|
|
19867
|
+
const isMediaSourceSupported = enableMMS() ? isMMSSupported$1 : isMseSupported$1;
|
|
19868
|
+
return isMediaSourceSupported(codec);
|
|
19869
|
+
}
|
|
19870
|
+
const { appendSearchParams } = util;
|
|
19871
|
+
const getFlvStrategy = async (options) => {
|
|
19872
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19873
|
+
let mseStrategy;
|
|
19874
|
+
let softStrategy;
|
|
19875
|
+
const enableLowLatency = (_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.enableLowLatency;
|
|
19876
|
+
const enableFrameChasing = ((_c = (_b = options == null ? void 0 : options.flv) == null ? void 0 : _b.lowLatency) == null ? void 0 : _c.enableFrameChasing) ?? true;
|
|
19877
|
+
const abrPts = ((_e = (_d = options == null ? void 0 : options.flv) == null ? void 0 : _d.lowLatency) == null ? void 0 : _e.abrPts) ?? "-800";
|
|
19878
|
+
const codec = await getCodec(options);
|
|
19879
|
+
const isSoftDecode$1 = await isSoftDecode(options, codec);
|
|
19880
|
+
if (isSoftDecode$1) {
|
|
19881
|
+
softStrategy = codec === Codec.H265 ? createSoftDecodeH265Strategy() : createSoftDecodeH264Strategy();
|
|
19882
|
+
mseStrategy = createFlvMseStrategy(options);
|
|
19883
|
+
}
|
|
19884
|
+
if (codec === "unknown" ? isFLVSupported(Codec.H264) : isFLVSupported(codec)) {
|
|
19885
|
+
mseStrategy = enableMMS() ? createFlvMssStrategy(options) : createFlvMseStrategy(options);
|
|
19886
|
+
}
|
|
19887
|
+
if (!mseStrategy && !softStrategy) {
|
|
19888
|
+
return {};
|
|
19889
|
+
}
|
|
19890
|
+
const [mseModule, softModule] = await Promise.all([
|
|
19891
|
+
(mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
|
|
19892
|
+
(softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
|
|
19893
|
+
]);
|
|
19894
|
+
(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));
|
|
19895
|
+
const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
|
|
19896
|
+
const plugins = [];
|
|
19897
|
+
if (enableLowLatency) {
|
|
19898
|
+
combineOptions$1.url = appendSearchParams(options.url, { abr_pts: abrPts });
|
|
19899
|
+
}
|
|
19900
|
+
if (mseModule) {
|
|
19901
|
+
plugins.push(mseModule.FlvPlugin);
|
|
19902
|
+
if (enableLowLatency && enableFrameChasing) {
|
|
19903
|
+
plugins.push(mseModule.Adaptive);
|
|
19904
|
+
}
|
|
19905
|
+
}
|
|
19906
|
+
return {
|
|
19907
|
+
options: combineOptions$1,
|
|
19908
|
+
plugins
|
|
19909
|
+
};
|
|
19910
|
+
};
|
|
19911
|
+
const getTypeStrategy = async (options, player, i18n) => {
|
|
19283
19912
|
const type = options.url ? util.getStreamType(options.url) : "";
|
|
19284
19913
|
if (!type || type === "unknown") {
|
|
19285
19914
|
return { options: {}, plugins: [] };
|
|
19286
19915
|
}
|
|
19287
19916
|
if (type === "rtm") {
|
|
19288
|
-
return await getRtmStrategy(options, player);
|
|
19917
|
+
return await getRtmStrategy(options, player, i18n);
|
|
19289
19918
|
}
|
|
19290
19919
|
if (type === "flv") {
|
|
19291
19920
|
return await getFlvStrategy(options);
|
|
@@ -19891,9 +20520,9 @@ function getDefaultLog() {
|
|
|
19891
20520
|
// render_fps: this.render_fps, //帧率
|
|
19892
20521
|
decode_fps: 0,
|
|
19893
20522
|
render_fps: 0,
|
|
19894
|
-
drop_count:
|
|
20523
|
+
drop_count: -1,
|
|
19895
20524
|
// 丢帧数
|
|
19896
|
-
drop_percent:
|
|
20525
|
+
drop_percent: -1,
|
|
19897
20526
|
// 丢帧率
|
|
19898
20527
|
sei_source: "",
|
|
19899
20528
|
sei_delay: 0,
|
|
@@ -19999,7 +20628,7 @@ function getCommonLog(options) {
|
|
|
19999
20628
|
live_sdk_version: getPlayerCore(player) || player.hlsOps ? "2" : "-1",
|
|
20000
20629
|
player_sdk_version: player.version,
|
|
20001
20630
|
// eslint-disable-next-line no-undef
|
|
20002
|
-
logger_version: "1.1.0-alpha.
|
|
20631
|
+
logger_version: "1.1.0-alpha.12",
|
|
20003
20632
|
// 由rollup 在编译时注入
|
|
20004
20633
|
report_version: "5",
|
|
20005
20634
|
product_line: options.product_line,
|
|
@@ -20655,10 +21284,14 @@ var XgLiveLogger = /* @__PURE__ */ function() {
|
|
|
20655
21284
|
if (video.getVideoPlaybackQuality) {
|
|
20656
21285
|
var quality = video.getVideoPlaybackQuality();
|
|
20657
21286
|
this.log.playing.drop_count = quality.droppedVideoFrames - this.tempDroppedFrameCount;
|
|
20658
|
-
this.log.playing.drop_percent = Number.parseFloat(this.
|
|
21287
|
+
this.log.playing.drop_percent = Number.parseFloat((quality.droppedVideoFrames - this.tempDroppedFrameCount) / (quality.totalVideoFrames - this.tempTotalFrameCount)).toFixed(1);
|
|
20659
21288
|
this.log.play_stop.drop_percent = Number.parseFloat(quality.droppedVideoFrames / quality.totalVideoFrames).toFixed(1);
|
|
20660
21289
|
this.tempDroppedFrameCount = quality.droppedVideoFrames;
|
|
20661
21290
|
this.tempTotalFrameCount = quality.totalVideoFrames;
|
|
21291
|
+
} else if (video.webkitDroppedFrameCount != void 0) {
|
|
21292
|
+
var droppedVideoFrames = video.webkitDroppedFrameCount;
|
|
21293
|
+
this.log.playing.drop_count = droppedVideoFrames - this.tempDroppedFrameCount;
|
|
21294
|
+
this.tempDroppedFrameCount = droppedVideoFrames;
|
|
20662
21295
|
}
|
|
20663
21296
|
};
|
|
20664
21297
|
_proto2.getRtcStats = function getRtcStats(duration, first) {
|
|
@@ -20845,7 +21478,7 @@ var XgLiveLogger = /* @__PURE__ */ function() {
|
|
|
20845
21478
|
}
|
|
20846
21479
|
_this9.player.off("playing", _this9.handlePlayerPlaying);
|
|
20847
21480
|
_this9.player.off("timeupdate", _this9.handlePlayerPlaying);
|
|
20848
|
-
if (_this9.core) {
|
|
21481
|
+
if (_this9.core && _this9.core.getStats) {
|
|
20849
21482
|
var _ref5 = _this9.core.getStats() || {}, fps = _ref5.fps;
|
|
20850
21483
|
_this9.commonParams.fps = fps;
|
|
20851
21484
|
}
|
|
@@ -21146,7 +21779,7 @@ var XgLiveLogger = /* @__PURE__ */ function() {
|
|
|
21146
21779
|
if (this.firstFrameViewed) {
|
|
21147
21780
|
return;
|
|
21148
21781
|
}
|
|
21149
|
-
if (this.core) {
|
|
21782
|
+
if (this.core && this.core.getStats) {
|
|
21150
21783
|
var _ref6 = this.core.getStats() || {}, fps = _ref6.fps;
|
|
21151
21784
|
this.commonParams.fps = fps;
|
|
21152
21785
|
}
|
|
@@ -22042,22 +22675,23 @@ class Logger extends Plugin {
|
|
|
22042
22675
|
}
|
|
22043
22676
|
static get defaultConfig() {
|
|
22044
22677
|
return {
|
|
22045
|
-
appId:
|
|
22678
|
+
appId: 654925,
|
|
22046
22679
|
enable: true,
|
|
22047
22680
|
showUserIdInErrorPanel: true
|
|
22048
22681
|
};
|
|
22049
22682
|
}
|
|
22050
|
-
|
|
22683
|
+
beforeCreate(args) {
|
|
22051
22684
|
var _a, _b;
|
|
22052
|
-
if (!
|
|
22685
|
+
if (!args.config.enable) {
|
|
22053
22686
|
return;
|
|
22054
22687
|
}
|
|
22055
|
-
|
|
22056
|
-
|
|
22688
|
+
args.config.userId = ((_a = args.config) == null ? void 0 : _a.userId) || getUserId2();
|
|
22689
|
+
args.config.deviceId = ((_b = args.config) == null ? void 0 : _b.deviceId) || getDeviceID2();
|
|
22690
|
+
}
|
|
22691
|
+
afterCreate() {
|
|
22692
|
+
if (!this.config.enable) {
|
|
22057
22693
|
return;
|
|
22058
22694
|
}
|
|
22059
|
-
this._userId = ((_a = this.config) == null ? void 0 : _a.userId) || getUserId2();
|
|
22060
|
-
this._deviceId = ((_b = this.config) == null ? void 0 : _b.deviceId) || getDeviceID2();
|
|
22061
22695
|
this.open();
|
|
22062
22696
|
}
|
|
22063
22697
|
destroy() {
|
|
@@ -22098,16 +22732,17 @@ class Logger extends Plugin {
|
|
|
22098
22732
|
this._liveLogger = new LoggerControl({
|
|
22099
22733
|
Tea: q,
|
|
22100
22734
|
player: this.player,
|
|
22101
|
-
aid: this.config.appId,
|
|
22735
|
+
aid: this.config.appId || 654925,
|
|
22102
22736
|
project_key: this.config.appId,
|
|
22103
22737
|
app_name: this.config.appName || this.config.appId,
|
|
22104
22738
|
user_id: this._userId,
|
|
22105
22739
|
device_id: this._deviceId,
|
|
22740
|
+
error_report_stop: true,
|
|
22106
22741
|
ext: {
|
|
22107
|
-
veplayer_version: "2.6.0-rc.
|
|
22108
|
-
flv_version: "3.0.21-rc.
|
|
22109
|
-
hls_version: "3.0.21-rc.
|
|
22110
|
-
rts_version: "0.2.1-alpha.
|
|
22742
|
+
veplayer_version: "2.6.0-rc.5",
|
|
22743
|
+
flv_version: "3.0.21-rc.5",
|
|
22744
|
+
hls_version: "3.0.21-rc.5",
|
|
22745
|
+
rts_version: "0.2.1-alpha.14"
|
|
22111
22746
|
}
|
|
22112
22747
|
});
|
|
22113
22748
|
}
|
|
@@ -22336,9 +22971,16 @@ class InfoPanel extends Plugin {
|
|
|
22336
22971
|
return rowDom;
|
|
22337
22972
|
}
|
|
22338
22973
|
}
|
|
22974
|
+
const logDoc = (
|
|
22975
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22976
|
+
// @ts-ignore
|
|
22977
|
+
"https://www.volcengine.com/docs/6469/138655#日志上报"
|
|
22978
|
+
);
|
|
22339
22979
|
const EN = {
|
|
22340
22980
|
...EN$1,
|
|
22341
22981
|
INVALID_PARAMETER: "The imported parameter is empty, please pass in necessary parameters such as the stream address",
|
|
22982
|
+
INVALID_LOGGER: `Log options not configured correctly. Please refer to this document ${logDoc} to configure the logs.`,
|
|
22983
|
+
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.",
|
|
22342
22984
|
// info-panel
|
|
22343
22985
|
FORMAT: "format",
|
|
22344
22986
|
FPS: "fps",
|
|
@@ -22356,6 +22998,8 @@ const EN = {
|
|
|
22356
22998
|
const ZH_CN = {
|
|
22357
22999
|
...ZH_CN$1,
|
|
22358
23000
|
INVALID_PARAMETER: "入参为空,请传入流地址等必要参数",
|
|
23001
|
+
INVALID_LOGGER: `未正确配置质量日志参数, 请参考 ${logDoc} 配置`,
|
|
23002
|
+
EMPTY_RTM_FALLBACK_PARAMETER: "未配置 RTM 降级地址 fallbackUrl,请设置 enableFallback: false 取消降级或根据浏览器环境配置 FLV、HLS 格式降级地址",
|
|
22359
23003
|
// info-panel
|
|
22360
23004
|
FORMAT: "格式",
|
|
22361
23005
|
FPS: "帧率",
|
|
@@ -22476,6 +23120,10 @@ class VePlayerLive extends VePlayerBase {
|
|
|
22476
23120
|
}
|
|
22477
23121
|
return time;
|
|
22478
23122
|
}
|
|
23123
|
+
get ad() {
|
|
23124
|
+
var _a, _b;
|
|
23125
|
+
return (_b = (_a = this._player.plugins) == null ? void 0 : _a.ad) == null ? void 0 : _b.adManager;
|
|
23126
|
+
}
|
|
22479
23127
|
/** {zh}
|
|
22480
23128
|
* @brief 调用此方法开启直播日志上报。
|
|
22481
23129
|
*/
|
|
@@ -22626,15 +23274,18 @@ class VePlayerLive extends VePlayerBase {
|
|
|
22626
23274
|
}
|
|
22627
23275
|
}
|
|
22628
23276
|
async function createLivePlayer(options) {
|
|
22629
|
-
var _a, _b;
|
|
23277
|
+
var _a, _b, _c, _d;
|
|
22630
23278
|
let player = void 0;
|
|
22631
|
-
if (!options || !options.url && !options.playlist) {
|
|
22632
|
-
throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
|
|
22633
|
-
}
|
|
22634
23279
|
const i18n = new VeI18n({
|
|
22635
23280
|
lang: options == null ? void 0 : options.lang,
|
|
22636
23281
|
i18n: options == null ? void 0 : options.i18n
|
|
22637
23282
|
});
|
|
23283
|
+
if (!options || !options.url && !options.playlist) {
|
|
23284
|
+
throw create(ErrorCode.INVALID_PARAMETER, i18n);
|
|
23285
|
+
}
|
|
23286
|
+
if (!((_a = options.logger) == null ? void 0 : _a.appId) && ((_b = options == null ? void 0 : options.logger) == null ? void 0 : _b.enable) !== false) {
|
|
23287
|
+
console.warn(create(ErrorCode.INVALID_LOGGER, i18n).message);
|
|
23288
|
+
}
|
|
22638
23289
|
const finalOptions = {
|
|
22639
23290
|
...options,
|
|
22640
23291
|
plugins: [...LIVE_DEFAULT_PLUGINS, ...options.plugins ?? []]
|
|
@@ -22646,18 +23297,23 @@ async function createLivePlayer(options) {
|
|
|
22646
23297
|
isLive: true,
|
|
22647
23298
|
i18nManager: i18n,
|
|
22648
23299
|
preProcessUrl: (url) => {
|
|
23300
|
+
if (isType(".ts", url)) {
|
|
23301
|
+
return { url };
|
|
23302
|
+
}
|
|
22649
23303
|
return {
|
|
22650
23304
|
url: generateUrlWithSessionId(url)
|
|
22651
23305
|
};
|
|
22652
23306
|
},
|
|
22653
23307
|
async preparePlugins(url) {
|
|
23308
|
+
var _a2;
|
|
22654
23309
|
const [typeStrategy, drmStrategy, abrStrategy] = await Promise.all([
|
|
22655
23310
|
getTypeStrategy(
|
|
22656
23311
|
{
|
|
22657
23312
|
...finalOptions,
|
|
22658
23313
|
url
|
|
22659
23314
|
},
|
|
22660
|
-
player
|
|
23315
|
+
player,
|
|
23316
|
+
i18n
|
|
22661
23317
|
),
|
|
22662
23318
|
getDrmStrategy(
|
|
22663
23319
|
{
|
|
@@ -22680,14 +23336,15 @@ async function createLivePlayer(options) {
|
|
|
22680
23336
|
...plugins ?? [],
|
|
22681
23337
|
...drmPlugins ?? [],
|
|
22682
23338
|
...abrPlugins ?? []
|
|
22683
|
-
]
|
|
23339
|
+
],
|
|
23340
|
+
useSrc: !((_a2 = typeStrategy.plugins) == null ? void 0 : _a2.length)
|
|
22684
23341
|
};
|
|
22685
23342
|
}
|
|
22686
23343
|
},
|
|
22687
23344
|
VePlayerLive
|
|
22688
23345
|
);
|
|
22689
23346
|
if (player) {
|
|
22690
|
-
const RTMDegrade = (
|
|
23347
|
+
const RTMDegrade = (_d = (_c = player == null ? void 0 : player._player) == null ? void 0 : _c.config) == null ? void 0 : _d._RTMdegrade;
|
|
22691
23348
|
if (RTMDegrade) {
|
|
22692
23349
|
player.emit("degrade", {
|
|
22693
23350
|
originRtmUrl: RTMDegrade._originRtmUrl,
|
|
@@ -22708,6 +23365,7 @@ var live = /* @__PURE__ */ Object.freeze({
|
|
|
22708
23365
|
setModuleSystem("esm");
|
|
22709
23366
|
const isMseSupported = util.isMseSupported;
|
|
22710
23367
|
const isSoftDecodeSupported = util.isSoftDecodeSupported;
|
|
23368
|
+
const isMMSSupported = util.isMMSSupported;
|
|
22711
23369
|
export {
|
|
22712
23370
|
Codec,
|
|
22713
23371
|
DecodeType,
|
|
@@ -22721,6 +23379,8 @@ export {
|
|
|
22721
23379
|
sniffer$1 as Sniffer,
|
|
22722
23380
|
ZH_CN$1 as ZH_CN,
|
|
22723
23381
|
createLivePlayer,
|
|
23382
|
+
isFLVSupported,
|
|
23383
|
+
isMMSSupported,
|
|
22724
23384
|
isMseSupported,
|
|
22725
23385
|
isRTMSupportCodec,
|
|
22726
23386
|
isRTMSupported,
|