@volcengine/veplayer-plugin 2.6.0-rc.5 → 2.6.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.development.js +192 -164
- package/esm/index.production.js +2 -2
- package/esm/veplayer.plugin.abr.development.js +2 -1
- package/esm/veplayer.plugin.abr.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 +3 -2
- 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.drm.development.js +2 -1
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +3 -2
- 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
|
@@ -1644,7 +1644,7 @@
|
|
|
1644
1644
|
}
|
|
1645
1645
|
return offsetTime;
|
|
1646
1646
|
};
|
|
1647
|
-
var version = "3.0.21-
|
|
1647
|
+
var version = "3.0.21-alpha.13";
|
|
1648
1648
|
var ERROR_MAP = {
|
|
1649
1649
|
1: 5101,
|
|
1650
1650
|
2: 5102,
|
|
@@ -1819,8 +1819,9 @@
|
|
|
1819
1819
|
if (index !== -1) {
|
|
1820
1820
|
hooks.splice(index, 1);
|
|
1821
1821
|
}
|
|
1822
|
+
} else if (__hooks[hookName]) {
|
|
1823
|
+
__hooks[hookName] = null;
|
|
1822
1824
|
}
|
|
1823
|
-
delete __hooks[hookName];
|
|
1824
1825
|
}
|
|
1825
1826
|
function hooksDescriptor(instance) {
|
|
1826
1827
|
var presetHooks = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
@@ -3885,15 +3886,17 @@
|
|
|
3885
3886
|
op.exec();
|
|
3886
3887
|
} catch (error) {
|
|
3887
3888
|
if (error && error.message && error.message.indexOf("SourceBuffer is full") >= 0) {
|
|
3889
|
+
var _op$promise;
|
|
3888
3890
|
this._mseFullFlag[type] = true;
|
|
3889
3891
|
if (op.context && _typeof(op.context) === "object") {
|
|
3890
3892
|
op.context.isFull = true;
|
|
3891
3893
|
}
|
|
3892
3894
|
this._logger.error("[MSE error], context,", op.context, " ,name,", op.opName, ",err,SourceBuffer is full");
|
|
3893
|
-
op.promise.reject(new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_FULL, error));
|
|
3895
|
+
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));
|
|
3894
3896
|
} else {
|
|
3897
|
+
var _op$promise2;
|
|
3895
3898
|
this._logger.error(error);
|
|
3896
|
-
op.promise.reject(error.constructor === StreamingError ? error : new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_OTHER, error));
|
|
3899
|
+
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));
|
|
3897
3900
|
queue.shift();
|
|
3898
3901
|
this._startQueue(type);
|
|
3899
3902
|
}
|
|
@@ -6342,6 +6345,19 @@
|
|
|
6342
6345
|
_createClass(NALu2, null, [{
|
|
6343
6346
|
key: "parseAnnexB",
|
|
6344
6347
|
value: function parseAnnexB(data) {
|
|
6348
|
+
var j = data.byteLength - 1;
|
|
6349
|
+
var dropZerosLength = 0;
|
|
6350
|
+
do {
|
|
6351
|
+
if (data[j] === 0) {
|
|
6352
|
+
dropZerosLength++;
|
|
6353
|
+
} else {
|
|
6354
|
+
break;
|
|
6355
|
+
}
|
|
6356
|
+
j--;
|
|
6357
|
+
} while (j > 0);
|
|
6358
|
+
if (dropZerosLength >= 3) {
|
|
6359
|
+
data = data.subarray(0, j + 1);
|
|
6360
|
+
}
|
|
6345
6361
|
var len = data.length;
|
|
6346
6362
|
var start = 2;
|
|
6347
6363
|
var end = 0;
|
|
@@ -6362,6 +6378,9 @@
|
|
|
6362
6378
|
} else if (data[end - 2] !== 0) {
|
|
6363
6379
|
end++;
|
|
6364
6380
|
break;
|
|
6381
|
+
} else if (end < len - 1 && data[end + 1] !== 1) {
|
|
6382
|
+
end++;
|
|
6383
|
+
break;
|
|
6365
6384
|
}
|
|
6366
6385
|
if (start !== end - 2)
|
|
6367
6386
|
units.push(data.subarray(start, end - 2));
|
|
@@ -7179,9 +7198,26 @@
|
|
|
7179
7198
|
var samples = audioTrack.samples;
|
|
7180
7199
|
if (!samples.length)
|
|
7181
7200
|
return;
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7201
|
+
if (audioTrack.codecType === AudioCodecType.MP3) {
|
|
7202
|
+
if (this.lastAudioSample) {
|
|
7203
|
+
samples.unshift(this.lastAudioSample);
|
|
7204
|
+
}
|
|
7205
|
+
for (var index = 0; index < samples.length; index++) {
|
|
7206
|
+
var x = samples[index];
|
|
7207
|
+
if (samples[index + 1]) {
|
|
7208
|
+
x.duration = samples[index + 1].pts - x.pts;
|
|
7209
|
+
} else {
|
|
7210
|
+
break;
|
|
7211
|
+
}
|
|
7212
|
+
x.pts -= this._baseDts;
|
|
7213
|
+
x.dts = x.pts;
|
|
7214
|
+
}
|
|
7215
|
+
this.lastAudioSample = samples.pop();
|
|
7216
|
+
return;
|
|
7217
|
+
}
|
|
7218
|
+
samples.forEach(function(x2) {
|
|
7219
|
+
x2.pts -= _this3._needForceFixLargeGap ? _this3._baseAudioDts : _this3._baseDts;
|
|
7220
|
+
x2.dts = x2.pts;
|
|
7185
7221
|
});
|
|
7186
7222
|
this._doFixAudioInternal(audioTrack, samples, 9e4);
|
|
7187
7223
|
}
|
|
@@ -12147,7 +12183,7 @@
|
|
|
12147
12183
|
value: function() {
|
|
12148
12184
|
var _appendBuffer = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee2(segment, audioSegment, videoChunk, audioChunk, discontinuity, contiguous, startTime) {
|
|
12149
12185
|
var _this2 = this;
|
|
12150
|
-
var afterAppend, p, needInit, _this$_transmuxer$tra, _this$_transmuxer$tra2, video, audio, isFirstAppend, mse, _p, videoData, videoRest, audioData, audioRest;
|
|
12186
|
+
var afterAppend, p, needInit, _this$_transmuxer$tra, _this$_transmuxer$tra2, video, audio, isFirstAppend, mse, _p, videoData, videoRest, audioData, audioRest, ret;
|
|
12151
12187
|
return _regeneratorRuntime$1().wrap(function _callee2$(_context2) {
|
|
12152
12188
|
while (1)
|
|
12153
12189
|
switch (_context2.prev = _context2.next) {
|
|
@@ -12200,11 +12236,11 @@
|
|
|
12200
12236
|
this._softVideo.appendBuffer(video, audio);
|
|
12201
12237
|
this._needInitSegment = false;
|
|
12202
12238
|
afterAppend();
|
|
12203
|
-
_context2.next =
|
|
12239
|
+
_context2.next = 32;
|
|
12204
12240
|
break;
|
|
12205
12241
|
case 20:
|
|
12206
12242
|
if (!this._mse) {
|
|
12207
|
-
_context2.next =
|
|
12243
|
+
_context2.next = 32;
|
|
12208
12244
|
break;
|
|
12209
12245
|
}
|
|
12210
12246
|
isFirstAppend = !this._sourceCreated;
|
|
@@ -12227,8 +12263,10 @@
|
|
|
12227
12263
|
audioData = audio.data, audioRest = _objectWithoutProperties$1(audio, _excluded2);
|
|
12228
12264
|
_p.push(mse.append(MSE.AUDIO, audioData, audioRest));
|
|
12229
12265
|
}
|
|
12230
|
-
|
|
12231
|
-
|
|
12266
|
+
ret = Promise.all(_p);
|
|
12267
|
+
ret.then(afterAppend);
|
|
12268
|
+
return _context2.abrupt("return", ret);
|
|
12269
|
+
case 32:
|
|
12232
12270
|
case "end":
|
|
12233
12271
|
return _context2.stop();
|
|
12234
12272
|
}
|
|
@@ -15718,7 +15756,7 @@
|
|
|
15718
15756
|
}]);
|
|
15719
15757
|
return Hls2;
|
|
15720
15758
|
}(EventEmitter);
|
|
15721
|
-
_defineProperty$3(Hls, "version", "3.0.21-rc.
|
|
15759
|
+
_defineProperty$3(Hls, "version", "3.0.21-rc.20");
|
|
15722
15760
|
try {
|
|
15723
15761
|
if (localStorage.getItem("xgd")) {
|
|
15724
15762
|
Hls.enableLogger();
|
|
@@ -15879,7 +15917,7 @@
|
|
|
15879
15917
|
get: function get() {
|
|
15880
15918
|
var _this$player, _this$player$config;
|
|
15881
15919
|
var mediaType = (_this$player = this.player) === null || _this$player === void 0 ? void 0 : (_this$player$config = _this$player.config) === null || _this$player$config === void 0 ? void 0 : _this$player$config.mediaType;
|
|
15882
|
-
return !!mediaType && mediaType !== "video" && mediaType !== "audio";
|
|
15920
|
+
return !!mediaType && mediaType !== "video" && mediaType !== "audio" && mediaType !== "offscreen-video";
|
|
15883
15921
|
}
|
|
15884
15922
|
}, {
|
|
15885
15923
|
key: "beforePlayerInit",
|
|
@@ -15888,7 +15926,7 @@
|
|
|
15888
15926
|
var config = this.player.config;
|
|
15889
15927
|
var mediaElem = this.player.media || this.player.video;
|
|
15890
15928
|
var hlsOpts = config.hls || {};
|
|
15891
|
-
if (!config.url && !config.__allowHlsEmptyUrl__ || !hlsOpts.preferMMS && MSE.isMMSOnly()) {
|
|
15929
|
+
if (!config.url && !config.__allowHlsEmptyUrl__ || !this.softDecode && !hlsOpts.preferMMS && MSE.isMMSOnly()) {
|
|
15892
15930
|
return;
|
|
15893
15931
|
}
|
|
15894
15932
|
if (this.hls)
|