Socket
Socket
Sign inDemoInstall

xgplayer-streaming-shared

Package Overview
Dependencies
Maintainers
8
Versions
203
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.14-alpha.1 to 3.0.14-alpha.2

7

es/mse.d.ts

@@ -19,2 +19,3 @@ export type MSEErrorType = string;

openLog: boolean;
perferMMS: boolean;
};

@@ -130,7 +131,1 @@ /**

}
declare const MediaSource: {
new (): MediaSource;
prototype: MediaSource;
isTypeSupported(type: string): boolean;
};
export {};

27

es/mse.js

@@ -8,8 +8,12 @@ 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";

function getMediaSource() {
var preferMMS = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
try {
return isBrowser ? window.MediaSource : null;
if (!isBrowser)
return null;
if (preferMMS && typeof ManagedMediaSource !== "undefined")
return ManagedMediaSource;
return window.MediaSource;
} catch (e) {
}
}
var MediaSource = getMediaSource();
var MSEErrorType = {

@@ -169,3 +173,3 @@ UPDATE_ERROR: "updateError"

var _this5 = this;
var ms, onOpen;
var MediaSource, ms, onOpen;
return _regeneratorRuntime().wrap(function _callee$(_context) {

@@ -182,8 +186,9 @@ while (1)

case 3:
MediaSource = getMediaSource(this._config.perferMMS);
if (!(!media || !MediaSource)) {
_context.next = 5;
_context.next = 6;
break;
}
throw new Error("Param media or MediaSource does not exist");
case 5:
case 6:
this.media = media;

@@ -204,4 +209,9 @@ ms = this.mediaSource = new MediaSource();

media.src = this._url;
if (MediaSource.name === "ManagedMediaSource") {
media.disableRemotePlayback = true;
} else {
media.disableRemotePlayback = false;
}
return _context.abrupt("return", this._openPromise);
case 13:
case 15:
case "end":

@@ -256,2 +266,3 @@ return _context.stop();

if (this.media) {
this.media.disableRemotePlayback = false;
this.media.removeAttribute("src");

@@ -594,3 +605,4 @@ try {

return {
openLog: false
openLog: false,
perferMMS: false
};

@@ -602,2 +614,3 @@ }

var mime = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
var MediaSource = getMediaSource();
if (!MediaSource)

@@ -604,0 +617,0 @@ return false;

{
"name": "xgplayer-streaming-shared",
"version": "3.0.14-alpha.1",
"version": "3.0.14-alpha.2",
"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