Skip to content

Commit

Permalink
Set isLoading to false after error
Browse files Browse the repository at this point in the history
  • Loading branch information
webmiraclepro committed Mar 21, 2019
1 parent a15ce9b commit ac8bc5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ export default class Player extends Component {
onEnded()
}
}
onError = (e) => {
this.isLoading = false
this.props.onError(e)
}
onDurationCheck = () => {
clearTimeout(this.durationCheckTimeout)
const duration = this.getDuration()
Expand Down Expand Up @@ -225,6 +229,7 @@ export default class Player extends Component {
onPause={this.onPause}
onEnded={this.onEnded}
onLoaded={this.onLoaded}
onError={this.onError}
/>
)
}
Expand Down

0 comments on commit ac8bc5e

Please sign in to comment.