Smooth transition to player (which is in an itemview) in the next activity contaning recyclerview
@marcbaechinger is already working on this.
Since May 1, 2024.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
I have a RecyclerView in first Fragment which has PlayerView to play videos from url at the appropriate visible position (& pauses when the visible view is away from the visible position).
From here, clicking in the video I start next activity (similar to instagram when we click a reel video in feed) which has RecyclerView with pagersnaphelper. Here I pass the clicked video's data, current position & added it the list so it continues playing from there. I add remaining videos from API to the list.
Initially, both pages have its own pool of Players. In Instagram Android when we click a video there is a small buffering in between, the app I am developing also had that. The requirement is to be without that & expects behaviour like in iOS Instagram where the video seamlessly goes to fullscreen without interruption.
To make it like that, I have assigned the clicked PlayerView's player to a global variable & in next activity adapter binding if position is 0 I assign the global Player instead of creating a new one. I applied shared element transition also, but still there is a bit of interruption when assigning the shared Player to a PlayerView in the itemview.
But I found that when the next activity has a single PlayerView there is no noticeable interruption, anything I can do to achieve same in PlayerView is in itemview?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.