TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.5k stars 3.06k forks source link

[Feature] Live chat support #5171

Open Orion983 opened 3 years ago

Orion983 commented 3 years ago

Checklist

Describe the feature you want

What I want is to be able to see live chat on NewPipe (with a way to turn it off in settings of course).

Is your feature request related to a problem? Please describe it

This streamer for example that I watch reads out stuff in the chat sometimes, but how could I see the chat myself? That is what this idea came from.

Additional context

Two mock ups actually made from a VOD IMG_20201214_160350 IMG_20201214_161726 Maybe, you could change super chat donation colours too? And maybe change the screen side it is on?

How will you/everyone benefit from this feature?

People could read the live chat on NewPipe.

Orion983 commented 3 years ago

"Thank you name for the Super chat!" she says. To which I say, "What did name say?"

Orion983 commented 3 years ago

The service is deployed to this path youtube.com/live_chat and displayed in the DOM container with the ID of ytd-live-chat-frame, I'm pretty sure Live Chat requires the Google unified authentication, and donation (Super Chat) are not enabled for all countries. Hmm.. perhaps some workaround with youtube-nocookie.com might be able to display a read-only version of chat?..

I was thinking read-only anyway

ggdorman commented 3 years ago

I think displaying the read-only chat is a great idea. I'm not so sure about the comments overlaying the video, but having them below the video would be great. I think this chat UI would look good: screen-1

Orion983 commented 3 years ago

I think displaying the read-only chat is a great idea. I'm not so sure about the comments overlaying the video, but having them below the video would be great. I think this chat UI would look good: screen-1

Or it could be optional to display over the video. I would prefer it to show over the video but I get why sone people woudn't

ah1102 commented 3 years ago

Chat is needed in the newpipe program

Orion983 commented 3 years ago

I don't think this is going anywhere. It's not had any activity. Should I close it?

opusforlife2 commented 3 years ago

There is no time limit. Any developer who wants this feature as well could look at this issue and decide to open a PR. If you close it, that possibility may get reduced by a lot, since people usually don't browse closed issues.

Orion983 commented 3 years ago

Ah ok

On Thu, 3 Jun 2021, 16:39 opusforlife2, @.***> wrote:

There is no time limit. Any developer who wants this feature as well could look at this issue and decide to open a PR. If you close it, that possibility may get reduced by a lot, since people usually don't browse closed issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TeamNewPipe/NewPipe/issues/5171#issuecomment-853966267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5XXOGJH7XYPD5EBYN7NGLTQ6O4ZANCNFSM4U27NXOQ .

iNtEgraIR2021 commented 3 years ago

I couldn't find a working parser for the live chat written in java while searching the internet so far.

But I found the python module pytchat. This relies only on sending http requests. So no web scraping or youtube api calling.

An example from the docs to get the live chat content as json:

import pytchat
import time

chat = pytchat.create(video_id="bw-zCrtCFs0")
while chat.is_alive():
    print(chat.get().json())
    time.sleep(5)

    # Each chat item can also be output in JSON format.
    for c in chat.get().items:
        print(c.json())

to see the http requests -> add the logging module as an import and define the logging level

import logging
logging.basicConfig(level=logging.DEBUG)

So if anyone has the know-how to create a PoC in java based on this that would be great.

I'd love to do this myself but unfortunately I don't have the needed knowledge of java.

Defog7277 commented 6 months ago

It's been four years since the creation of this Feature Request.

The ability to read Live Chat is a much needed feature. On behalf of people who like to watch streams, I would ask you to add such an option.

Is there any progress on this topic since 2020?

opusforlife2 commented 6 months ago

Not that I know of.

swiftgeek commented 5 months ago

Embedding https://www.youtube.com/live_chat?is_popout=1&v=video_id_here with some changes to visibility of elements could be an (highly inefficient) alternative, or could be worked around by using browser with that url + split screen

joeky888 commented 5 months ago

PipePipe (fork of NewPipe) does support youtube live chat through bullet comments (danmaku subtitling).