Following warning showing on Youtube player playing in android app:
W/YouTubeAndroidPlayerAPI: Forcefully created overlay:wjs@a21190b helper:Lazy@f3b33e8 view:null status: ...... {...}
XML File:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.xyz.abc.YoutubePlayerActivity">
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
And my activity code is:
@Override
public void onInitializationSuccess(Provider provider, YouTubePlayer player, boolean wasRestored) {
if (videoID != null) {
youTubePlayer = player;
if (youTubePlayer != null) {
if (wasRestored) {
player.play();
} else {
try {
player.loadVideo(videoID,0);
} catch (IllegalStateException e) {
youTubeView.initialize(YouTubeConstants.youtube_API_key, this);
}
}
player.setFullscreenControlFlags(YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION);
}
}
}
Any solution about this?