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

byteark-player-react

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byteark-player-react - npm Package Compare versions

Comparing version 1.0.0-beta4 to 1.0.0-beta5

71

dist/index.js

@@ -262,3 +262,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var defautlSetupPlayerFunction = function defautlSetupPlayerFunction(options, loaderFunction, loadPluginOptions) {
var defaultSetupPlayerFunction = function defaultSetupPlayerFunction(options, loaderFunction, loadPluginOptions) {
try {

@@ -339,14 +339,2 @@ return Promise.resolve(bytearkPlayer.setup(options, loaderFunction, loadPluginOptions)).then(function () {});

_this.componentDidMount = function () {
try {
return Promise.resolve(_this.loadPlayerResources()).then(function () {
return Promise.resolve(_this.setupPlayer()).then(function () {
return Promise.resolve(_this.createPlayerInstance()).then(function () {});
});
});
} catch (e) {
return Promise.reject(e);
}
};
_this.createPlayerInstance = function () {

@@ -376,2 +364,3 @@ try {

_this.state = {
mounted: false,
loaded: false,

@@ -402,8 +391,34 @@ ready: false,

_proto.componentDidMount = function componentDidMount() {
this.initializePlayer();
};
_proto.initializePlayer = function initializePlayer() {
try {
var _this3 = this;
return Promise.resolve(_this3.loadPlayerResources()).then(function () {
var isClient = typeof window !== 'undefined';
var _temp = function () {
if (isClient) {
return Promise.resolve(_this3.setupPlayer()).then(function () {
return Promise.resolve(_this3.createPlayerInstance()).then(function () {});
});
}
}();
if (_temp && _temp.then) return _temp.then(function () {});
});
} catch (e) {
return Promise.reject(e);
}
};
_proto.loadPlayerResources = function loadPlayerResources() {
try {
var _temp3 = function _temp3(_result) {
var _temp4 = function _temp4(_result) {
if (_exit2) return _result;
_this3.onPlayerLoaded();
_this5.onPlayerLoaded();
};

@@ -413,13 +428,13 @@

var _this3 = this;
var _this5 = this;
var _temp4 = _catch(function () {
var _temp5 = _catch(function () {
var promises = [];
if (_this3.props.playerJsFileName) {
promises.push(loadScriptOrStyle("byteark-player-script-" + _this3.props.playerVersion, _this3.props.playerEndpoint + "/" + _this3.props.playerVersion + "/" + _this3.props.playerJsFileName, 'script'));
if (_this5.props.playerJsFileName) {
promises.push(loadScriptOrStyle("byteark-player-script-" + _this5.props.playerVersion, _this5.props.playerEndpoint + "/" + _this5.props.playerVersion + "/" + _this5.props.playerJsFileName, 'script'));
}
if (_this3.props.playerCssFileName) {
promises.push(loadScriptOrStyle("byteark-player-style-" + _this3.props.playerVersion, _this3.props.playerEndpoint + "/" + _this3.props.playerVersion + "/" + _this3.props.playerCssFileName, 'style'));
if (_this5.props.playerCssFileName) {
promises.push(loadScriptOrStyle("byteark-player-style-" + _this5.props.playerVersion, _this5.props.playerEndpoint + "/" + _this5.props.playerVersion + "/" + _this5.props.playerCssFileName, 'style'));
}

@@ -429,3 +444,3 @@

}, function (originalError) {
_this3.onPlayerLoadError({
_this5.onPlayerLoadError({
code: 'ERROR_BYTEARK_PLAYER_REACT_100001',

@@ -439,3 +454,3 @@ message: 'Sorry, something wrong when loading the video player.',

return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(_temp4) : _temp4(_temp5));
} catch (e) {

@@ -448,10 +463,10 @@ return Promise.reject(e);

try {
var _this5 = this;
var _this7 = this;
return Promise.resolve(_catch(function () {
return Promise.resolve(_this5.props.setupPlayerFunction(_this5.props, loadScriptOrStyle)).then(function () {
_this5.onPlayerSetup();
return Promise.resolve(_this7.props.setupPlayerFunction(_this7.props, loadScriptOrStyle)).then(function () {
_this7.onPlayerSetup();
});
}, function (originalError) {
_this5.onPlayerSetupError({
_this7.onPlayerSetupError({
code: 'ERROR_BYTEARK_PLAYER_REACT_100001',

@@ -524,3 +539,3 @@ message: 'Sorry, something wrong when loading the video player.',

createPlayerFunction: defaultCreatePlayerFunction,
setupPlayerFunction: defautlSetupPlayerFunction,
setupPlayerFunction: defaultSetupPlayerFunction,
playerEndpoint: 'https://byteark-sdk.cdn.byteark.com/player-core/',

@@ -527,0 +542,0 @@ playerVersion: 'v2',

@@ -260,3 +260,3 @@ import React from 'react';

var defautlSetupPlayerFunction = function defautlSetupPlayerFunction(options, loaderFunction, loadPluginOptions) {
var defaultSetupPlayerFunction = function defaultSetupPlayerFunction(options, loaderFunction, loadPluginOptions) {
try {

@@ -337,14 +337,2 @@ return Promise.resolve(bytearkPlayer.setup(options, loaderFunction, loadPluginOptions)).then(function () {});

_this.componentDidMount = function () {
try {
return Promise.resolve(_this.loadPlayerResources()).then(function () {
return Promise.resolve(_this.setupPlayer()).then(function () {
return Promise.resolve(_this.createPlayerInstance()).then(function () {});
});
});
} catch (e) {
return Promise.reject(e);
}
};
_this.createPlayerInstance = function () {

@@ -374,2 +362,3 @@ try {

_this.state = {
mounted: false,
loaded: false,

@@ -400,8 +389,34 @@ ready: false,

_proto.componentDidMount = function componentDidMount() {
this.initializePlayer();
};
_proto.initializePlayer = function initializePlayer() {
try {
var _this3 = this;
return Promise.resolve(_this3.loadPlayerResources()).then(function () {
var isClient = typeof window !== 'undefined';
var _temp = function () {
if (isClient) {
return Promise.resolve(_this3.setupPlayer()).then(function () {
return Promise.resolve(_this3.createPlayerInstance()).then(function () {});
});
}
}();
if (_temp && _temp.then) return _temp.then(function () {});
});
} catch (e) {
return Promise.reject(e);
}
};
_proto.loadPlayerResources = function loadPlayerResources() {
try {
var _temp3 = function _temp3(_result) {
var _temp4 = function _temp4(_result) {
if (_exit2) return _result;
_this3.onPlayerLoaded();
_this5.onPlayerLoaded();
};

@@ -411,13 +426,13 @@

var _this3 = this;
var _this5 = this;
var _temp4 = _catch(function () {
var _temp5 = _catch(function () {
var promises = [];
if (_this3.props.playerJsFileName) {
promises.push(loadScriptOrStyle("byteark-player-script-" + _this3.props.playerVersion, _this3.props.playerEndpoint + "/" + _this3.props.playerVersion + "/" + _this3.props.playerJsFileName, 'script'));
if (_this5.props.playerJsFileName) {
promises.push(loadScriptOrStyle("byteark-player-script-" + _this5.props.playerVersion, _this5.props.playerEndpoint + "/" + _this5.props.playerVersion + "/" + _this5.props.playerJsFileName, 'script'));
}
if (_this3.props.playerCssFileName) {
promises.push(loadScriptOrStyle("byteark-player-style-" + _this3.props.playerVersion, _this3.props.playerEndpoint + "/" + _this3.props.playerVersion + "/" + _this3.props.playerCssFileName, 'style'));
if (_this5.props.playerCssFileName) {
promises.push(loadScriptOrStyle("byteark-player-style-" + _this5.props.playerVersion, _this5.props.playerEndpoint + "/" + _this5.props.playerVersion + "/" + _this5.props.playerCssFileName, 'style'));
}

@@ -427,3 +442,3 @@

}, function (originalError) {
_this3.onPlayerLoadError({
_this5.onPlayerLoadError({
code: 'ERROR_BYTEARK_PLAYER_REACT_100001',

@@ -437,3 +452,3 @@ message: 'Sorry, something wrong when loading the video player.',

return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(_temp4) : _temp4(_temp5));
} catch (e) {

@@ -446,10 +461,10 @@ return Promise.reject(e);

try {
var _this5 = this;
var _this7 = this;
return Promise.resolve(_catch(function () {
return Promise.resolve(_this5.props.setupPlayerFunction(_this5.props, loadScriptOrStyle)).then(function () {
_this5.onPlayerSetup();
return Promise.resolve(_this7.props.setupPlayerFunction(_this7.props, loadScriptOrStyle)).then(function () {
_this7.onPlayerSetup();
});
}, function (originalError) {
_this5.onPlayerSetupError({
_this7.onPlayerSetupError({
code: 'ERROR_BYTEARK_PLAYER_REACT_100001',

@@ -522,3 +537,3 @@ message: 'Sorry, something wrong when loading the video player.',

createPlayerFunction: defaultCreatePlayerFunction,
setupPlayerFunction: defautlSetupPlayerFunction,
setupPlayerFunction: defaultSetupPlayerFunction,
playerEndpoint: 'https://byteark-sdk.cdn.byteark.com/player-core/',

@@ -525,0 +540,0 @@ playerVersion: 'v2',

{
"name": "byteark-player-react",
"version": "1.0.0-beta4",
"version": "1.0.0-beta5",
"description": "ByteArk Player Container for React",

@@ -5,0 +5,0 @@ "author": "byteark",

Sorry, the diff of this file is not supported yet

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