Skip to content

Commit da31bb9

Browse files
committed
Add console warning when using youtube embedOptions.events
Fixes #1016
1 parent 339d53e commit da31bb9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/players/YouTube.js

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export default class YouTube extends Component {
7474
...embedOptions
7575
})
7676
}, onError)
77+
if (embedOptions.events) {
78+
console.warn('Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause')
79+
}
7780
}
7881

7982
parsePlaylist = (url) => {

0 commit comments

Comments
 (0)