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

react-jplayer-utils

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jplayer-utils - npm Package Compare versions

Comparing version 1.1.1 to 2.0.0

4

lib/components/keyControl.js

@@ -80,4 +80,4 @@ 'use strict';

_createClass(KeyControl, [{
key: 'componentWillMount',
value: function componentWillMount() {
key: 'componentDidMount',
value: function componentDidMount() {
document.addEventListener('keydown', this.onKeyDown);

@@ -84,0 +84,0 @@ }

@@ -7,4 +7,2 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

@@ -16,6 +14,2 @@

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -29,30 +23,16 @@

var Connect = function Connect(jPlayer, _ref, ConnectedPlayer) {
var options = _ref.options,
jPlaylistOptions = _ref.jPlaylistOptions;
var Connect = function Connect(jPlayer, ConnectedPlayer) {
return function (_React$Component) {
_inherits(_class2, _React$Component);
_inherits(_class, _React$Component);
function _class2() {
var _ref2;
function _class() {
_classCallCheck(this, _class);
var _temp, _this, _ret;
_classCallCheck(this, _class2);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = _class2.__proto__ || Object.getPrototypeOf(_class2)).call.apply(_ref2, [this].concat(args))), _this), _this.getChildContext = function () {
return {
id: options.id
};
}, _temp), _possibleConstructorReturn(_this, _ret);
return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
}
_createClass(_class2, [{
_createClass(_class, [{
key: 'render',
value: function render() {
return _react2.default.createElement(ConnectedPlayer, _extends({ id: options.id }, this.props));
return _react2.default.createElement(ConnectedPlayer, this.props);
}

@@ -64,22 +44,5 @@ }], [{

}
}, {
key: 'options',
get: function get() {
return options;
}
}, {
key: 'jPlaylistOptions',
get: function get() {
return jPlaylistOptions;
}
}, {
key: 'childContextTypes',
get: function get() {
return {
id: _propTypes2.default.string
};
}
}]);
return _class2;
return _class;
}(_react2.default.Component);

@@ -86,0 +49,0 @@ };

@@ -10,8 +10,8 @@ 'use strict';

if (artist !== '') {
if (artist !== null) {
titleText += '' + artist;
}
if (title !== '') {
if (artist !== '') {
if (title !== null) {
if (artist !== null) {
titleText += ' - ';

@@ -18,0 +18,0 @@ }

@@ -6,3 +6,3 @@ 'use strict';

});
exports.convertTime = exports.canSetVolume = exports.limitValue = exports.getElementOffset = exports.traverseParentsUntilClassName = exports.toRelativePercentage = exports.toPercentage = exports.KeyControl = exports.classes = exports.formatArtistAndTitle = exports.updateObject = exports.initialState = exports.passWithIndex = exports.connectWithIndex = exports.connectWithId = exports.connect = undefined;
exports.convertTime = exports.canSetVolume = exports.limitValue = exports.getElementOffset = exports.traverseParentsUntilClassName = exports.toRelativePercentage = exports.toPercentage = exports.KeyControl = exports.classes = exports.formatArtistAndTitle = exports.initialState = exports.connectWithIndex = exports.connectWithId = exports.connect = undefined;

@@ -21,6 +21,2 @@ var _connect = require('./connect');

var _passWithIndex = require('./passWithIndex');
var _passWithIndex2 = _interopRequireDefault(_passWithIndex);
var _initialState = require('./initialState');

@@ -30,6 +26,2 @@

var _updateObject = require('./updateObject');
var _updateObject2 = _interopRequireDefault(_updateObject);
var _formatArtistAndTitle = require('./formatArtistAndTitle');

@@ -80,5 +72,3 @@

exports.connectWithIndex = _connectWithIndex2.default;
exports.passWithIndex = _passWithIndex2.default;
exports.initialState = _initialState2.default;
exports.updateObject = _updateObject2.default;
exports.formatArtistAndTitle = _formatArtistAndTitle2.default;

@@ -85,0 +75,0 @@ exports.classes = _classes2.default;

{
"name": "react-jplayer-utils",
"version": "1.1.1",
"version": "2.0.0",
"description": "Utils for react-jPlayer and add-ons",

@@ -8,8 +8,8 @@ "author": "Martin Dawson <u1356770@gmail.com>",

"type": "git",
"url": "https://github.com/MartinDawson/react-jPlayer-utils.git"
"url": "https://github.com/jPlayer/react-jPlayer-utils.git"
},
"bugs": {
"url": "https://github.com/MartinDawson/react-jPlayer-utils/issues"
"url": "https://github.com/jPlayer/react-jPlayer-utils/issues"
},
"homepage": "https://github.com/MartinDawson/react-jPlayer-utils",
"homepage": "https://github.com/jPlayer/react-jPlayer-utils",
"license": "MIT",

@@ -16,0 +16,0 @@ "main": "./lib/index.js",

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

class KeyControl extends React.Component {
componentWillMount() {
componentDidMount() {
document.addEventListener('keydown', this.onKeyDown);

@@ -32,0 +32,0 @@ }

import React from 'react';
import PropTypes from 'prop-types';
const Connect = (jPlayer, { options, jPlaylistOptions }, ConnectedPlayer) =>
const Connect = (jPlayer, ConnectedPlayer) =>
class extends React.Component {

@@ -9,18 +8,4 @@ static get jPlayer() {

}
static get options() {
return options;
}
static get jPlaylistOptions() {
return jPlaylistOptions;
}
static get childContextTypes() {
return {
id: PropTypes.string,
};
}
getChildContext = () => ({
id: options.id,
});
render() {
return <ConnectedPlayer id={options.id} {...this.props} />;
return <ConnectedPlayer {...this.props} />;
}

@@ -27,0 +12,0 @@ };

export default (artist, title) => {
let titleText = '';
if (artist !== '') {
if (artist !== null) {
titleText += `${artist}`;
}
if (title !== '') {
if (artist !== '') {
if (title !== null) {
if (artist !== null) {
titleText += ' - ';

@@ -11,0 +11,0 @@ }

import connect from './connect';
import connectWithId from './connectWithId';
import connectWithIndex from './connectWithIndex';
import passWithIndex from './passWithIndex';
import initialState from './initialState';
import updateObject from './updateObject';
import formatArtistAndTitle from './formatArtistAndTitle';

@@ -22,5 +20,3 @@ import classes from './classes';

connectWithIndex,
passWithIndex,
initialState,
updateObject,
formatArtistAndTitle,

@@ -27,0 +23,0 @@ classes,

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