0

I need to prevent any UI appear on youtube player, even the rotate loading that appears before starting the video. I use this line to prevent any control

youTubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.CHROMELESS);

but I can't find any way to hide the rotate loading!!!

2 Answers2

1

I have developed an open source YouTube player library (android-youtube-player), you can use it's UI customization APIs to create your own UI for it. You can read more here in the doc.

Pierfrancesco Soffritti
  • 1,678
  • 1
  • 18
  • 22
  • yes, it seems like a great job. thank you but when I try to download it, get me this error while synchronizing the gradle " Error:Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.pierfrancescosoffritti.androidyoutubeplayer:core:8.0.1. " when i click show details get this " Required by: project :app > No cached version of com.pierfrancescosoffritti.androidyoutubeplayer:core:8.0.1 available for offline mode." – nagwa redaa Sep 20 '18 at 15:47
  • @nagwaredaa Does your Android Studio have access to the internet? – Pierfrancesco Soffritti Sep 20 '18 at 16:02
  • it works finally. the problem in an android studio, I solve it like this >>> https://stackoverflow.com/questions/22607661/no-cached-version-of-com-android-tools-buildgradle0-9-1-available-for-offline – nagwa redaa Sep 20 '18 at 16:38
  • I can not hide the loading view also using this library – nagwa redaa Sep 27 '18 at 19:24
0

You can try to host the video then use API where you can customize your media player.

Use:

Or

Try to manipulate the background of your container using CSS. Use property opacity to add transparency to the background of your element. Set it to 0 for default, then set it to 1 once it start playing.

Jessica Rodriguez
  • 2,899
  • 1
  • 12
  • 27
  • Thanks, @jess my project is an Android application.your answer dose not seems to be for the android application. or I don't understand – nagwa redaa Sep 18 '18 at 17:00