@byteplus/veplayer-plugin 2.4.0-rc.2 → 2.4.0-rc.3
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 +25 -5
- package/esm/index.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +25 -5
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.flv.development.js +25 -5
- package/umd/veplayer.plugin.flv.production.js +1 -1
|
@@ -5049,6 +5049,8 @@ var BandwidthService = /* @__PURE__ */ function() {
|
|
|
5049
5049
|
_defineProperty$1(this, "_chunkSpeed", 0);
|
|
5050
5050
|
_defineProperty$1(this, "_chunkCache", []);
|
|
5051
5051
|
_defineProperty$1(this, "_speeds", []);
|
|
5052
|
+
_defineProperty$1(this, "_totalSize", 0);
|
|
5053
|
+
_defineProperty$1(this, "_totalCost", 0);
|
|
5052
5054
|
this._opts = opts || {};
|
|
5053
5055
|
}
|
|
5054
5056
|
_createClass$2(BandwidthService2, [{
|
|
@@ -5065,6 +5067,8 @@ var BandwidthService = /* @__PURE__ */ function() {
|
|
|
5065
5067
|
var _this$_opts, _this$_opts2;
|
|
5066
5068
|
if (!totalByte || !ms || totalByte < (((_this$_opts = this._opts) === null || _this$_opts === void 0 ? void 0 : _this$_opts.skipChunkSize) || SKIP_SMALL_CHUNK))
|
|
5067
5069
|
return;
|
|
5070
|
+
this._totalSize += totalByte;
|
|
5071
|
+
this._totalCost += ms;
|
|
5068
5072
|
this._chunkSpeed = 8e3 * totalByte / ms;
|
|
5069
5073
|
this._chunkCache.push({
|
|
5070
5074
|
size: totalByte,
|
|
@@ -5114,11 +5118,23 @@ var BandwidthService = /* @__PURE__ */ function() {
|
|
|
5114
5118
|
}
|
|
5115
5119
|
return this._chunkSpeed;
|
|
5116
5120
|
}
|
|
5121
|
+
}, {
|
|
5122
|
+
key: "getTotalSize",
|
|
5123
|
+
value: function getTotalSize() {
|
|
5124
|
+
return this._totalSize;
|
|
5125
|
+
}
|
|
5126
|
+
}, {
|
|
5127
|
+
key: "getTotalCost",
|
|
5128
|
+
value: function getTotalCost() {
|
|
5129
|
+
return this._totalCost;
|
|
5130
|
+
}
|
|
5117
5131
|
}, {
|
|
5118
5132
|
key: "reset",
|
|
5119
5133
|
value: function reset() {
|
|
5120
5134
|
this._chunkCache = [];
|
|
5121
5135
|
this._speeds = [];
|
|
5136
|
+
this._totalSize = 0;
|
|
5137
|
+
this._totalCost = 0;
|
|
5122
5138
|
}
|
|
5123
5139
|
}]);
|
|
5124
5140
|
return BandwidthService2;
|
|
@@ -5247,13 +5263,15 @@ var MediaStatsService = /* @__PURE__ */ function() {
|
|
|
5247
5263
|
_createClass$2(MediaStatsService2, [{
|
|
5248
5264
|
key: "getStats",
|
|
5249
5265
|
value: function getStats() {
|
|
5250
|
-
var _this$_core, _this$_core2, _this$_core2$speedInf, _this$_core3, _this$_core3$speedInf, _this$_core4, _this$_core4$bufferIn;
|
|
5266
|
+
var _this$_core, _this$_core2, _this$_core2$speedInf, _this$_core3, _this$_core3$speedInf, _this$_core4, _this$_core4$speedInf, _this$_core5, _this$_core5$speedInf, _this$_core6, _this$_core6$bufferIn;
|
|
5251
5267
|
var _ref2 = ((_this$_core = this._core) === null || _this$_core === void 0 ? void 0 : _this$_core.media) || {}, _ref2$currentTime = _ref2.currentTime, currentTime = _ref2$currentTime === void 0 ? 0 : _ref2$currentTime, _ref2$decodeFps = _ref2.decodeFps, decodeFps = _ref2$decodeFps === void 0 ? 0 : _ref2$decodeFps;
|
|
5252
5268
|
return _objectSpread2(_objectSpread2({}, this._stats.getStats()), {}, {
|
|
5253
5269
|
downloadSpeed: ((_this$_core2 = this._core) === null || _this$_core2 === void 0 ? void 0 : (_this$_core2$speedInf = _this$_core2.speedInfo) === null || _this$_core2$speedInf === void 0 ? void 0 : _this$_core2$speedInf.call(_this$_core2).speed) || 0,
|
|
5254
5270
|
avgSpeed: ((_this$_core3 = this._core) === null || _this$_core3 === void 0 ? void 0 : (_this$_core3$speedInf = _this$_core3.speedInfo) === null || _this$_core3$speedInf === void 0 ? void 0 : _this$_core3$speedInf.call(_this$_core3).avgSpeed) || 0,
|
|
5271
|
+
totalReceivedByte: ((_this$_core4 = this._core) === null || _this$_core4 === void 0 ? void 0 : (_this$_core4$speedInf = _this$_core4.speedInfo) === null || _this$_core4$speedInf === void 0 ? void 0 : _this$_core4$speedInf.call(_this$_core4).totalSize) || 0,
|
|
5272
|
+
totalReceivedCost: ((_this$_core5 = this._core) === null || _this$_core5 === void 0 ? void 0 : (_this$_core5$speedInf = _this$_core5.speedInfo) === null || _this$_core5$speedInf === void 0 ? void 0 : _this$_core5$speedInf.call(_this$_core5).totalCost) || 0,
|
|
5255
5273
|
currentTime,
|
|
5256
|
-
bufferEnd: ((_this$
|
|
5274
|
+
bufferEnd: ((_this$_core6 = this._core) === null || _this$_core6 === void 0 ? void 0 : (_this$_core6$bufferIn = _this$_core6.bufferInfo()) === null || _this$_core6$bufferIn === void 0 ? void 0 : _this$_core6$bufferIn.remaining) || 0,
|
|
5257
5275
|
decodeFps
|
|
5258
5276
|
});
|
|
5259
5277
|
}
|
|
@@ -10447,7 +10465,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
10447
10465
|
_createClass$4(Flv2, [{
|
|
10448
10466
|
key: "version",
|
|
10449
10467
|
get: function get() {
|
|
10450
|
-
return "3.0.18-alpha.
|
|
10468
|
+
return "3.0.18-alpha.5";
|
|
10451
10469
|
}
|
|
10452
10470
|
}, {
|
|
10453
10471
|
key: "isLive",
|
|
@@ -10481,7 +10499,9 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
10481
10499
|
value: function speedInfo() {
|
|
10482
10500
|
return {
|
|
10483
10501
|
speed: this._bandwidthService.getLatestSpeed(),
|
|
10484
|
-
avgSpeed: this._bandwidthService.getAvgSpeed()
|
|
10502
|
+
avgSpeed: this._bandwidthService.getAvgSpeed(),
|
|
10503
|
+
totalSize: this._bandwidthService.getTotalSize(),
|
|
10504
|
+
totalCost: this._bandwidthService.getTotalCost()
|
|
10485
10505
|
};
|
|
10486
10506
|
}
|
|
10487
10507
|
}, {
|
|
@@ -10771,7 +10791,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
10771
10791
|
_context9.prev = 17;
|
|
10772
10792
|
_context9.t0 = _context9["catch"](12);
|
|
10773
10793
|
this._loading = false;
|
|
10774
|
-
return _context9.abrupt("return", this._emitError(StreamingError.network(_context9.t0)));
|
|
10794
|
+
return _context9.abrupt("return", this._emitError(StreamingError.network(_context9.t0), false));
|
|
10775
10795
|
case 21:
|
|
10776
10796
|
case "end":
|
|
10777
10797
|
return _context9.stop();
|