Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xgplayer-streaming-shared

Package Overview
Dependencies
Maintainers
6
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xgplayer-streaming-shared - npm Package Compare versions

Comparing version 3.0.0-next.29 to 3.0.0-next.30

21

es/mse.js

@@ -67,3 +67,2 @@ import { defineProperty as _defineProperty, inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, wrapNativeSuper as _wrapNativeSuper, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from "./_virtual/_rollupPluginBabelHelpers.js";

if (op) {
op.appending = false;
var costtime = nowTime() - _this2._opst;

@@ -85,3 +84,2 @@ _this2._logger.debug("UpdateEnd", op.opName, costtime, op.context);

if (op) {
op.appending = false;
_this2._logger.error("UpdateError", type, op.opName, op.context);

@@ -445,3 +443,3 @@ op.promise.reject(new StreamingError(ERR.MEDIA, ERR.SUB_TYPES.MSE_APPEND_BUFFER, event));

value: function _enqueueOp(type, exec, opName, context, isInsertHead) {
var _this$mediaSource3, _this13 = this;
var _this13 = this;
if (!this.mediaSource)

@@ -454,3 +452,2 @@ return Promise.resolve();

opName,
appending: false,
context

@@ -465,4 +462,4 @@ };

}
if (((_this$mediaSource3 = this.mediaSource) === null || _this$mediaSource3 === void 0 ? void 0 : _this$mediaSource3.readyState) !== "close") {
if (queue.length > 0) {
if (this.isOpened) {
if (queue.length === 1) {
this._startQueue(type);

@@ -472,3 +469,3 @@ }

this._openPromise.then(function() {
if (queue.length > 0) {
if (queue.length === 1) {
_this13._startQueue(type);

@@ -515,3 +512,3 @@ }

});
if (queue.length > 0) {
if (queue.length === 1) {
_this14._startQueue(t);

@@ -551,12 +548,6 @@ }

var op = queue[0];
if (op !== null && op !== void 0 && op.appending) {
return;
}
var sb = this._sourceBuffer[type];
if (op && !this._mseFullFlag[type] && sb && !sb.updating) {
if (op && !this._mseFullFlag[type]) {
try {
op.appending = true;
op.exec();
} catch (error) {
op.appending = false;
if (error && error.message && error.message.indexOf("SourceBuffer is full") >= 0) {

@@ -563,0 +554,0 @@ this._mseFullFlag[type] = true;

@@ -0,1 +1,38 @@

export type StatsInfo = {
downloadSpeed: number;
avgSpeed: number;
currentTime: number;
bufferEnd: number;
decodeFps: number;
encodeType: string;
audioCodec: string;
videoCodec: string;
domain: string;
fps: number;
bitrate: number;
width: number;
height: number;
samplerate: number;
channelCount: number;
gop: number;
};
/**
* @typedef {Object} StatsInfo
* @property {number} downloadSpeed
* @property {number} avgSpeed
* @property {number} currentTime
* @property {number} bufferEnd
* @property {number} decodeFps
* @property {string} encodeType
* @property {string} audioCodec
* @property {string} videoCodec
* @property {string} domain
* @property {number} fps
* @property {number} bitrate
* @property {number} width
* @property {number} height
* @property {number} samplerate
* @property {number} channelCount
* @property {number} gop
*/
export class MediaStatsService {

@@ -7,24 +44,4 @@ constructor(core: any, timescale?: number);

_stats: Stats;
getStats(): {
/** @type {number} */
downloadSpeed: number;
avgSpeed: any;
/** @type {number} */
currentTime: number;
/** @type {number} */
bufferEnd: number;
/** @type {number} */
decodeFps: number;
encodeType: string;
audioCodec: string;
videoCodec: string;
domain: string;
fps: number;
bitrate: number;
width: number;
height: number;
samplerate: number;
channelCount: number;
gop: number;
};
/** @returns {StatsInfo} */
getStats(): StatsInfo;
_bindEvents(): void;

@@ -31,0 +48,0 @@ reset(): void;

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

return _objectSpread2(_objectSpread2({}, this._stats.getStats()), {}, {
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,
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,
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,
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,
currentTime,

@@ -168,0 +168,0 @@ 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,

{
"name": "xgplayer-streaming-shared",
"version": "3.0.0-next.29",
"version": "3.0.0-next.30",
"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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc