Recently we pushed one app into Google play store, our app hosts the youtube video links & play the content through YouTube player.
We received policy violation
In my case, I had a WebView linked to Google News - that included YouTube videos. The app violates the Device and Network Abuse policy. "Background play of YouTube content is not allowed in any cases."
Solution - I added this code
override fun onPause() {
super.onPause()
mWebView?.onPause()
mWebView?.pauseTimers()
}
override fun onResume() {
super.onResume()
mWebView?.onResume()
mWebView?.resumeTimers()
}