Question
Say I have two fragments, A and B. In fragment A i start playback of a video. When the user taps a button, I want to transition to fragment B, animating the video as a shared element, without interrupting video or audio. How would I go about this?
Further context
This question is about moving media in general (Gifs, video) but please start from exoplayer if there is no common answer. I have previously only seen such transitions made with static content.
Seen in the wild
YouTube for Android TV.
Here, you can start playback of a music video inside a card in the browse view (fragment A). If you press the card, you are transitioned to the playback view (fragment B). During this transition, the video is uninterrupted and zoomed in/out like a shared element.
from How to achieve shared element transition with video
No comments:
Post a Comment