-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred while initializing the youtube player. #100
Comments
I'm also experiencing the same issue on RN0.36. I have followed the readme to the letter and recompiled the app and still have the issue. |
same for me.. does it have anything to do with running it on android-emulator? Is it even possible to make it work in android-emulator? @morelazers, please help! |
@ilyadoroshin I can't remember if I managed to get it to work in android emulator. I think that you need the YouTube app installed on the device for it to function on Android. I am not sure if you can install the app on emulator. If you have a device to test on definitely try that instead. Otherwise the iOS simulator should work. |
@morelazers YouTube app worked splendidly! Thanks! |
add the below lines of code into your android AndroidManifest.xml file
|
|
I've added the following code in the RN project, but keep getting the 'An error occurred while initializing the youtube player.' error only on Android (emulator). On iphone it runs beautifully.
<YouTube
ref="youtubePlayer"
videoId="KVZ-P-ZI6W4" // The YouTube video ID
play={true} // control playback of video with true/false
hidden={false} // control visiblity of the entire view
playsInline={false} // control whether the video should play inline
loop={false} // control whether the video should loop when ended
apiKey={'API_KEY'}
style={{alignSelf: 'stretch', height: 300, backgroundColor: 'black', marginVertical: 10}}
/>
What could be the possible problems causing this error?
Thanks!
The text was updated successfully, but these errors were encountered: