Skip to content

Commit

Permalink
Add onSeek support to Twitch player
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-daversa committed Nov 14, 2021
1 parent 060c328 commit c941b98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/players/Twitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ export default class Twitch extends Component {
time: parseStartTime(url),
...config.options
})
const { READY, PLAYING, PAUSE, ENDED, ONLINE, OFFLINE } = Twitch.Player
const { READY, PLAYING, PAUSE, ENDED, ONLINE, OFFLINE, SEEK } = Twitch.Player
this.player.addEventListener(READY, this.props.onReady)
this.player.addEventListener(PLAYING, this.props.onPlay)
this.player.addEventListener(PAUSE, this.props.onPause)
this.player.addEventListener(ENDED, this.props.onEnded)
this.player.addEventListener(SEEK, this.props.onSeek)

// Prevent weird isLoading behaviour when streams are offline
this.player.addEventListener(ONLINE, this.props.onLoaded)
Expand Down

0 comments on commit c941b98

Please sign in to comment.