@volcengine/veplayer-plugin 2.6.0 → 2.6.1-rc.1
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 +81781 -83169
- package/esm/index.production.js +3 -3
- package/esm/veplayer.plugin.abr.development.js +2 -1
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.ad.development.js +2 -1
- package/esm/veplayer.plugin.ad.production.js +1 -1
- package/esm/veplayer.plugin.drm.development.js +2 -1
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +33 -12
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +53 -15
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +115 -124
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +3 -2
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.shaka.development.js +2 -1
- package/esm/veplayer.plugin.shaka.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.abr.development.js +2 -1
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.ad.development.js +2 -1
- package/umd/veplayer.plugin.ad.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +2 -1
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +33 -12
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +53 -15
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +115 -124
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +3 -2
- package/umd/veplayer.plugin.rtm.production.js +1 -1
- package/umd/veplayer.plugin.shaka.development.js +2 -1
- package/umd/veplayer.plugin.shaka.production.js +1 -1
|
@@ -1544,7 +1544,7 @@ util.getCurrentTimeByOffset = function(offsetTime, segments) {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
return offsetTime;
|
|
1546
1546
|
};
|
|
1547
|
-
var version = "3.0.21-rc.
|
|
1547
|
+
var version = "3.0.21-rc.21";
|
|
1548
1548
|
var ERROR_MAP = {
|
|
1549
1549
|
1: 5101,
|
|
1550
1550
|
2: 5102,
|
|
@@ -1718,8 +1718,9 @@ function removeHooks(hookName, handler) {
|
|
|
1718
1718
|
if (index !== -1) {
|
|
1719
1719
|
hooks.splice(index, 1);
|
|
1720
1720
|
}
|
|
1721
|
+
} else if (__hooks[hookName]) {
|
|
1722
|
+
__hooks[hookName] = null;
|
|
1721
1723
|
}
|
|
1722
|
-
delete __hooks[hookName];
|
|
1723
1724
|
}
|
|
1724
1725
|
function hooksDescriptor(instance) {
|
|
1725
1726
|
var presetHooks = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
@@ -3784,15 +3785,17 @@ var MSE = /* @__PURE__ */ function() {
|
|
|
3784
3785
|
op.exec();
|
|
3785
3786
|
} catch (error) {
|
|
3786
3787
|
if (error && error.message && error.message.indexOf("SourceBuffer is full") >= 0) {
|
|
3788
|
+
var _op$promise;
|
|
3787
3789
|
this._mseFullFlag[type] = true;
|
|
3788
3790
|
if (op.context && _typeof(op.context) === "object") {
|
|
3789
3791
|
op.context.isFull = true;
|
|
3790
3792
|
}
|
|
3791
3793
|
this._logger.error("[MSE error], context,", op.context, " ,name,", op.opName, ",err,SourceBuffer is full");
|
|
3792
|
-
op.promise.reject(new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_FULL, error));
|
|
3794
|
+
op === null || op === void 0 ? void 0 : (_op$promise = op.promise) === null || _op$promise === void 0 ? void 0 : _op$promise.reject(new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_FULL, error));
|
|
3793
3795
|
} else {
|
|
3796
|
+
var _op$promise2;
|
|
3794
3797
|
this._logger.error(error);
|
|
3795
|
-
op.promise.reject(error.constructor === StreamingError ? error : new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_OTHER, error));
|
|
3798
|
+
op === null || op === void 0 ? void 0 : (_op$promise2 = op.promise) === null || _op$promise2 === void 0 ? void 0 : _op$promise2.reject(error.constructor === StreamingError ? error : new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_OTHER, error));
|
|
3796
3799
|
queue.shift();
|
|
3797
3800
|
this._startQueue(type);
|
|
3798
3801
|
}
|
|
@@ -6572,6 +6575,19 @@ var NALu = /* @__PURE__ */ function() {
|
|
|
6572
6575
|
_createClass$1(NALu2, null, [{
|
|
6573
6576
|
key: "parseAnnexB",
|
|
6574
6577
|
value: function parseAnnexB(data) {
|
|
6578
|
+
var j = data.byteLength - 1;
|
|
6579
|
+
var dropZerosLength = 0;
|
|
6580
|
+
do {
|
|
6581
|
+
if (data[j] === 0) {
|
|
6582
|
+
dropZerosLength++;
|
|
6583
|
+
} else {
|
|
6584
|
+
break;
|
|
6585
|
+
}
|
|
6586
|
+
j--;
|
|
6587
|
+
} while (j > 0);
|
|
6588
|
+
if (dropZerosLength >= 3) {
|
|
6589
|
+
data = data.subarray(0, j + 1);
|
|
6590
|
+
}
|
|
6575
6591
|
var len = data.length;
|
|
6576
6592
|
var start = 2;
|
|
6577
6593
|
var end = 0;
|
|
@@ -6592,6 +6608,9 @@ var NALu = /* @__PURE__ */ function() {
|
|
|
6592
6608
|
} else if (data[end - 2] !== 0) {
|
|
6593
6609
|
end++;
|
|
6594
6610
|
break;
|
|
6611
|
+
} else if (end < len - 1 && data[end + 1] !== 1) {
|
|
6612
|
+
end++;
|
|
6613
|
+
break;
|
|
6595
6614
|
}
|
|
6596
6615
|
if (start !== end - 2)
|
|
6597
6616
|
units.push(data.subarray(start, end - 2));
|
|
@@ -10229,7 +10248,7 @@ var BufferService = /* @__PURE__ */ function() {
|
|
|
10229
10248
|
value: function() {
|
|
10230
10249
|
var _appendBuffer = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee5(chunk) {
|
|
10231
10250
|
var _this = this;
|
|
10232
|
-
var switchingNoReset, demuxer, videoTrack, audioTrack, metadataTrack, idx, videoExist, audioExist, duration, track, videoType, audioType, mse, afterAppend, newId, remuxResult, p;
|
|
10251
|
+
var switchingNoReset, demuxer, videoTrack, audioTrack, metadataTrack, idx, videoExist, audioExist, duration, track, videoType, audioType, mse, afterAppend, newId, remuxResult, p, ret;
|
|
10233
10252
|
return _regeneratorRuntime$1().wrap(function _callee5$(_context5) {
|
|
10234
10253
|
while (1)
|
|
10235
10254
|
switch (_context5.prev = _context5.next) {
|
|
@@ -10339,7 +10358,7 @@ var BufferService = /* @__PURE__ */ function() {
|
|
|
10339
10358
|
this._emitMetaParsedEvent(videoTrack, audioTrack);
|
|
10340
10359
|
}
|
|
10341
10360
|
if (!mse) {
|
|
10342
|
-
_context5.next =
|
|
10361
|
+
_context5.next = 83;
|
|
10343
10362
|
break;
|
|
10344
10363
|
}
|
|
10345
10364
|
if (this._sourceCreated) {
|
|
@@ -10392,16 +10411,18 @@ var BufferService = /* @__PURE__ */ function() {
|
|
|
10392
10411
|
if (remuxResult.audioSegment)
|
|
10393
10412
|
p.push(mse.append(audioType, remuxResult.audioSegment));
|
|
10394
10413
|
this.flv._transferCost.start(TRANSFER_EVENT.APPEND);
|
|
10395
|
-
|
|
10414
|
+
ret = Promise.all(p);
|
|
10415
|
+
ret.then(afterAppend).then(function() {
|
|
10396
10416
|
_this.flv._transferCost.end(TRANSFER_EVENT.APPEND);
|
|
10397
10417
|
afterAppend();
|
|
10398
|
-
})
|
|
10399
|
-
|
|
10418
|
+
});
|
|
10419
|
+
return _context5.abrupt("return", ret);
|
|
10420
|
+
case 83:
|
|
10400
10421
|
if (this._softVideo) {
|
|
10401
10422
|
this._softVideo.appendBuffer(videoTrack, audioTrack);
|
|
10402
10423
|
afterAppend();
|
|
10403
10424
|
}
|
|
10404
|
-
case
|
|
10425
|
+
case 84:
|
|
10405
10426
|
case "end":
|
|
10406
10427
|
return _context5.stop();
|
|
10407
10428
|
}
|
|
@@ -10977,7 +10998,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
10977
10998
|
_createClass$4(Flv2, [{
|
|
10978
10999
|
key: "version",
|
|
10979
11000
|
get: function get() {
|
|
10980
|
-
return "3.0.21-rc.
|
|
11001
|
+
return "3.0.21-rc.21";
|
|
10981
11002
|
}
|
|
10982
11003
|
}, {
|
|
10983
11004
|
key: "isLive",
|
|
@@ -11561,7 +11582,7 @@ var FlvPlugin$1 = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
11561
11582
|
get: function get() {
|
|
11562
11583
|
var _this$player, _this$player$config2;
|
|
11563
11584
|
var mediaType = (_this$player = this.player) === null || _this$player === void 0 ? void 0 : (_this$player$config2 = _this$player.config) === null || _this$player$config2 === void 0 ? void 0 : _this$player$config2.mediaType;
|
|
11564
|
-
return !!mediaType && mediaType !== "video" && mediaType !== "audio";
|
|
11585
|
+
return !!mediaType && mediaType !== "video" && mediaType !== "audio" && mediaType !== "offscreen-video";
|
|
11565
11586
|
}
|
|
11566
11587
|
}, {
|
|
11567
11588
|
key: "loader",
|