I am working on my side project where I am showing embedded tweet in web-view. Some of the tweet's contain video. On iOS when I click on the blue play back button, it starts the video in full screen video player. Where as on Android it runs it in the tweet's embedded media player.
I am using the custom chrome client to handle the full screen view
class CustomChromeClient(val activity: ComponentActivity) : WebChromeClient() {
var customView: View? = null
override fun onHideCustomView() {
(activity.window.decorView as FrameLayout).removeView(this.customView)
this.customView = null
}
override fun onShowCustomView(paramView: View, paramCustomViewCallback: CustomViewCallback) {
if (this.customView != null) {
onHideCustomView()
return
}
this.customView = paramView
(activity.window.decorView as FrameLayout).addView(this.customView, FrameLayout.LayoutParams(-1, -1))
}
}
But this full screen only happens when I have to manually tap on full screen mode in the tweet's media player. What I actually want to do is when I play the video, it should start in full screen view.

Maybe you could make a bridge to the JS side with addJavascriptInterface?
Pseudocode Examples
Step 1: Create a JavaScript Interface
Step 2: Inject JavaScript into WebView
Step 3: Modify CustomChromeClient
Caveats