I am using native script-angular framework to develop android and ios applications. In my application I am loading youtube video using embed code in webview. The video was loading perfectly both android and ios phones and tablets, but the expand icon inside the youtube frame disabled by default in android devices and iPad's in ios platform. In ios phones, the youtube videos automatically expanded. How to solve the issue?
My Html code for loading youtube video inside webview
<WebView src='<Html><Body><iframe width="100%" height="300" src="https://www.youtube.com/embed/EXeTwQWrcwY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></Body></Html>' width="100%" height="100%" ></WebView>
My ts code:
webviewLoaded(args)
{
const webview = args.object;
if (isAndroid) {
webview.android.getSettings().setJavaScriptEnabled(true);
webview.android.getSettings().setAppCacheEnabled(true);
webview.android.getSettings().setBuiltInZoomControls(true);
webview.android.getSettings().setSaveFormData(true);
}
}