A Node.JS library to connect to YouTube stream chats and grab some of that sweet, sweet data.
YouTubeLive is a Node.JS library designed to connect to YouTube livestreams and receive realtime chat events. This is particularly useful for use cases where YouTube's official API is too permissions-restrictive
Warning:
This is a reverse-engineering project. Unless you are capable of maintaining it, do not use this in production systems. I do fix issues as they arise, but on my own time.
Join the community discord (yes, TikTokLive Discord) and visit
the #youtube-support
channel for questions, contributions and ideas.
- Install the module via npm from the Coming Soon repository
npm i youtubelive
- Create your first chat connection
import {YouTubeLiveClient, LiveEvent} from "youtubelive";
const client = new YouTubeLiveCient(
"cheese.whiz"
);
client.on(LiveEvent.CONNECTED, (e: undefined) => {
console.log('Connected!')
});
export enum LiveEvent {
CONNECTED = "connected",
DISCONNECTED = "disconnected",
ERROR = "error",
FETCH_COMMENTS = "fetch_comments",
COMMENT = "comment",
EMOJI = "emoji"
}
This project is licensed under the MIT License - see the LICENSE file for details.