Add YouTube live chat fallback when comments are disabled#13449
Add YouTube live chat fallback when comments are disabled#13449Ecomont wants to merge 12 commits intoTeamNewPipe:refactorfrom
Conversation
|
Thank you!
Please use your extractor fork for testing the PR. It can be changed back once TeamNewPipe/NewPipeExtractor#1481 is merged. |
There was a problem hiding this comment.
Since the goal of #5171 is to add feature parity with YT's live chat, that issue should not be closed until we have achieved full feature parity.
For starters, YT has timestamps for comments in live chat, so those should be added.
I haven't tested this out locally yet, but I see a commit that says Auto-scroll to top when new live chat messages arrive.
If new messages arrive while you are currently scrolled down, it shouldn't auto scroll to the top, but rather show something that says new messages have arrived and you can click that thing to scroll to the top (otherwise you can't actually read old messages it will auto-scroll out of view)
As you see here there's blue arrow you can click.
And on Twitch there's this that shows how many new messages have arrived since you have scrolled up (we probably don't need this logic, though).
Also as this is a UI change, please provide adequate screenshots and recordings of all relevant UI for this change.
Anything that the user will be able to see that has been added as part of this change should be included visually in this PR.
Questions:
- How come the new UIs you did are using views and not Compose?
- The PR title says "live chat fallback when comments are disabled". Does this imply that if for some reason you can leave a comment while a stream is live, or comments already exist while a stream live, that live chat comments will not show up?
- How does this work for viewing completed livestreams where the live chat replay is available?
- What about premieres, which are livestreamed and can have comments before the stream happens? Will there be a way to see those comments made before the premiere started, as well as seeing the live chat?
I think an easy solution to these concerns would be to have a separate tab for live chat that is only available for livestreams, while keeping the comments tab separate.
Thoughts?
1 Views and compose 2 Premieres and fallback 3Replays and autoscroll UX 4 The separate tabSolution |


What is it?
refactorbranchDescription of the changes in your PR
This PR consumes the new
isLiveChatAPI from the extractor to display YouTube live chat messages directly in the Comments tab, replacing the previous bullet comments overlay approach.The implementation is based on the live chat UX from PipePipe, but adapted to show messages as a standard top-down list inside the comments section rather than a video overlay.
CommentInfo: AddedisLiveChatfield propagated fromCommentsInfo.CommentsViewModel: Added live chat polling via coroutine (delay(3000)) usingCommentsInfo.getMoreItems(). New messages are prepended so the newest appears on top.CommentSection: Live chat renders as a direct list (bypassing Paging 3) with auto-scroll to the top on new messages. Regular comments still use the existing paging flow.BulletCommentsViewandMovieBulletCommentsPlayersource files remain in the repo as unused code (can be removed in a follow-up).Dependency note: Requires the extractor PR (adds
isLiveChatsupport) to be merged and published first.Before/After Screenshots/Screen Record
Before:

After:
after.mp4
Fixes the following issue(s)
Relies on the following changes
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence