Open huynhdq91 opened 3 years ago
Try this, it's works for me...
Use frame layout in Xml
surfaceView = GLSurfaceView(this)
surfaceView!!.setEGLContextClientVersion(2)
surfaceView!!.setEGLConfigChooser(8, 8, 8, 8, 16, 0)
renderer = DeepARRenderer(deepAR, mRtcEngine!!)
val contextFactory=MyContextFactory(renderer)
surfaceView!!.setEGLContextFactory(contextFactory)
surfaceView!!.setRenderer(renderer)
surfaceView!!.renderMode = GLSurfaceView.RENDERMODE_CONTINUOUSLY
below above code set
lifecycleScope.launch {
delay(1000)
surfaceView!!.onPause()
surfaceView!!.onResume()
}
Late answer but this works Spend a lot of time to find this.
Try this, it's works for me...
Use frame layout in Xml
surfaceView = GLSurfaceView(this) surfaceView!!.setEGLContextClientVersion(2) surfaceView!!.setEGLConfigChooser(8, 8, 8, 8, 16, 0) renderer = DeepARRenderer(deepAR, mRtcEngine!!) val contextFactory=MyContextFactory(renderer) surfaceView!!.setEGLContextFactory(contextFactory) surfaceView!!.setRenderer(renderer) surfaceView!!.renderMode = GLSurfaceView.RENDERMODE_CONTINUOUSLY
below above code set
lifecycleScope.launch { delay(1000) surfaceView!!.onPause() surfaceView!!.onResume() }
Late answer but this works Spend a lot of time to find this.
Thank you so much. I'll try your solution, hope it works for me too.
Try this, it's works for me... Use frame layout in Xml
surfaceView = GLSurfaceView(this) surfaceView!!.setEGLContextClientVersion(2) surfaceView!!.setEGLConfigChooser(8, 8, 8, 8, 16, 0) renderer = DeepARRenderer(deepAR, mRtcEngine!!) val contextFactory=MyContextFactory(renderer) surfaceView!!.setEGLContextFactory(contextFactory) surfaceView!!.setRenderer(renderer) surfaceView!!.renderMode = GLSurfaceView.RENDERMODE_CONTINUOUSLY
below above code set
lifecycleScope.launch { delay(1000) surfaceView!!.onPause() surfaceView!!.onResume() }
Late answer but this works Spend a lot of time to find this.
Thank you so much. I'll try your solution, hope it works for me too.
My Pleasure ! please inform it's working or not for you.
In case someone looking to make this work here is the solution
add this inside setup method in java
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
surfaceView.onPause();
surfaceView.onResume();
}
}, 1000);
Hi guys, I run this demo and faced an issue. Everytime when I start the app, the local video is just a black screen. But when I press recent button, then go back to the app, it shows the local view normally. The issue happened on Samsung tablet running Android 9, Xiaomi phone running Android 11 But on Xiaomi phone running android 9, its OK, I start app and it shows local video without any issue. I have debugged and no luck. I don't know what is the root cause. Here is the log on the Samsung tablet running android 9 when issue happened at start app. Hope anyone can help me fix this. Thanks.