-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PlayerView] Shared element transitions not work on 1.4.0 #1594
Comments
This may be caused by this commit |
That commit shouldn't affect Android 15 ( If you are able to build locally and revert that change on top of 1.4.0 to confirm it as the culprit, that would also be very helpful. |
OnePlus 12's A15 beta is an early version, and the SDK_INT is still 34 |
I reverted this commit and build it locally, and I can confirm that this commit caused it. |
Thank for you for confirming. Are you able to explain your repro set-up in more detail? You mention 'shared element transitions' - is that referring to this Compose feature? https://developer.android.com/develop/ui/compose/animation/shared-elements If you have a code snippet describing how your UI is wired together, or even a minimal reproducible example that demonstrates the problem in a way that we can build locally, that would be really helpful. The easiest way to do this is probably to fork this project and make changes in one of the demo apps, then link us to the fork. Alternatively it could be an Android Studio project zipped up and sent to [email protected] with the subject "Issue #1594". If emailing please also update this issue to indicate you’ve done this. |
Activity to activity (views), not compose. My use case is imageview to playerview, they have the same transitionName |
@onlymash I'm afraid investigating this further is blocked on us reproducing the issue. I'm not sure when I'll have the time to build a repro example from scratch (especially since I'm not very familiar with the shared element transitions you're referring to). If you are able to put together an example project that reproduces the issue that would speed up the investigation. |
https://github.com/onlymash/shared-element-demo |
Thank you, I can reproduce a difference in behaviour when toggling the media3 dependency in your project between 1.3.0 and 1.4.0. I have passed this on to the graphics team who helped us with the original workaround for the compose issue (#1237). |
I can reproduce this at will in Pachli (https://github.com/pachli/pachli-android). Pachli shows a social media feed that may contain videos. In the feed the video is represented as a still image and if the user taps the image a new activity is launched, with a shared element transition from the image to the video. This works fine up to and including 1.4.0-beta01. Here's a video showing what it's supposed to look like: media3-bug-textview_view.mp4Starting from 1.4.0-rc01 this is broken. Instead of smoothly transitioning the layout "sticks" for a second or more, before immediately switching to the new layout. There's no transition. Here's a video showing what that looks like. media3-bug-surfaceview_view.mp4Both videos from a Pixel 4a 5G, Android version: 14, SDK level 34 I found this issue from #1237, which is about an issue with Compose layouts. However, Pachli uses XML layouts, not Compose. If I modify the To confirm, I also tried setting pachli/pachli-android#920 is a report of this issue from a Pachli user which has another video showing the problem. That's on a Pixel 6a, Android version: 14, SDK level: 34 |
androidx.media3 1.4.0-rc01 and above (at the time of writing) has a bug that breaks shared element transitions with a `PlayerView` (see androidx/media#1594). This can be worked around by setting `app:surface_type="texture_view"`. This uses more power, but for the typical length of social media videos this shouldn't be a problem at the moment. Fixes #920.
androidx.media3 1.4.0-rc01 and above (at the time of writing) has a bug that breaks shared element transitions with a `PlayerView` (see androidx/media#1594). This can be worked around by setting `app:surface_type="texture_view"`. This uses more power, but for the typical length of social media videos this shouldn't be a problem at the moment. Fixes #920.
I've changed the Compose workaround to be opt-in, which should fix the issue reported here - thanks for reporting. This change should be included in 1.5.0-beta01. |
Can the 1.4.0 and 1.4.1 release notes please be updated to reference this issue. |
Version
Media3 1.4.0
More version details
After updating media3 to version 1.4.0, Shared element transitions fail. Specifically, PlayerView does not scale properly on Android 14 and above. The issue does not occur on Android 13. Reverting back to version 1.3.1 resolves the problem.
Devices that reproduce the issue
Devices that do not reproduce the issue
Reproducible in the demo app?
Not tested
Reproduction steps
none
Expected result
none
Actual result
none
Media
example
1.3.1.webm
1.4.0.webm
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: