react-youtube
react-youtube copied to clipboard
Player interaction issues during autoplay:1
When 'autoplay: 1', if autoplay is not possible due to browser policy, etc., the player blinks twice and can only interact with a part of the Youtube screen (the Youtube icon in the center and the play button at the bottom)
to-be: It should be playable by clicking anywhere on the Youtube screen.
just add this code to onReady function
i will work
const onPlayerReady: YouTubeProps['onReady'] = (event) => { // access to player in all event handlers via event.target event.target.mute(); }