react-player
Advanced tools
Comparing version 0.3.1 to 0.3.2
109
CHANGELOG.md
# Change Log | ||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). | ||
Generated by [auto-changelog](https://github.com/CookPete/auto-changelog) | ||
### Unreleased | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.3.1...master) | ||
#### [v0.3.2](https://github.com/CookPete/react-player/compare/v0.3.1...v0.3.2) | ||
> 2 January 2016 | ||
* Use explicit isReady property to guard player methods [`#18`](https://github.com/CookPete/react-player/issues/18) | ||
### 0.3.1 | ||
* Fix [minification issue](https://github.com/CookPete/react-player/issues/17) | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.3.0...v0.3.1) | ||
#### [v0.3.1](https://github.com/CookPete/react-player/compare/v0.3.0...v0.3.1) | ||
> 27 December 2015 | ||
* Use displayNames for players [`#17`](https://github.com/CookPete/react-player/issues/17) | ||
### 0.3.0 | ||
* Released on **25 December 2015** 🎄 | ||
* Enable [multiple YouTube players](https://github.com/CookPete/react-player/issues/15) | ||
* Fix [YouTube and Vimeo autoplay bug](https://github.com/CookPete/react-player/issues/7) | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.2.1...v0.3.0) | ||
#### [v0.3.0](https://github.com/CookPete/react-player/compare/v0.2.1...v0.3.0) | ||
> 24 December 2015 | ||
* Prime players to enable autoplay when out of focus [`#13`](https://github.com/CookPete/react-player/pull/13) | ||
* Enable multiple YouTube players [`#15`](https://github.com/CookPete/react-player/issues/15) | ||
### 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) | ||
#### [v0.2.1](https://github.com/CookPete/react-player/compare/v0.2.0...v0.2.1) | ||
> 13 November 2015 | ||
* Remove autoplay and only play if props.playing is true when ready [`#10`](https://github.com/CookPete/react-player/issues/10) | ||
### 0.2.0 | ||
* Released on **6 November 2015** | ||
* Add [player configuration props](https://github.com/CookPete/react-player/pull/4) (thanks [Fauntleroy](https://github.com/Fauntleroy)) | ||
* Fix [Soundcloud player bug](https://github.com/CookPete/react-player/issues/6) | ||
* Add basic support for Travis (build status) and David (dependency status) | ||
* Add a change log | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.1.0...v0.2.0) | ||
#### [v0.2.0](https://github.com/CookPete/react-player/compare/v0.1.0...v0.2.0) | ||
> 6 November 2015 | ||
* Configuration [`#4`](https://github.com/CookPete/react-player/pull/4) | ||
* Abort SoundCloud streaming if url changes during requests [`#6`](https://github.com/CookPete/react-player/issues/6) | ||
### 0.1.0 | ||
* Released on **19 October 2015** | ||
* Upgrade to use React `0.14` | ||
* Add support for media files | ||
* Add shallow rendering tests | ||
* Minor improvements to Vimeo player | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.0.8...v0.1.0) | ||
#### [v0.1.0](https://github.com/CookPete/react-player/compare/v0.0.8...v0.1.0) | ||
> 19 October 2015 | ||
* Add FilePlayer for HTML5 media files [`66482d5`](https://github.com/CookPete/react-player/commit/66482d51c38f3967c378160e31fcd29a28ec4616) | ||
* Add very basic shallow rendering tests [`7beccbe`](https://github.com/CookPete/react-player/commit/7beccbec2746029ef068d3f990fcc349257092f6) | ||
* Update readme and package description [`237c51a`](https://github.com/CookPete/react-player/commit/237c51a9ed2f49d8eba6c6b2900ce94c4ed3e9c5) | ||
### 0.0.8 | ||
* Released on **20 September 2015** | ||
* Add basic unit tests | ||
* Minor improvements to Soundcloud player | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.0.7...v0.0.8) | ||
#### [v0.0.8](https://github.com/CookPete/react-player/compare/v0.0.7...v0.0.8) | ||
> 20 September 2015 | ||
* Use findDOMNode [`#3`](https://github.com/CookPete/react-player/issues/3) | ||
### 0.0.7 | ||
* Released on **10 September 2015** | ||
* Bug fixes | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.0.6...v0.0.7) | ||
#### [v0.0.7](https://github.com/CookPete/react-player/compare/v0.0.6...v0.0.7) | ||
> 10 September 2015 | ||
* Set correct initial state in ReactPlayer [`f912f13`](https://github.com/CookPete/react-player/commit/f912f13f322633cb8c0b4908edf4caf1b02ec589) | ||
* Stop soundcloud track before playing another [`61bc61e`](https://github.com/CookPete/react-player/commit/61bc61e56fc5c7c2550d2a5e36bc072ae447329b) | ||
* Guard against no iframe contentWindow in Vimeo player [`da15b0a`](https://github.com/CookPete/react-player/commit/da15b0ade7f8401566cfc64de5f80396556be30b) | ||
### 0.0.6 | ||
* Released on **31 August 2015** | ||
* Bug fixes and improvements | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.0.5...v0.0.6) | ||
#### [v0.0.6](https://github.com/CookPete/react-player/compare/v0.0.5...v0.0.6) | ||
> 31 August 2015 | ||
* Use shouldComponentUpdate to prevent unnecessary rendering [`b7ca5a6`](https://github.com/CookPete/react-player/commit/b7ca5a66ff91578a49da76c5efeac5ddd45959db) | ||
* Fix onProgress bug [`1bf018e`](https://github.com/CookPete/react-player/commit/1bf018ed5db4474ee9ba1f103e6df77983565875) | ||
### 0.0.5 | ||
* Released on **27 August 2015** | ||
* Add `onError` support and separate file for `propTypes` | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.0.4...v0.0.5) | ||
#### [v0.0.5](https://github.com/CookPete/react-player/compare/v0.0.4...v0.0.5) | ||
> 27 August 2015 | ||
* Add onError support [`df8dc61`](https://github.com/CookPete/react-player/commit/df8dc61582af5202e3eeb8d6141465be5ed1bf84) | ||
* Use external propTypes file [`225dfa0`](https://github.com/CookPete/react-player/commit/225dfa073e63206dca65202ce3cf4f23e56c84db) | ||
* Add .npmignore [`81adedc`](https://github.com/CookPete/react-player/commit/81adedc585e4cf0b6380ccb08f3ff613e7eed6c6) | ||
### 0.0.4 | ||
* Released on **27 August 2015** | ||
* Add `fetch` polyfill | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.0.3...v0.0.4) | ||
#### [v0.0.4](https://github.com/CookPete/react-player/compare/v0.0.3...v0.0.4) | ||
> 27 August 2015 | ||
* Add Array.find() polyfill [`#1`](https://github.com/CookPete/react-player/issues/1) | ||
### 0.0.3 | ||
* Released on **26 August 2015** | ||
* Proper `npm` support | ||
* [Full commit list](https://github.com/CookPete/react-player/compare/v0.0.2...v0.0.3) | ||
#### [v0.0.3](https://github.com/CookPete/react-player/compare/v0.0.2...v0.0.3) | ||
> 26 August 2015 | ||
* Update build script [`c9b627f`](https://github.com/CookPete/react-player/commit/c9b627ff9a2e146822d169c89b4ea265f2296f8e) | ||
* Update readme [`2ec1b86`](https://github.com/CookPete/react-player/commit/2ec1b86aad52e8bf3080d607e140762e4e268216) | ||
### 0.0.2 | ||
* Released on **24 August 2015** | ||
* Initial release | ||
#### v0.0.2 | ||
> 24 August 2015 | ||
* First commit [`a4deecf`](https://github.com/CookPete/react-player/commit/a4deecfa421645e8e79ac9e33debe64d5b028dae) | ||
* Move react package to dev and peer dependencies [`f42ea0c`](https://github.com/CookPete/react-player/commit/f42ea0c73683d4c6e486a89684b4d6bb633a6969) |
@@ -29,2 +29,4 @@ 'use strict'; | ||
this.isReady = false; | ||
this.onReady = function () { | ||
@@ -34,2 +36,3 @@ _this.setVolume(_this.props.volume); | ||
_this.preloading = false; | ||
_this.isReady = true; | ||
_this.play(); | ||
@@ -36,0 +39,0 @@ } |
@@ -21,4 +21,2 @@ 'use strict'; | ||
var _props = require('../props'); | ||
var _Base2 = require('./Base'); | ||
@@ -83,3 +81,3 @@ | ||
value: function getFractionPlayed() { | ||
if (this.player.readyState === 0) return 0; | ||
if (!this.isReady) return null; | ||
return this.player.currentTime / this.player.duration; | ||
@@ -90,3 +88,3 @@ } | ||
value: function getFractionLoaded() { | ||
if (this.player.readyState === 0) return 0; | ||
if (!this.isReady) return null; | ||
return this.player.buffered.end(0) / this.player.duration; | ||
@@ -115,10 +113,2 @@ } | ||
enumerable: true | ||
}, { | ||
key: 'propTypes', | ||
value: _props.propTypes, | ||
enumerable: true | ||
}, { | ||
key: 'defaultProps', | ||
value: _props.defaultProps, | ||
enumerable: true | ||
}]); | ||
@@ -125,0 +115,0 @@ |
@@ -25,4 +25,2 @@ 'use strict'; | ||
var _props = require('../props'); | ||
var _Base2 = require('./Base'); | ||
@@ -124,3 +122,3 @@ | ||
value: function play() { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.play(); | ||
@@ -131,3 +129,3 @@ } | ||
value: function pause() { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.pause(); | ||
@@ -138,3 +136,3 @@ } | ||
value: function stop() { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.stop(); | ||
@@ -145,3 +143,3 @@ } | ||
value: function seekTo(fraction) { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.seek(this.player.getDuration() * fraction); | ||
@@ -152,3 +150,3 @@ } | ||
value: function setVolume(fraction) { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.setVolume(fraction); | ||
@@ -159,3 +157,3 @@ } | ||
value: function getFractionPlayed() { | ||
if (!this.player) return 0; | ||
if (!this.isReady) return null; | ||
return this.player.getCurrentPosition() / this.player.getDuration(); | ||
@@ -166,3 +164,3 @@ } | ||
value: function getFractionLoaded() { | ||
if (!this.player) return 0; | ||
if (!this.isReady) return null; | ||
return this.player.getLoadedPosition() / this.player.getDuration(); | ||
@@ -191,10 +189,2 @@ } | ||
enumerable: true | ||
}, { | ||
key: 'propTypes', | ||
value: _props.propTypes, | ||
enumerable: true | ||
}, { | ||
key: 'defaultProps', | ||
value: _props.defaultProps, | ||
enumerable: true | ||
}]); | ||
@@ -201,0 +191,0 @@ |
@@ -25,4 +25,2 @@ 'use strict'; | ||
var _props = require('../props'); | ||
var _Base2 = require('./Base'); | ||
@@ -131,3 +129,3 @@ | ||
value: function getFractionPlayed() { | ||
return this.fractionPlayed || 0; | ||
return this.fractionPlayed || null; | ||
} | ||
@@ -137,3 +135,3 @@ }, { | ||
value: function getFractionLoaded() { | ||
return this.fractionLoaded || 0; | ||
return this.fractionLoaded || null; | ||
} | ||
@@ -159,10 +157,2 @@ }, { | ||
enumerable: true | ||
}, { | ||
key: 'propTypes', | ||
value: _props.propTypes, | ||
enumerable: true | ||
}, { | ||
key: 'defaultProps', | ||
value: _props.defaultProps, | ||
enumerable: true | ||
}]); | ||
@@ -169,0 +159,0 @@ |
@@ -27,4 +27,2 @@ 'use strict'; | ||
var _props = require('../props'); | ||
var _Base2 = require('./Base'); | ||
@@ -100,3 +98,3 @@ | ||
var id = url && url.match(MATCH_URL)[1]; | ||
if (this.player) { | ||
if (this.isReady) { | ||
this.stop(); | ||
@@ -127,3 +125,3 @@ if (playing) { | ||
value: function play() { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.playVideo(); | ||
@@ -134,3 +132,3 @@ } | ||
value: function pause() { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.pauseVideo(); | ||
@@ -141,3 +139,3 @@ } | ||
value: function stop() { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.stopVideo(); | ||
@@ -148,3 +146,3 @@ } | ||
value: function seekTo(fraction) { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.seekTo(this.player.getDuration() * fraction); | ||
@@ -155,3 +153,3 @@ } | ||
value: function setVolume(fraction) { | ||
if (!this.player) return; | ||
if (!this.isReady) return; | ||
this.player.setVolume(fraction * 100); | ||
@@ -162,3 +160,3 @@ } | ||
value: function getFractionPlayed() { | ||
if (!this.player || !this.player.getCurrentTime) return 0; | ||
if (!this.isReady) return null; | ||
return this.player.getCurrentTime() / this.player.getDuration(); | ||
@@ -169,3 +167,3 @@ } | ||
value: function getFractionLoaded() { | ||
if (!this.player || !this.player.getVideoLoadedFraction) return 0; | ||
if (!this.isReady) return null; | ||
return this.player.getVideoLoadedFraction(); | ||
@@ -188,10 +186,2 @@ } | ||
enumerable: true | ||
}, { | ||
key: 'propTypes', | ||
value: _props.propTypes, | ||
enumerable: true | ||
}, { | ||
key: 'defaultProps', | ||
value: _props.defaultProps, | ||
enumerable: true | ||
}]); | ||
@@ -198,0 +188,0 @@ |
@@ -28,3 +28,4 @@ 'use strict'; | ||
onEnded: _react.PropTypes.func, | ||
onError: _react.PropTypes.func | ||
onError: _react.PropTypes.func, | ||
onProgress: _react.PropTypes.func | ||
}; | ||
@@ -31,0 +32,0 @@ |
@@ -57,6 +57,6 @@ 'use strict'; | ||
var played = _this.refs.player.getFractionPlayed(); | ||
if (!_this.prevLoaded || loaded !== _this.prevLoaded) { | ||
if (loaded !== null && loaded !== _this.prevLoaded) { | ||
progress.loaded = _this.prevLoaded = loaded; | ||
} | ||
if (!_this.prevPlayed || played !== _this.prevPlayed) { | ||
if (played !== null && played !== _this.prevPlayed) { | ||
progress.played = _this.prevPlayed = played; | ||
@@ -63,0 +63,0 @@ } |
{ | ||
"name": "react-player", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "A react component for playing a variety of URLs, including file paths, YouTube, SoundCloud and Vimeo", | ||
@@ -13,3 +13,4 @@ "main": "lib/ReactPlayer.js", | ||
"prepublish": "npm run build", | ||
"postpublish": "npm run clean" | ||
"postpublish": "npm run clean", | ||
"version": "auto-changelog --package --template compact; git add CHANGELOG.md" | ||
}, | ||
@@ -40,2 +41,3 @@ "repository": { | ||
"devDependencies": { | ||
"auto-changelog": "^0.2.2", | ||
"babel": "^5.8.21", | ||
@@ -42,0 +44,0 @@ "babel-core": "^5.4.7", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63309
18
1164