1

I want android youtube player to auto-play the video on mute when loaded, something similar to what playstore is recently been doing for a while. I am not able to find any API to be able to mute the player.

Also, I don't understand how the playstore app is displaying an animated equalizer over the player as it is not allowed as per youtube's policy and will return the error like below

YouTube video playback stopped due to unauthorised overlay on top of player. The YouTubePlayerView is obscured by android.view.View{59fa6ce V.ED..... ........ 0,0-1440,84 #102002f android:id/statusBarBackground}. The view is inside the YouTubePlayerView, with the distance in px between each edge of the obscuring view and the YouTubePlayerView being: left: 0, top: 0, right: 0, bottom: 2308..

Although I was able to achieve the overlay with having a SYSTEM_ALERT_WINDOW or using elevation for my view. I am not sure if this is something which goes against the youtube's policy.

enter image description here

a_local_nobody
  • 7,947
  • 5
  • 29
  • 51
Ayaanp
  • 327
  • 1
  • 12
  • 1
    Hey! Google is the owner of youtube and play-store. So, they can use it as they want. –  Jan 19 '21 at 06:46
  • I think this might help you:https://stackoverflow.com/questions/16067783/android-youtubeplayer-with-unauthorized-overlay-on-top-of-player I am sorry if it doesn't. –  Jan 19 '21 at 09:41
  • You can use VolumeProvider. – aslamhossin Jan 20 '21 at 18:22

0 Answers0