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

react-player

Package Overview
Dependencies
Maintainers
1
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-player - npm Package Compare versions

Comparing version 1.11.1 to 1.11.2

12

CHANGELOG.md

@@ -7,2 +7,12 @@ ### Changelog

#### [v1.11.2](https://github.com/CookPete/react-player/compare/v1.11.1...v1.11.2)
> 10 August 2019
- Fix preload display logic [`#675`](https://github.com/CookPete/react-player/issues/675)
- Add showPreview instance method [`#679`](https://github.com/CookPete/react-player/issues/679)
- Hide preview thumbnail when light changes to false [`#680`](https://github.com/CookPete/react-player/issues/680)
- Add playbackRate support to Vimeo [`#681`](https://github.com/CookPete/react-player/issues/681)
- Fix Vimeo fast switch bug [`#683`](https://github.com/CookPete/react-player/issues/683)
#### [v1.11.1](https://github.com/CookPete/react-player/compare/v1.11.0...v1.11.1)

@@ -418,4 +428,4 @@

- Use callPlayer util for player methods [`c760655`](https://github.com/CookPete/react-player/commit/c760655b26fbf3c01a129665861dc25661d91f7d)
- Refactor progress logic [`f1b12e2`](https://github.com/CookPete/react-player/commit/f1b12e22262236b6c514c13de3534b8e4ede3f67)
- Clean up tests [`717397e`](https://github.com/CookPete/react-player/commit/717397e2010a7c2a9d2bbb543e3390ee9be94e9c)
- Refactor progress logic [`f1b12e2`](https://github.com/CookPete/react-player/commit/f1b12e22262236b6c514c13de3534b8e4ede3f67)

@@ -422,0 +432,0 @@ #### [v0.24.2](https://github.com/CookPete/react-player/compare/v0.24.1...v0.24.2)

5

lib/Player.js

@@ -81,6 +81,7 @@ 'use strict';

pip = _props.pip,
loop = _props.loop;
loop = _props.loop,
activePlayer = _props.activePlayer;
if (!(0, _utils.isEqual)(url, nextProps.url)) {
if (this.isLoading) {
if (this.isLoading && !activePlayer.forceLoad) {
console.warn('ReactPlayer: the attempt to load ' + nextProps.url + ' is being deferred until the player has loaded');

@@ -87,0 +88,0 @@ this.loadOnReady = nextProps.url;

@@ -161,6 +161,9 @@ 'use strict';

value: function render() {
var display = this.props.display;
var style = {
width: '100%',
height: '100%',
backgroundColor: 'black'
backgroundColor: 'black',
display: display
};

@@ -167,0 +170,0 @@ return _react2['default'].createElement(

@@ -141,5 +141,8 @@ 'use strict';

value: function render() {
var display = this.props.display;
var style = {
width: '100%',
height: '100%'
height: '100%',
display: display
};

@@ -146,0 +149,0 @@ return _react2['default'].createElement('iframe', {

@@ -58,4 +58,5 @@ 'use strict';

}, _temp), _possibleConstructorReturn(_this, _ret);
}
} // Prevent checking isLoading when URL changes
_createClass(Vimeo, [{

@@ -150,2 +151,7 @@ key: 'load',

}, {
key: 'setPlaybackRate',
value: function setPlaybackRate(rate) {
this.callPlayer('setPlaybackRate', rate);
}
}, {
key: 'getDuration',

@@ -168,2 +174,4 @@ value: function getDuration() {

value: function render() {
var display = this.props.display;
var style = {

@@ -173,3 +181,4 @@ width: '100%',

overflow: 'hidden',
backgroundColor: 'black'
backgroundColor: 'black',
display: display
};

@@ -188,2 +197,3 @@ return _react2['default'].createElement('div', {

Vimeo.displayName = 'Vimeo';
Vimeo.forceLoad = true;

@@ -190,0 +200,0 @@ Vimeo.canPlay = function (url) {

@@ -225,5 +225,8 @@ 'use strict';

value: function render() {
var display = this.props.display;
var style = {
width: '100%',
height: '100%'
height: '100%',
display: display
};

@@ -230,0 +233,0 @@ return _react2['default'].createElement(

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

muted: true,
style: { display: 'none' }
display: 'none'
}));

@@ -66,0 +66,0 @@ }

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

_this.setState({ showPreview: false });
}, _this.showPreview = function () {
_this.setState({ showPreview: true });
}, _this.getDuration = function () {

@@ -201,6 +203,11 @@ if (!_this.player) return null;

value: function componentWillUpdate(nextProps) {
var light = this.props.light;
this.config = (0, _utils.getConfig)(nextProps, _props2.defaultProps);
if (!this.props.light && nextProps.light) {
if (!light && nextProps.light) {
this.setState({ showPreview: true });
}
if (light && !nextProps.light) {
this.setState({ showPreview: false });
}
}

@@ -207,0 +214,0 @@ }, {

{
"name": "react-player",
"version": "1.11.1",
"version": "1.11.2",
"description": "A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion",

@@ -5,0 +5,0 @@ "main": "lib/ReactPlayer.js",

@@ -170,2 +170,3 @@ <h1 align='center'>

`getInternalPlayer()` | Returns the internal player of whatever is currently playing<br />&nbsp; ◦ &nbsp;eg the [YouTube player instance](https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player), or the [`<video>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/video) element when playing a video file<br />&nbsp; ◦ &nbsp;Use `getInternalPlayer('hls')` to get the [hls.js](https://github.com/video-dev/hls.js) player<br />&nbsp; ◦ &nbsp;Use `getInternalPlayer('dash')` to get the [dash.js](https://github.com/Dash-Industry-Forum/dash.js) player<br />&nbsp; ◦ &nbsp;Returns `null` if the internal player is unavailable
`showPreview()` | When using `light` mode, returns to the preview overlay

@@ -172,0 +173,0 @@ ### Advanced Usage

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

Sorry, the diff of this file is not supported yet

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