You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe we should check if the player has been released then remount before calling play()?
public void onVideoFragmentResume() {
if (isResumePlay() && mYouTubePlayer != null) {
// For some reason calling mYouTubePlayer.play() right away is ineffective
final Handler handler = new Handler();
handler.postDelayed(new Runnable() { @OverRide
public void run() {
mYouTubePlayer.play();
}
}, 1);
}
}
This happened around here
com.google.android.youtube.player.internal.s.play (s.java:2)
com.inprogress.reactnativeyoutube.YouTubePlayerController$1.run (YouTubePlayerController.java:315)
android.os.Handler.handleCallback (Handler.java:938)
The code to embed the player is:
<YouTube
apiKey={ANDROID_API_KEY}
videoId={videoId} // The YouTube video ID
onError={reportError}
play={true}
modestbranding={true}
rel={false}
style={{alignSelf: 'stretch', height: 300}}
/>
The text was updated successfully, but these errors were encountered: