1.0.7 • Published 9 months ago

@letruxux/youtube-chat v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@letruxux/youtube-chat

Zero dependencies, lightweight package to fetch YouTube live chat messages with no API key. Supports both history fetching and realtime messages (with polling).

Installation

npm install @letruxux/youtube-chat
bun add @letruxux/youtube-chat
pnpm add @letruxux/youtube-chat
yarn add @letruxux/youtube-chat

Usage

import {
  ChatListener,
  getYouTubeLiveVideoId,
  fetchChatMessages,
} from "@letruxux/youtube-chat";

ChatListener

const livestreamId = await getYouTubeLiveVideoId("lofigirl");
const listener = new ChatListener(livestreamId, {
  /* config */
});

listener.onMessage((message) => {
  console.log(`${message.author}: ${message.text}`);
});

listener.start();

Types

Check the definitions file.

1.0.7

9 months ago

1.0.6

12 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago