Skip to content
Advertisement

Using TextureView and MediaPlayer in Jetpack Compose

My source code was written in Java and now I want to convert to Compose

How can I convert the above code to Compose?

Java

JavaScript

How can I convert the above code to Compose?

My source code was written in Java and now I want to convert to Compose

This is the way I use now, but it’s not working

JavaScript

My source code was written in Java and now I want to convert to Compose

My source code was written in Java and now I want to convert to Compose

Advertisement

Answer

If you moved to use compose fully, then I think you can proceed like this: create you Custom view and call it in compose

JavaScript

and in compose

JavaScript
Advertisement