Integrating ExoPlayer in Jetpack Compose Android

Muhammad Danish
Apr 23, 2022

Hi Android Devs in this article i am going to show you how you can integrate latest exoplayer library in your jetpack compose android app. My code does not contains any deprecated code in integration of exoplayer.

First declare exoplayer library in your gradle file:

implementation ""

Note: only use latest library of exoplayer else you will face errors in your code.

Now add Internet permission in your android manifest file:

<uses-permission android:name="android.permission.INTERNET"/>

If you face below exception:$CleartextNotPermittedException

then add line in your application tag in manifest file.


Now go to your activity and write below code:

Now call uiContainer() from setContent{} inside onCreate method of your activity.


Check this repository for full code: