Skip to content

Commit

Permalink
Set isReady before setVolume in onReady
Browse files Browse the repository at this point in the history
Setting it later was causing setVolume not to fire
Fixes cookpete/react-player#23
  • Loading branch information
albanqoku committed Jan 4, 2016
1 parent d8f5400 commit 2b69a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/players/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export default class Base extends Component {
}
isReady = false
onReady = () => {
this.isReady = true
this.setVolume(this.props.volume)
if (this.props.playing || this.preloading) {
this.preloading = false
this.isReady = true
if (this.loadOnReady) {
this.load(this.loadOnReady, this.props.playing)
} else {
Expand Down

0 comments on commit 2b69a98

Please sign in to comment.