I'm using the YouTube Android Player API to play videos in an Android activity. This is my code for playing a video using a YouTubePlayerSupportFragment which is located in the onCreate method:
YouTubePlayerSupportFragment youtubeFragment = (YouTubePlayerSupportFragment) getSupportFragmentManager().findFragmentById(R.id.youtubeFragment);
youtubeFragment.initialize(youtubeApiKey, new YouTubePlayer.OnInitializedListener() {
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
YouTubePlayer youTubePlayer, boolean b) {
youTubePlayer.cueVideo(videoId);
}
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider,
YouTubeInitializationResult youTubeInitializationResult) {
}
});
And this is the XML where the fragment is declared:
<fragment
android:id="@+id/youtubeFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.youtube.player.YouTubePlayerSupportFragment" />
Currently whilst the video loads a teal colored circular progressBar is displayed. Is it possible to change the color of this progressBar and how would I go about doing this?
I want to change the color to the colorAccent of my current theme.
Thanks