@volcengine/veplayer-plugin 2.2.0-rc.0 → 2.3.0-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/LICENSE +20 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.development.js +75169 -69866
- package/esm/index.production.js +4 -5
- package/esm/veplayer.plugin.drm.development.js +1577 -0
- package/esm/veplayer.plugin.drm.production.js +2 -0
- package/esm/veplayer.plugin.flv.development.js +45 -23
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +80 -58
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +10674 -5866
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +19 -17
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.time.shift.development.js +3 -3
- package/esm/veplayer.plugin.time.shift.production.js +1 -1
- package/esm/veplayer.plugin.xgvideo.development.js +228 -226
- package/esm/veplayer.plugin.xgvideo.production.js +1 -1
- package/package.json +8 -3
- package/umd/index.d.ts +2 -0
- package/umd/index.development.js +74071 -68723
- package/umd/index.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +1579 -0
- package/umd/veplayer.plugin.drm.production.js +1 -0
- package/umd/veplayer.plugin.flv.development.js +28 -5
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +42 -21
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +10218 -5410
- 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.time.shift.development.js +3 -3
- package/umd/veplayer.plugin.time.shift.production.js +1 -1
- package/umd/veplayer.plugin.xgvideo.development.js +2 -1
- package/umd/veplayer.plugin.xgvideo.production.js +1 -1
|
@@ -1609,7 +1609,7 @@
|
|
|
1609
1609
|
}
|
|
1610
1610
|
return offsetTime;
|
|
1611
1611
|
};
|
|
1612
|
-
var version = "3.0.
|
|
1612
|
+
var version = "3.0.12";
|
|
1613
1613
|
var ERROR_MAP = {
|
|
1614
1614
|
1: 5101,
|
|
1615
1615
|
2: 5102,
|
|
@@ -4670,7 +4670,7 @@
|
|
|
4670
4670
|
this.alive = !!config.onProgress;
|
|
4671
4671
|
!config.logger && (config.logger = new Logger$2("Loader"));
|
|
4672
4672
|
this._loaderType = type;
|
|
4673
|
-
this._loader = type === LoaderType.FETCH &&
|
|
4673
|
+
this._loader = type === LoaderType.FETCH && typeof fetch !== "undefined" ? new FetchLoader() : new XhrLoader();
|
|
4674
4674
|
this._config = config;
|
|
4675
4675
|
this._retryCount = 0;
|
|
4676
4676
|
this._retryTimer = null;
|
|
@@ -6068,7 +6068,7 @@
|
|
|
6068
6068
|
}
|
|
6069
6069
|
}
|
|
6070
6070
|
return {
|
|
6071
|
-
payload: unit.subarray(i),
|
|
6071
|
+
payload: unit.subarray(i, i + size),
|
|
6072
6072
|
type,
|
|
6073
6073
|
size,
|
|
6074
6074
|
uuid
|
|
@@ -6119,6 +6119,11 @@
|
|
|
6119
6119
|
this._loadWord();
|
|
6120
6120
|
}
|
|
6121
6121
|
_createClass(ExpGolomb2, [{
|
|
6122
|
+
key: "bitsAvailable",
|
|
6123
|
+
get: function get() {
|
|
6124
|
+
return this._bitsAvailable;
|
|
6125
|
+
}
|
|
6126
|
+
}, {
|
|
6122
6127
|
key: "_loadWord",
|
|
6123
6128
|
value: function _loadWord() {
|
|
6124
6129
|
var position = this._data.byteLength - this._bytesAvailable;
|
|
@@ -6584,6 +6589,9 @@
|
|
|
6584
6589
|
}
|
|
6585
6590
|
var subLayerProfilePresentFlag = [];
|
|
6586
6591
|
var subLayerLevelPresentFlag = [];
|
|
6592
|
+
if (maxSubLayersMinus1 > eg.bitsAvailable) {
|
|
6593
|
+
throw new Error("maxSubLayersMinus inavlid size ".concat(maxSubLayersMinus1));
|
|
6594
|
+
}
|
|
6587
6595
|
for (var j = 0; j < maxSubLayersMinus1; j++) {
|
|
6588
6596
|
subLayerProfilePresentFlag[j] = eg.readBits(1);
|
|
6589
6597
|
subLayerLevelPresentFlag[j] = eg.readBits(1);
|
|
@@ -6726,6 +6734,16 @@
|
|
|
6726
6734
|
x.dts += vDelta;
|
|
6727
6735
|
x.pts += vDelta;
|
|
6728
6736
|
});
|
|
6737
|
+
} else {
|
|
6738
|
+
for (var i = 1; i < len - 1; i++) {
|
|
6739
|
+
var _samples$i;
|
|
6740
|
+
var dts = (_samples$i = samples[i]) === null || _samples$i === void 0 ? void 0 : _samples$i.dts;
|
|
6741
|
+
var prevDts = samples[i - 1].dts;
|
|
6742
|
+
if (dts && dts - prevDts < 0) {
|
|
6743
|
+
samples[i].dts += vDelta;
|
|
6744
|
+
samples[i].pts += vDelta;
|
|
6745
|
+
}
|
|
6746
|
+
}
|
|
6729
6747
|
}
|
|
6730
6748
|
}
|
|
6731
6749
|
var refSampleDurationInt;
|
|
@@ -6736,13 +6754,13 @@
|
|
|
6736
6754
|
var second = videoTrack.samples[1];
|
|
6737
6755
|
refSampleDurationInt = len === 1 ? 9e3 : Math.floor(second.dts - first.dts);
|
|
6738
6756
|
}
|
|
6739
|
-
for (var
|
|
6740
|
-
var
|
|
6741
|
-
var _nextSample = samples[
|
|
6742
|
-
if (
|
|
6743
|
-
sampleDuration = _nextSample.dts -
|
|
6744
|
-
} else if (samples[
|
|
6745
|
-
sampleDuration = Math.min(
|
|
6757
|
+
for (var _i = 0; _i < len; _i++) {
|
|
6758
|
+
var _dts = samples[_i].dts;
|
|
6759
|
+
var _nextSample = samples[_i + 1];
|
|
6760
|
+
if (_i < len - 1) {
|
|
6761
|
+
sampleDuration = _nextSample.dts - _dts;
|
|
6762
|
+
} else if (samples[_i - 1]) {
|
|
6763
|
+
sampleDuration = Math.min(_dts - samples[_i - 1].dts, refSampleDurationInt);
|
|
6746
6764
|
} else {
|
|
6747
6765
|
sampleDuration = refSampleDurationInt;
|
|
6748
6766
|
}
|
|
@@ -6755,15 +6773,15 @@
|
|
|
6755
6773
|
}
|
|
6756
6774
|
videoTrack.warnings.push({
|
|
6757
6775
|
type: WarningType.LARGE_VIDEO_GAP,
|
|
6758
|
-
time:
|
|
6759
|
-
dts,
|
|
6760
|
-
originDts: samples[
|
|
6776
|
+
time: _dts / videoTrack.timescale,
|
|
6777
|
+
dts: _dts,
|
|
6778
|
+
originDts: samples[_i].originDts,
|
|
6761
6779
|
nextDts: this._videoNextDts,
|
|
6762
6780
|
sampleDuration,
|
|
6763
6781
|
refSampleDuration: refSampleDurationInt
|
|
6764
6782
|
});
|
|
6765
6783
|
}
|
|
6766
|
-
samples[
|
|
6784
|
+
samples[_i].duration = sampleDuration;
|
|
6767
6785
|
this._videoNextDts += sampleDuration;
|
|
6768
6786
|
}
|
|
6769
6787
|
}
|
|
@@ -11278,8 +11296,9 @@
|
|
|
11278
11296
|
}, {
|
|
11279
11297
|
key: "isFull",
|
|
11280
11298
|
value: function isFull() {
|
|
11299
|
+
var _this$_mse3;
|
|
11281
11300
|
var mediaType = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : MSE.VIDEO;
|
|
11282
|
-
return this._mse.isFull(mediaType);
|
|
11301
|
+
return (_this$_mse3 = this._mse) === null || _this$_mse3 === void 0 ? void 0 : _this$_mse3.isFull(mediaType);
|
|
11283
11302
|
}
|
|
11284
11303
|
}]);
|
|
11285
11304
|
return BufferService2;
|
|
@@ -11292,6 +11311,7 @@
|
|
|
11292
11311
|
retryDelay: 1e3,
|
|
11293
11312
|
pollRetryCount: 2,
|
|
11294
11313
|
loadTimeout: 1e4,
|
|
11314
|
+
manifestLoadTimeout: 1e4,
|
|
11295
11315
|
preloadTime: 30,
|
|
11296
11316
|
softDecode: false,
|
|
11297
11317
|
bufferBehind: 10,
|
|
@@ -11878,26 +11898,26 @@
|
|
|
11878
11898
|
this.hls = hls;
|
|
11879
11899
|
this._timer = null;
|
|
11880
11900
|
this._useLowLatency = hls.config.useLowLatency;
|
|
11881
|
-
var _this$hls$config = this.hls.config, retryCount = _this$hls$config.retryCount, retryDelay = _this$hls$config.retryDelay,
|
|
11901
|
+
var _this$hls$config = this.hls.config, retryCount = _this$hls$config.retryCount, retryDelay = _this$hls$config.retryDelay, manifestLoadTimeout = _this$hls$config.manifestLoadTimeout, fetchOptions = _this$hls$config.fetchOptions;
|
|
11882
11902
|
this._loader = new NetLoader(_objectSpread2$2(_objectSpread2$2({}, fetchOptions), {}, {
|
|
11883
11903
|
responseType: "text",
|
|
11884
11904
|
retry: retryCount,
|
|
11885
11905
|
retryDelay,
|
|
11886
|
-
timeout:
|
|
11906
|
+
timeout: manifestLoadTimeout,
|
|
11887
11907
|
onRetryError: this._onLoaderRetry
|
|
11888
11908
|
}));
|
|
11889
11909
|
this._audioLoader = new NetLoader(_objectSpread2$2(_objectSpread2$2({}, fetchOptions), {}, {
|
|
11890
11910
|
responseType: "text",
|
|
11891
11911
|
retry: retryCount,
|
|
11892
11912
|
retryDelay,
|
|
11893
|
-
timeout:
|
|
11913
|
+
timeout: manifestLoadTimeout,
|
|
11894
11914
|
onRetryError: this._onLoaderRetry
|
|
11895
11915
|
}));
|
|
11896
11916
|
this._subtitleLoader = new NetLoader(_objectSpread2$2(_objectSpread2$2({}, fetchOptions), {}, {
|
|
11897
11917
|
responseType: "text",
|
|
11898
11918
|
retry: retryCount,
|
|
11899
11919
|
retryDelay,
|
|
11900
|
-
timeout:
|
|
11920
|
+
timeout: manifestLoadTimeout,
|
|
11901
11921
|
onRetryError: this._onLoaderRetry
|
|
11902
11922
|
}));
|
|
11903
11923
|
}
|
|
@@ -14115,7 +14135,7 @@
|
|
|
14115
14135
|
}]);
|
|
14116
14136
|
return Hls2;
|
|
14117
14137
|
}(EventEmitter);
|
|
14118
|
-
_defineProperty$3(Hls, "version", "3.0.
|
|
14138
|
+
_defineProperty$3(Hls, "version", "3.0.12");
|
|
14119
14139
|
try {
|
|
14120
14140
|
if (localStorage.getItem("xgd")) {
|
|
14121
14141
|
Hls.enableLogger();
|
|
@@ -14437,6 +14457,7 @@
|
|
|
14437
14457
|
}(BasePlugin);
|
|
14438
14458
|
_defineProperty$3(HlsPlugin, "Hls", Hls);
|
|
14439
14459
|
_defineProperty$3(HlsPlugin, "EVENT", Event$1);
|
|
14440
|
-
|
|
14460
|
+
const DynamicModule = window["VePlayer"].DynamicModule;
|
|
14461
|
+
VePlayer.registerPlugin(DynamicModule.PluginHls, { HlsPlugin });
|
|
14441
14462
|
exports2.HlsPlugin = HlsPlugin;
|
|
14442
14463
|
});
|