1

I created customed RoundSurfaceView, and then,

val surfaceView = RtcEngine.CreateRendererView(baseContext) as RoundSurfaceView

and then, I got this error.

java.lang.ClassCastException: io.agora.rtc.video.ViEAndroidGLES20 cannot be cast to

I expect this kind of shape.

enter image description here

How can I make it? I also tried with custom RoundFrameLayout. But it didn't work.

c-an
  • 3,543
  • 5
  • 35
  • 82
  • Cannot be cast to... what? If you get this error on the line where you initialise `surfaceView`, make sure to check how you can get `RoundSurfaceView` from `ViEAndroidGLES20` (if that is indeed possible). It does not seem to return the object you expect it to. – Primož Ivančič Mar 28 '22 at 08:13
  • Well, I don't how ViEAndroidGLES20 works under the hood, Agora SDK does it. And RoundSurfaceView is a custom view that inherited SurfaceView. @PrimožIvančič – c-an Apr 04 '22 at 01:59
  • Please share xml of your local view – Adarsh Yashvanth Apr 11 '22 at 05:50

1 Answers1

0

You can use the SurfaceView inside a CardView and add corner radius to it.