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 0.5.1 to 0.5.2

demo/app.css

8

CHANGELOG.md

@@ -7,2 +7,10 @@ # Change Log

#### [v0.5.2](https://github.com/CookPete/react-player/compare/v0.5.1...v0.5.2)
> 25 January 2016
* Vimeo fullscreen support [`#33`](https://github.com/CookPete/react-player/issues/33)
* Tweak readme [`a741b2c`](https://github.com/CookPete/react-player/commit/a741b2c381dae449916895ce13f81e14dccf3afa)
* Add preload to propTypes [`ad05a91`](https://github.com/CookPete/react-player/commit/ad05a91622fd050b69f290720a7a7fe9b8881df7)
#### [v0.5.1](https://github.com/CookPete/react-player/compare/v0.5.0...v0.5.1)

@@ -9,0 +17,0 @@ > 21 January 2016

15

lib/players/Vimeo.js

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

byline: 0,
fullscreen: 1,
portrait: 0,

@@ -101,7 +102,11 @@ title: 0

}, {
key: 'getIframeParams',
value: function getIframeParams() {
return _extends({}, DEFAULT_IFRAME_PARAMS, this.props.vimeoConfig.iframeParams);
}
}, {
key: 'load',
value: function load(url) {
var id = url.match(MATCH_URL)[3];
var iframeParams = _extends({}, DEFAULT_IFRAME_PARAMS, this.props.vimeoConfig.iframeParams);
this.iframe.src = IFRAME_SRC + id + '?' + (0, _queryString.stringify)(iframeParams);
this.iframe.src = IFRAME_SRC + id + '?' + (0, _queryString.stringify)(this.getIframeParams());
}

@@ -152,2 +157,6 @@ }, {

value: function render() {
var _getIframeParams = this.getIframeParams();
var fullscreen = _getIframeParams.fullscreen;
var style = {

@@ -158,3 +167,3 @@ display: this.props.url ? 'block' : 'none',

};
return _react2.default.createElement('iframe', { ref: 'iframe', frameBorder: '0', style: style });
return _react2.default.createElement('iframe', { ref: 'iframe', frameBorder: '0', style: style, allowFullScreen: fullscreen });
}

@@ -161,0 +170,0 @@ }], [{

6

lib/props.js

@@ -21,6 +21,8 @@ 'use strict';

youtubeConfig: _react.PropTypes.shape({
playerVars: _react.PropTypes.object
playerVars: _react.PropTypes.object,
preload: _react.PropTypes.bool
}),
vimeoConfig: _react.PropTypes.shape({
iframeParams: _react.PropTypes.object
iframeParams: _react.PropTypes.object,
preload: _react.PropTypes.bool
}),

@@ -27,0 +29,0 @@ onPlay: _react.PropTypes.func,

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

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

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

`className` | Pass in a `className` to set on the top level element
`onProgress` | Callback containing `played` and `loaded` progress as a fraction eg `{ played: 0.12, loaded: 0.34 }`
#### Callback props
Callback props take a function that gets fired on various player events
Prop | Description
---- | -----------
`onProgress` | Callback containing `played` and `loaded` progress as a fraction<br/>eg `{ played: 0.12, loaded: 0.34 }`
`onDuration` | Callback containing duration of the media, in seconds

@@ -111,4 +118,4 @@ `onPlay` | Called when media starts or resumes playing after pausing or buffering

* [gaearon](https://github.com/gaearon) for his [react-hot-boilerplate](https://github.com/gaearon/react-hot-boilerplate), which this repo is roughly based on.
* [gaearon](https://github.com/gaearon) for his [react-transform-boilerplate](https://github.com/gaearon/react-transform-boilerplate), which this repo is roughly based on.
* [Simon Smith](http://simonsmith.io) for his [intro to react testing with shallow rendering](http://simonsmith.io/unit-testing-react-components-without-a-dom/)
* [Fauntleroy](https://github.com/Fauntleroy) for his contributions
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