@byteplus/veplayer-plugin 2.4.0-rc.3 → 2.4.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.development.js +133 -43
- package/esm/index.production.js +3 -3
- package/esm/veplayer.plugin.flv.development.js +21 -7
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +104 -28
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.flv.development.js +21 -7
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +104 -28
- package/umd/veplayer.plugin.hls.production.js +1 -1
|
@@ -1538,7 +1538,7 @@ util.getCurrentTimeByOffset = function(offsetTime, segments) {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
return offsetTime;
|
|
1540
1540
|
};
|
|
1541
|
-
var version = "3.0.
|
|
1541
|
+
var version = "3.0.19-rc.0";
|
|
1542
1542
|
var ERROR_MAP = {
|
|
1543
1543
|
1: 5101,
|
|
1544
1544
|
2: 5102,
|
|
@@ -2786,6 +2786,7 @@ var ERR = {
|
|
|
2786
2786
|
MSE_APPEND_BUFFER: "MSE_APPEND_BUFFER",
|
|
2787
2787
|
MSE_OTHER: "MSE_OTHER",
|
|
2788
2788
|
MSE_FULL: "MSE_FULL",
|
|
2789
|
+
MSE_CHANGE_TYPE: "MSE_CHANGE_TYPE",
|
|
2789
2790
|
OPTION: "OPTION",
|
|
2790
2791
|
DASH: "DASH",
|
|
2791
2792
|
LICENSE: "LICENSE",
|
|
@@ -2828,6 +2829,7 @@ var ERR_CODE = (_ERR_CODE = {}, _defineProperty$1(_ERR_CODE, ERR.MANIFEST, {
|
|
|
2828
2829
|
MSE_OTHER: 5202,
|
|
2829
2830
|
MSE_FULL: 5203,
|
|
2830
2831
|
MSE_HIJACK: 5204,
|
|
2832
|
+
MSE_CHANGE_TYPE: 5205,
|
|
2831
2833
|
EME_HIJACK: 5301
|
|
2832
2834
|
}), _defineProperty$1(_ERR_CODE, ERR.DRM, {
|
|
2833
2835
|
LICENSE: 7100,
|
|
@@ -3163,7 +3165,7 @@ var MSE = /* @__PURE__ */ function() {
|
|
|
3163
3165
|
queue.shift();
|
|
3164
3166
|
}
|
|
3165
3167
|
if (op) {
|
|
3166
|
-
var _this2$_sourceBuffer
|
|
3168
|
+
var _this2$_sourceBuffer$, _op$context;
|
|
3167
3169
|
var costtime = nowTime() - _this2._opst;
|
|
3168
3170
|
_this2._logger.debug("UpdateEnd(".concat(type, "/").concat(op.opName, ")"), SafeJSON.stringify(getTimeRanges((_this2$_sourceBuffer$ = _this2._sourceBuffer[type]) === null || _this2$_sourceBuffer$ === void 0 ? void 0 : _this2$_sourceBuffer$.buffered)), costtime, op.context);
|
|
3169
3171
|
op.promise.resolve({
|
|
@@ -3171,6 +3173,10 @@ var MSE = /* @__PURE__ */ function() {
|
|
|
3171
3173
|
context: op.context,
|
|
3172
3174
|
costtime
|
|
3173
3175
|
});
|
|
3176
|
+
var callback = (_op$context = op.context) === null || _op$context === void 0 ? void 0 : _op$context.callback;
|
|
3177
|
+
if (callback && typeof callback === "function") {
|
|
3178
|
+
callback(op.context);
|
|
3179
|
+
}
|
|
3174
3180
|
_this2._startQueue(type);
|
|
3175
3181
|
}
|
|
3176
3182
|
}
|
|
@@ -3432,10 +3438,15 @@ var MSE = /* @__PURE__ */ function() {
|
|
|
3432
3438
|
var sb = this._sourceBuffer[type];
|
|
3433
3439
|
if (!this.mediaSource || !sb || sb.mimeType === mimeType)
|
|
3434
3440
|
return Promise.resolve();
|
|
3435
|
-
if (typeof sb.changeType !== "function")
|
|
3436
|
-
return Promise.reject();
|
|
3441
|
+
if (typeof sb.changeType !== "function") {
|
|
3442
|
+
return Promise.reject(new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_CHANGE_TYPE, new Error("changeType is not a function")));
|
|
3443
|
+
}
|
|
3437
3444
|
return this._enqueueOp(type, function() {
|
|
3438
|
-
|
|
3445
|
+
try {
|
|
3446
|
+
sb.changeType(mimeType);
|
|
3447
|
+
} catch (e) {
|
|
3448
|
+
throw new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_CHANGE_TYPE, e);
|
|
3449
|
+
}
|
|
3439
3450
|
sb.mimeType = mimeType;
|
|
3440
3451
|
_this8._onSBUpdateEnd(type);
|
|
3441
3452
|
}, "changeType", {
|
|
@@ -3685,11 +3696,14 @@ var MSE = /* @__PURE__ */ function() {
|
|
|
3685
3696
|
} catch (error) {
|
|
3686
3697
|
if (error && error.message && error.message.indexOf("SourceBuffer is full") >= 0) {
|
|
3687
3698
|
this._mseFullFlag[type] = true;
|
|
3699
|
+
if (op.context && _typeof(op.context) === "object") {
|
|
3700
|
+
op.context.isFull = true;
|
|
3701
|
+
}
|
|
3688
3702
|
this._logger.error("[MSE error], context,", op.context, " ,name,", op.opName, ",err,SourceBuffer is full");
|
|
3689
3703
|
op.promise.reject(new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_FULL, error));
|
|
3690
3704
|
} else {
|
|
3691
3705
|
this._logger.error(error);
|
|
3692
|
-
op.promise.reject(new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_OTHER, error));
|
|
3706
|
+
op.promise.reject(error.constructor === StreamingError ? error : new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_OTHER, error));
|
|
3693
3707
|
queue.shift();
|
|
3694
3708
|
this._startQueue(type);
|
|
3695
3709
|
}
|
|
@@ -10465,7 +10479,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
10465
10479
|
_createClass$4(Flv2, [{
|
|
10466
10480
|
key: "version",
|
|
10467
10481
|
get: function get() {
|
|
10468
|
-
return "3.0.
|
|
10482
|
+
return "3.0.19-rc.0";
|
|
10469
10483
|
}
|
|
10470
10484
|
}, {
|
|
10471
10485
|
key: "isLive",
|