feat: option to pin video player at top while scrolling (closes #4484)#12710
feat: option to pin video player at top while scrolling (closes #4484)#12710XYW16 wants to merge 2 commits intoTeamNewPipe:devfrom
Conversation
- Add pinned video player toggle in Settings → Player - Implement YouTube-style pinned player that stays at top while scrolling - Add overlay layout for pinned mode with video player, title, uploader info, and tabs - Integrate with existing player system and preference management - Support seamless switching between pinned and scrollable modes
…View; fill remaining height)
|
Hi, thank you for your pull request! As explained in the README, the If you want to do more work related to the layout of the VideoDetailFragment, you could start migrating some of its components to Jetpack Compose on the Btw, is your contribution part of the anual ANU comp2120 OSS assignement. Just so we know :-) |
|
Thanks for the quick review and the clarification! Understood — if dev isn’t accepting new feature PRs and the player is being refactored on refactor, I’m happy to close this PR and switch focus. I’m interested in helping on the refactor branch, especially migrating parts of VideoDetailFragment to Jetpack Compose. Could you please point me to: the current entry points/files on refactor that you’d like to see migrated first (e.g., which sections of the detail screen are good starters), any preferred Compose patterns (e.g., theming, state hoisting, navigation), and constraints around the new player (what to avoid touching, how to integrate a pinned header once NewPlayer is ready)? Re your question: yes, this is part of the annual ANU COMP6120 OSS assignment 😊. I’ll mark this PR as closed (or convert to draft) and start a fresh branch targeting refactor once I have your pointers. Thanks again! |
|
@XYW16 here you are:
Also, for the next PR please don't have LLMs write all of the code and the PR body. You can absolutely use LLMs to help find the right place where to make a change, and to suggest code snippets here and there, but you should check everything yourself, consider alternatives, and choose the one that fits better. In practice, let the LLM do the boilerplate, but don't delegate architecture decision-making to the LLM, as it's not good at it. Thanks in advance! :-) |



What
Adds an opt-in option to keep the video player pinned at the top on the
video detail screen while scrolling through Comments/Related (portrait).
Why
Better multitasking and UX parity with YouTube: users can keep watching while
reading comments or browsing recommendations. Avoids scrolling back to the top.
How
VideoDetailFragment:pinned_video_player_keyinonSharedPreferenceChangedsetupPinnedPlayerMode()toggles between pinned overlay and original layoutplayerUitopinned_player_placeholderwhen pinnedcopyDataToPinnedLayout()updates pinned-title/uploader textfragment_video_detail.xml(pinned overlay):TabLayout+ViewPagerout ofNestedScrollViewViewPageruseslayout_weight=1to fill remaining heightstrings.xml,video_audio_settings.xml)Testing (manual)
Env: [Device/Android version/NewPipe devDebug build]
Screenshots / Demo
(attach OFF vs ON screenshots or a short GIF/MP4)
d1fa70a7878ed24172108b80d9855a0b.mp4