Open buddudevelopers opened 3 years ago
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
this should be prioritized. Adding Exoplayer in Androidview causes weird problems (out of memory, lifecycle problems, black screen)
As mentioned before, we are actively working on this. However, a full rewrite from Views to Compose for this library is extensive, and will take a while to fully land. In the meantime, do raise issues you find with the current solution. Please include a reproducible sample and stack trace with these issues so we can investigate.
In the meantime, we have recently merged the first Kotlin API in the common library. This is a prerequisite for Compose support. Here's the changes:
Player.onEvents
callback.Please try it out by running the latest main on your machine. We're happy to hear feedback.
Before filing a feature request:
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