Socket
Socket
Sign inDemoInstall

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 0.2.0 to 0.2.1

10

CHANGELOG.md

@@ -7,5 +7,13 @@ # Change Log

* [Full commit list](https://github.com/CookPete/react-player/compare/v0.2.0...master)
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.2.1...master)
### 0.2.1
* Released on **13 November 2015**
* Fix [autoplay bug](https://github.com/CookPete/react-player/issues/10)
* Add `onError` to `FilePlayer`
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.2.0...v0.2.1)
### 0.2.0

@@ -12,0 +20,0 @@

@@ -53,2 +53,5 @@ 'use strict';

_this.setVolume(_this.props.volume);
if (_this.props.playing) {
_this.play();
}
};

@@ -55,0 +58,0 @@ }

8

lib/players/FilePlayer.js

@@ -45,7 +45,8 @@ 'use strict';

this.player = this.refs.player;
this.player.onended = this.props.onEnded;
this.player.oncanplay = this.onReady;
this.player.onplay = this.props.onPlay;
this.player.onpause = this.props.onPause;
this.player.onended = this.props.onEnded;
this.player.onerror = this.props.onError;
_get(Object.getPrototypeOf(FilePlayer.prototype), 'componentDidMount', this).call(this);
this.onReady();
}

@@ -102,4 +103,3 @@ }, {

width: this.props.width,
height: this.props.height,
autoPlay: true
height: this.props.height
});

@@ -106,0 +106,0 @@ }

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

_this3.player = player;
player._player.on('stateChange', _this3.onStateChange);
_this3.onReady();
player.play();
player._player.on('stateChange', _this3.onStateChange);
});

@@ -126,0 +125,0 @@ });

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

api: 1,
autoplay: 1,
autoplay: 0,
badge: 0,

@@ -43,0 +43,0 @@ byline: 0,

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

var DEFAULT_PLAYER_VARS = {
autoplay: 1,
autoplay: 0,
controls: 0,

@@ -43,0 +43,0 @@ showinfo: 0

{
"name": "react-player",
"version": "0.2.0",
"version": "0.2.1",
"description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud and Vimeo",

@@ -10,4 +10,6 @@ "main": "lib/ReactPlayer.js",

"test": "mocha test --compilers js:babel/register",
"build": "babel src/ -d lib/",
"prepublish": "npm run build"
"build": "babel src -d lib",
"clean": "rimraf lib",
"prepublish": "npm run build",
"postpublish": "npm run clean"
},

@@ -47,5 +49,6 @@ "repository": {

"react": "^0.14.0",
"react-addons-test-utils": "^0.14.0",
"react-dom": "^0.14.0",
"react-addons-test-utils": "^0.14.0",
"react-hot-loader": "^1.2.7",
"rimraf": "^2.4.3",
"standard": "^5.1.0",

@@ -52,0 +55,0 @@ "webpack": "^1.9.6",

@@ -10,3 +10,3 @@ ReactPlayer

The component parses a URL and loads in the appropriate markup and external SDKs to play media from [various sources](#Supported Media). [Props](#Props) can be passed in to control playback and react to events such as buffering or media ending.
The component parses a URL and loads in the appropriate markup and external SDKs to play media from [various sources](#supported-media). [Props](#props) can be passed in to control playback and react to events such as buffering or media ending.

@@ -13,0 +13,0 @@ ### Usage

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