Youtube videos playing in the background - Google Play violation

Oh boy. I recently opened a topic about this thinking that my app was rejected because I placed ads on my app in which has an youtube component in an ad-free screen. I contacted the support team, and it turns out the rejection was for a different reason. The youtube component plays in the background. When the user press back, close the current youtube screen and return to main screen- this is what I did, and the video didn’t play in the background while testing. Maybe the youtube component plays after the screen is locked? I don’t know what to do. Please help. Relevant screenshots are attached. Maybe there’s a way to end player?


I know my face looks weird

1 Like

This is strange, but I can make a suggestion:

On the screen where the YouTube component is, do this:

When ScreenX.On App Pause- Call Youtube_Player.Pause

I hope it serves

1 Like

This should actually be impossible with the YouTube component. Do you use a YT extension?

… or are you using virtual screens?

Since I haven’t tried youtube component in a while however, I have experienced this on one of my devices, that it plays when locked

@Brain_Flare_Creation can you share your screen blocks

/Boban

1 Like

Yes, it actually seems to depend on the Android version. Everything is ok with Android 8 and 9, with Android 5 the YT Player also plays with a locked (standby) screen.

Solution:
grafik

1 Like

Virtual screens?:thinking: i meant the screen which has the youtube component. Guess I should’ve made it clear.

Thanks, I’ll try it.

Strange…this happens to me too.

Yes, I just confirmed this. The video pauses when screen is locked on Android 9. But it keeps playing on Android 7. Is this is a bug?:thinking:

I need to first charge my Android 7 test device, then I will check it.

Yes, please check it out!:smiley:

Yes, also playing in standby on Android 7.
So use this block:

grafik

Did it and it is accepted! Thanks for all of your help:smiley: btw, even though my app is shown to be published, I cannot find it in google play even using the direct link. Guess I have to wait a while.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.