We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @pedroSG94, we tried with webview as overlay filter but its not showing full screen in landscape mode.
Here is my code
//Main Activity Layout
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextureView android:id="@+id/textureView" android:layout_width="match_parent" android:layout_height="match_parent"></TextureView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"> <WebView android:id="@+id/overlay_webview" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="invisible"> </WebView> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:orientation="vertical"> <ImageView android:id="@+id/b_start_stop" android:layout_width="98dp" android:layout_height="98dp" android:src="@drawable/stream_icon" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/bitrate_tv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="18dp" android:textColor="@color/teal_200" android:textSize="36sp" /> </LinearLayout>
// Inflate Views from xml
stream_start_stop = findViewById(R.id.b_start_stop) bitrate_tv = findViewById(R.id.bitrate_tv) overlay_webview = findViewById(R.id.overlay_webview);
//web view intialization
overlay_webview.setBackgroundColor(Color.TRANSPARENT); overlay_webview.getSettings().setJavaScriptEnabled(true); overlay_webview.getSettings().setLoadWithOverviewMode(true); overlay_webview.getSettings().setUseWideViewPort(true); overlay_webview.webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading( view: WebView?, request: WebResourceRequest? ): Boolean { view?.loadUrl(request?.url.toString()); return true } override fun onPageFinished(view: WebView?, url: String?) { } }
overlay_webview.loadUrl("https://www.youtube.com/")
//adding webview as filter
textureView = findViewById(R.id.textureView); if (!genericStream.isOnPreview) genericStream.startPreview(textureView, true) val androidViewFilterRender = AndroidViewFilterRender() androidViewFilterRender.view = overlay_webview androidViewFilterRender.setPosition(0f, 0f) genericStream.getGlInterface().addFilter(androidViewFilterRender)
Output Image
AndroidViewFilterRender not matches entire sceen.
The text was updated successfully, but these errors were encountered:
Hello,
I can't see set the scale to 100x100 (androidViewFilterRender.setScale(100f, 100f)).
Sorry, something went wrong.
Thanks @pedroSG94
No branches or pull requests
Hi @pedroSG94, we tried with webview as overlay filter but its not showing full screen in landscape mode.
Here is my code
//Main Activity Layout
// Inflate Views from xml
stream_start_stop = findViewById(R.id.b_start_stop)
bitrate_tv = findViewById(R.id.bitrate_tv)
overlay_webview = findViewById(R.id.overlay_webview);
//web view intialization
overlay_webview.setBackgroundColor(Color.TRANSPARENT);
overlay_webview.getSettings().setJavaScriptEnabled(true);
overlay_webview.getSettings().setLoadWithOverviewMode(true);
overlay_webview.getSettings().setUseWideViewPort(true);
overlay_webview.webViewClient = object : WebViewClient() {
overlay_webview.loadUrl("https://www.youtube.com/")
//adding webview as filter
textureView = findViewById(R.id.textureView);
if (!genericStream.isOnPreview) genericStream.startPreview(textureView, true)
val androidViewFilterRender = AndroidViewFilterRender()
androidViewFilterRender.view = overlay_webview
androidViewFilterRender.setPosition(0f, 0f)
genericStream.getGlInterface().addFilter(androidViewFilterRender)
Output Image
AndroidViewFilterRender not matches entire sceen.
The text was updated successfully, but these errors were encountered: