davidohayon669 / react-native-youtube

A <YouTube/> component for React Native.
MIT License
1.15k stars 474 forks source link

Video keeps pausing after 1 second #547

Closed darias08 closed 1 year ago

darias08 commented 1 year ago

Hello,

I have the the prop for play to true and it keeps pausing the video every second. Here's a sample of my code how I have it set up.

<YoutubeVideos
   apiKey={YOUTUBE_API_KEY}
   videoId='KVZ-P-ZI6W4'
   play={true}
   style={{alignSelf: 'stretch', height: 250}}
/>
darias08 commented 1 year ago

Just to update this post:

I see where the error is coming from when I console.log the error. It's saying UNAUTHORIZED_OVERLAY every time I press play on the video and it goes back to pause after 1 second.

darias08 commented 1 year ago

After searching. I found what was causing as mentioned in the readMe page. I didn't know that having a view component within the youtube player causes it to pause the video.