ExoPlayer
ExoPlayer copied to clipboard
Add Official Support for JetPack Compose
Before filing a feature request:
- Search existing open issues, specifically with the label ‘enhancement’: https://github.com/google/ExoPlayer/labels/enhancement
- Search existing pull requests: https://github.com/google/ExoPlayer/pulls
When filing a feature request:
Replace the content in the sections below.
[REQUIRED] Use case description
It would be great to support Jetpack compose. Currently its not supported yet its an official google way of building UI on android.
Proposed solution
A clear and concise description of your proposed solution, if you have one.
Alternatives considered
There are tutorial online of adding exoplayer to AndroidView but there are reports of performance issues. like this example repo https://github.com/spencergriffin/exoplayer-compose
Strongly agree, it should be supported to call it declaratively instead of via AndroidView{}
I made an implementation which is very flexible and declarative, though only the basic features are implemented so far. Mind to take a look? compose-video-player
Any updates on this? Quite some time has passed, and the performance on Compose is not ideal I would say. Seeing some black screens when rendering the View and it looks glitchy at times.
Hello,
Could you give us some details on how/when you're planning to support Compose ?
Thank you
This is great example on how to implement ExoPlayer in Compose way https://github.com/fengdai/compose-media
This is crazy it's just been silence for so long. Could we at least get some kind of response, even if you don't know when? Are you ever planning on supporting compose natively without an AndroidView, this is causing many problems.
Are you ever planning on supporting compose natively without an AndroidView, this is causing many problems.
For those that still use an AndroidView though, take a look at this issue, because Compose devs just recently implemented view reusability for AndroidViews inside Compose: https://issuetracker.google.com/issues/230099236
Thank you for this request. We're aware that support for Jetpack Compose is highly requested and we're looking into it.
As part of supporting Compose, the media3 library needs a Kotlin-friendly API, which is why we're prioritizing work on https://github.com/androidx/media/issues/599 first