Skip to content

Commit

Permalink
Add console warning when using youtube embedOptions.events
Browse files Browse the repository at this point in the history
Fixes #1016
  • Loading branch information
cookpete committed Oct 28, 2020
1 parent 339d53e commit da31bb9
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 @@ -74,6 +74,9 @@ export default class YouTube extends Component {
...embedOptions
})
}, onError)
if (embedOptions.events) {
console.warn('Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause')
}
}

parsePlaylist = (url) => {
Expand Down

0 comments on commit da31bb9

Please sign in to comment.