Open rutikeyone opened 1 year ago
How to restore the state of youtube player view in Fragment when navigation popup?
I use the navigation component for navigation. When navigating, the youtube player popup view is recreated.
I need youtube player view to save its state when navigating and return to it when navigating popup. How can I implement this? Thank you.
https://github.com/PierfrancescoSoffritti/android-youtube-player/assets/62370608/3ec8ccad-4f3e-40d9-9b6d-c330a4d5e47b
You should try to not destroy the YouTubePlayerView. But if that's not possible you can try manually storing and restoring the state.
Question / Problem
How to restore the state of youtube player view in Fragment when navigation popup?
Summary
I use the navigation component for navigation. When navigating, the youtube player popup view is recreated.
I need youtube player view to save its state when navigating and return to it when navigating popup. How can I implement this? Thank you.
https://github.com/PierfrancescoSoffritti/android-youtube-player/assets/62370608/3ec8ccad-4f3e-40d9-9b6d-c330a4d5e47b