Socket
Socket
Sign inDemoInstall

xgplayer-streaming-shared

Package Overview
Dependencies
2
Maintainers
8
Versions
178
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.18-alpha.3 to 3.0.18-alpha.5

22

es/services/bandwidth.d.ts

@@ -19,2 +19,4 @@ export class BandwidthService {

_speeds: any[];
_totalSize: number;
_totalCost: number;
_opts: {

@@ -27,5 +29,23 @@ chunkCountForSpeed?: number;

addChunkRecord(totalByte: any, ms: any): void;
/**
*
* @returns { number }
*/
getAvgSpeed(): number;
getLatestSpeed(): any;
/**
*
* @returns { number }
*/
getLatestSpeed(): number;
/**
*
* @returns { number }
*/
getTotalSize(): number;
/**
*
* @returns { number }
*/
getTotalCost(): number;
reset(): void;
}

@@ -12,2 +12,4 @@ import { createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty } from "../_virtual/_rollupPluginBabelHelpers.js";

_defineProperty(this, "_speeds", []);
_defineProperty(this, "_totalSize", 0);
_defineProperty(this, "_totalCost", 0);
this._opts = opts || {};

@@ -29,2 +31,4 @@ }

return;
this._totalSize += totalByte;
this._totalCost += ms;
this._chunkSpeed = 8e3 * totalByte / ms;

@@ -80,2 +84,12 @@ this._chunkCache.push({

}, {
key: "getTotalSize",
value: function getTotalSize() {
return this._totalSize;
}
}, {
key: "getTotalCost",
value: function getTotalCost() {
return this._totalCost;
}
}, {
key: "reset",

@@ -85,2 +99,4 @@ value: function reset() {

this._speeds = [];
this._totalSize = 0;
this._totalCost = 0;
}

@@ -87,0 +103,0 @@ }]);

6

es/services/stats.js

@@ -131,3 +131,3 @@ import { createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty, objectSpread2 as _objectSpread2 } from "../_virtual/_rollupPluginBabelHelpers.js";

value: function getStats() {
var _this$_core, _this$_core2, _this$_core2$speedInf, _this$_core3, _this$_core3$speedInf, _this$_core4, _this$_core4$bufferIn;
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;
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;

@@ -137,4 +137,6 @@ return _objectSpread2(_objectSpread2({}, this._stats.getStats()), {}, {

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,
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,
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,
currentTime,
bufferEnd: ((_this$_core4 = this._core) === null || _this$_core4 === void 0 ? void 0 : (_this$_core4$bufferIn = _this$_core4.bufferInfo()) === null || _this$_core4$bufferIn === void 0 ? void 0 : _this$_core4$bufferIn.remaining) || 0,
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,
decodeFps

@@ -141,0 +143,0 @@ });

{
"name": "xgplayer-streaming-shared",
"version": "3.0.18-alpha.3",
"version": "3.0.18-alpha.5",
"main": "dist/index.min.js",

@@ -5,0 +5,0 @@ "module": "es/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc