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
philip-luther committed Nov 22, 2024
1 parent 3bafcc7 commit 8d8b9c1
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 8d8b9c1

Please sign in to comment.