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
webmiraclepro committed Jan 2, 2016
1 parent 6eb0654 commit 6ca5136
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 6ca5136

Please sign in to comment.