Skip to content

Commit

Permalink
[YouTube] fixes progression
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Dec 5, 2023
1 parent 0dd0793 commit 06d283d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ class YouTubePlayer extends Component {
})
}

componentWillUnmount() {
if (this.player && this.props.onPause) {
this.props.onPause( this.player.getCurrentTime(), this.player.getDuration() )
}
}

onTimer() {
this.props.onTimeUpdate( this.player.getCurrentTime(), this.player.getDuration() )
}
Expand Down

0 comments on commit 06d283d

Please sign in to comment.