Currently we are using Web view to showcase the Youtube videos. It obviously results in smaller apk size, but, we would lesser control over youtube videos.
This solution would result in increase of app size by around 5MB, but we would much finer control over the youtube videos.
Second solution could be to actually somehow, intercept the callbacks from the webview, and disable them. Like intercept the clicks on youtube brandings and disable them.
When you click on the youtube branding of the youtube player in the app (like the title or youtube logo), the entire youtube webView is opening.
https://user-images.githubusercontent.com/29144058/158114302-04a497c2-9725-45dc-97c7-f14c4ac04e8c.mov
Potential Solutions and Drawbacks
Currently we are using Web view to showcase the Youtube videos. It obviously results in smaller apk size, but, we would lesser control over youtube videos.
We can take a look at this library https://github.com/PierfrancescoSoffritti/android-youtube-player for playing youtube videos.
This solution would result in increase of app size by around 5MB, but we would much finer control over the youtube videos.
Second solution could be to actually somehow, intercept the callbacks from the webview, and disable them. Like intercept the clicks on youtube brandings and disable them.