Skip to content

Commit

Permalink
Prevent YouTube from playing after seekTo when paused
Browse files Browse the repository at this point in the history
Still not ideal as it will show a spinner if the video hasn't been played yet, but better than nothing
Partially fixes cookpete/react-player#437
  • Loading branch information
webmiraclepro committed Sep 12, 2018
1 parent efe3640 commit e1f5df5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/players/YouTube.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export class YouTube extends Component {
}
seekTo (amount) {
this.callPlayer('seekTo', amount)
if (!this.props.playing) {
this.pause()
}
}
setVolume (fraction) {
this.callPlayer('setVolume', fraction * 100)
Expand Down

0 comments on commit e1f5df5

Please sign in to comment.