Skip to content

Add YouTube live chat fallback when comments are disabled#13449

Open
Ecomont wants to merge 12 commits intoTeamNewPipe:refactorfrom
Ecomont:feature/live-chat-comments
Open

Add YouTube live chat fallback when comments are disabled#13449
Ecomont wants to merge 12 commits intoTeamNewPipe:refactorfrom
Ecomont:feature/live-chat-comments

Conversation

@Ecomont
Copy link
Copy Markdown

@Ecomont Ecomont commented Apr 24, 2026

What is it?

  • Bugfix (user facing)
  • Feature (user facing) ⚠️ Your PR must target the refactor branch
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This PR consumes the new isLiveChat API 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: Added isLiveChat field propagated from CommentsInfo.
  • CommentsViewModel: Added live chat polling via coroutine (delay(3000)) using CommentsInfo.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.
  • Cleanup: Removed bullet comments overlay integration from the player lifecycle. The BulletCommentsView and MovieBulletCommentsPlayer source files remain in the repo as unused code (can be removed in a follow-up).

Dependency note: Requires the extractor PR (adds isLiveChat support) to be merged and published first.

Before/After Screenshots/Screen Record

  • Before:
    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

@github-actions github-actions Bot added the size/giant PRs with more than 750 changed lines label Apr 24, 2026
@TobiGr TobiGr added feature request Issue is related to a feature in the app YouTube Service, https://www.youtube.com/ comments Anything to do with comments and comment replies under videos/audios labels Apr 24, 2026
@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Apr 24, 2026

Thank you!

Dependency note: Requires the extractor PR (adds isLiveChat support) to be merged and published first.

Please use your extractor fork for testing the PR. It can be changed back once TeamNewPipe/NewPipeExtractor#1481 is merged.

Copy link
Copy Markdown
Member

@absurdlylongusername absurdlylongusername left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

image

As you see here there's blue arrow you can click.

image

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?

@Ecomont
Copy link
Copy Markdown
Author

Ecomont commented Apr 24, 2026

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)

image As you see here there's blue arrow you can click. image 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
The live chat is actually all compose, those view files(BulletCommentsView, ...) are just dead code from an early prototype that I completely forgot to clean up before pushing I'll delete them right away to clear up the diff.

2 Premieres and fallback
I honestly just forgot about premieres and edge cases where both comments and live chat are active.

3Replays and autoscroll UX
I made that so the user view stays always on the recent comments but I will add that the user can scroll down and the chat don't auto scrolls.

4 The separate tabSolution
I built on top of the existing comments tab because it was faster but I will fix it.

@github-actions github-actions Bot added size/medium PRs with less than 250 changed lines and removed size/giant PRs with more than 750 changed lines labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Anything to do with comments and comment replies under videos/audios feature request Issue is related to a feature in the app size/medium PRs with less than 250 changed lines YouTube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants