{"_id":"@bluetree242/youtube-chat","_rev":"7-792566d62e443044b0b28070ecf68bf0","time":{"created":"2023-05-11T15:11:39.676Z","1.1.3":"2023-05-11T14:35:07.312Z","modified":"2023-05-13T15:45:21.772Z","1.1.4":"2023-05-11T15:11:39.918Z","1.1.5":"2023-05-11T15:20:07.983Z","1.1.6":"2023-05-13T14:43:08.756Z","1.1.7":"2023-05-13T14:52:17.487Z","1.1.8":"2023-05-13T15:45:21.677Z"},"name":"@bluetree242/youtube-chat","dist-tags":{"latest":"1.1.8"},"versions":{"1.1.4":{"name":"@bluetree242/youtube-chat","version":"1.1.4","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/FreeTubeApp/youtube-chat.git"},"bugs":{"url":"https://github.com/BlueTree242/youtube-chat/issues"},"homepage":"https://github.com/FreeTubeApp/youtube-chat#readme","author":{"name":"Svallinn","email":"svallinn@protonmail.com"},"contributors":[{"name":"LinaTsukusu","email":"lina.tsukusu@gmail.com"},{"name":"IcedCoffeee","url":"https://github.com/IcedCoffeee/"},{"name":"BlueTree242","url":"https://github.com/BlueTree242"}],"license":"MIT","private":false,"publishConfig":{"access":"public"},"scripts":{"build":"tsc","start":"NODE_ENV=production node dist","debug":"tsc && NODE_ENV=development node dist/debug.js","test":"jest --verbose"},"keywords":["youtube","chat","live-chat","livechat"],"devDependencies":{"@types/jest":"^29.1.2","@types/node":"^18.11.2","tsconfig-paths":"^4.1.0","typescript":"^5.0.4"},"dependencies":{"axios":"^1.1.3","tslib":"^2.4.0"},"gitHead":"ec963d61e03ca4563d7bd48dfc5a7e768b9c33d2","description":"> Fetch Youtube live chat without API","_id":"@bluetree242/youtube-chat@1.1.4","_nodeVersion":"18.14.2","_npmVersion":"9.6.0","dist":{"integrity":"sha512-g8SvysYunqa+3/gm5/r5nFI5ZCTamWAa7eiyuAPIbZCbG8zATxOP4KRTdcWH/LPo/7TXTljAwhgnzUndvKt+dQ==","shasum":"4e4ce9f6b56899f15c6c624fe0a62ef056b1de0e","tarball":"https://registry.npmjs.org/@bluetree242/youtube-chat/-/youtube-chat-1.1.4.tgz","fileCount":15,"unpackedSize":23643,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfnncvYedgeiPfATn1iuQHwGSdURsuiHqXOZHe6phbTQIhAKtqYtZpLs7s6I2ntSsEcNFwQE6Xsd/DZccNqZg0rMMF"}]},"_npmUser":{"name":"bluetree242","email":"yahiamsm2@gmail.com"},"directories":{},"maintainers":[{"name":"bluetree242","email":"yahiamsm2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/youtube-chat_1.1.4_1683817899734_0.4958889520963814"},"_hasShrinkwrap":false},"1.1.5":{"name":"@bluetree242/youtube-chat","version":"1.1.5","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/FreeTubeApp/youtube-chat.git"},"bugs":{"url":"https://github.com/BlueTree242/youtube-chat/issues"},"homepage":"https://github.com/FreeTubeApp/youtube-chat#readme","author":{"name":"Svallinn","email":"svallinn@protonmail.com"},"contributors":[{"name":"LinaTsukusu","email":"lina.tsukusu@gmail.com"},{"name":"IcedCoffeee","url":"https://github.com/IcedCoffeee/"},{"name":"BlueTree242","url":"https://github.com/BlueTree242"}],"license":"MIT","private":false,"publishConfig":{"access":"public"},"scripts":{"build":"tsc","start":"NODE_ENV=production node dist","debug":"tsc && NODE_ENV=development node dist/debug.js","test":"jest --verbose"},"keywords":["youtube","chat","live-chat","livechat"],"devDependencies":{"@types/jest":"^29.1.2","@types/node":"^18.11.2","tsconfig-paths":"^4.1.0","typescript":"^5.0.4"},"dependencies":{"axios":"^1.1.3","tslib":"^2.4.0"},"gitHead":"c7512b895ef2b49c1fadf1a177e8860ff8232fe1","description":"> Fetch Youtube live chat without API","_id":"@bluetree242/youtube-chat@1.1.5","_nodeVersion":"18.14.2","_npmVersion":"9.6.0","dist":{"integrity":"sha512-iIOP+qeY2l46wkG1wMo1hVqk2aMrInhZ3MaLInZhQTQrO7M1SiN1l+mEJRmGQjSo57ePtN/IENGekiZMbMlkjQ==","shasum":"114f199bc79635e9409deb365e019e8097837cea","tarball":"https://registry.npmjs.org/@bluetree242/youtube-chat/-/youtube-chat-1.1.5.tgz","fileCount":15,"unpackedSize":24334,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHIAwWU6WoQiPuKebAj5Td1l38N0NJUdGe1+/4iMSmEFAiBU2a5aNJ9KQosEht48nju45a3sRjsgdTL4tIbj0+L4cg=="}]},"_npmUser":{"name":"bluetree242","email":"yahiamsm2@gmail.com"},"directories":{},"maintainers":[{"name":"bluetree242","email":"yahiamsm2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/youtube-chat_1.1.5_1683818407836_0.9820048359253335"},"_hasShrinkwrap":false},"1.1.6":{"name":"@bluetree242/youtube-chat","version":"1.1.6","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/FreeTubeApp/youtube-chat.git"},"bugs":{"url":"https://github.com/BlueTree242/youtube-chat/issues"},"homepage":"https://github.com/FreeTubeApp/youtube-chat#readme","author":{"name":"Svallinn","email":"svallinn@protonmail.com"},"contributors":[{"name":"LinaTsukusu","email":"lina.tsukusu@gmail.com"},{"name":"IcedCoffeee","url":"https://github.com/IcedCoffeee/"},{"name":"BlueTree242","url":"https://github.com/BlueTree242"}],"license":"MIT","private":false,"publishConfig":{"access":"public"},"scripts":{"build":"tsc","start":"NODE_ENV=production node dist","debug":"tsc && NODE_ENV=development node dist/debug.js","test":"jest --verbose"},"keywords":["youtube","chat","live-chat","livechat"],"devDependencies":{"@types/jest":"^29.1.2","@types/node":"^18.11.2","tsconfig-paths":"^4.1.0","typescript":"^5.0.4"},"dependencies":{"axios":"^1.1.3","tslib":"^2.4.0"},"gitHead":"fda068c4b38845e8d830868ebcd0d546eaf46838","description":"> Fetch Youtube live chat without API","_id":"@bluetree242/youtube-chat@1.1.6","_nodeVersion":"18.14.2","_npmVersion":"9.6.0","dist":{"integrity":"sha512-/OSMOUuI8XMJb5quqz7M5lUe1jheOOZJTjZhw58nn74U6KIksBeeD6+FguxYxsKdqjOwfbH+OeJ5qDRssDCPpw==","shasum":"d682877c75622d64c60efa92d29fcf413ab7a544","tarball":"https://registry.npmjs.org/@bluetree242/youtube-chat/-/youtube-chat-1.1.6.tgz","fileCount":15,"unpackedSize":24431,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDw8iEjATau4ozm+fRq6wQIa18FdPPkmaH2tS36FMRdfQIgGs0mS379mjOdLGtm0s9rYsEe+QM38X7/z1ubebrjsh4="}]},"_npmUser":{"name":"bluetree242","email":"yahiamsm2@gmail.com"},"directories":{},"maintainers":[{"name":"bluetree242","email":"yahiamsm2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/youtube-chat_1.1.6_1683988988612_0.15198095698561986"},"_hasShrinkwrap":false},"1.1.7":{"name":"@bluetree242/youtube-chat","version":"1.1.7","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/FreeTubeApp/youtube-chat.git"},"bugs":{"url":"https://github.com/BlueTree242/youtube-chat/issues"},"homepage":"https://github.com/FreeTubeApp/youtube-chat#readme","author":{"name":"Svallinn","email":"svallinn@protonmail.com"},"contributors":[{"name":"LinaTsukusu","email":"lina.tsukusu@gmail.com"},{"name":"IcedCoffeee","url":"https://github.com/IcedCoffeee/"},{"name":"BlueTree242","url":"https://github.com/BlueTree242"}],"license":"MIT","private":false,"publishConfig":{"access":"public"},"scripts":{"build":"tsc","start":"NODE_ENV=production node dist","debug":"tsc && NODE_ENV=development node dist/debug.js","test":"jest --verbose"},"keywords":["youtube","chat","live-chat","livechat"],"devDependencies":{"@types/jest":"^29.1.2","@types/node":"^18.11.2","tsconfig-paths":"^4.1.0","typescript":"^5.0.4"},"dependencies":{"axios":"^1.1.3","tslib":"^2.4.0"},"gitHead":"3adf1dfad48360b259c64d448db7cb99ab89fd1f","description":"> Fetch Youtube live chat without API","_id":"@bluetree242/youtube-chat@1.1.7","_nodeVersion":"18.14.2","_npmVersion":"9.6.0","dist":{"integrity":"sha512-YY/G0j1we0ZjiU8ZgEVzHvjL8XyyQJF2sa3S9/NM7LQEg8H2vWSDrU/DKF5w5ubt/IoKOfZDvpLgAEv2t+VbnQ==","shasum":"50dbe9a34ade54303ae852bcc01967d6c0e27fd8","tarball":"https://registry.npmjs.org/@bluetree242/youtube-chat/-/youtube-chat-1.1.7.tgz","fileCount":15,"unpackedSize":24596,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtj1JywIHOBPhyO7lYgkRK5npUlPCZr/G3orJJmyb/2AiEAzWHuZ5RnuaHgFGfkvNdH8bvOIWSV5Ape9qIW0mpFjhc="}]},"_npmUser":{"name":"bluetree242","email":"yahiamsm2@gmail.com"},"directories":{},"maintainers":[{"name":"bluetree242","email":"yahiamsm2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/youtube-chat_1.1.7_1683989537319_0.6792521089369634"},"_hasShrinkwrap":false},"1.1.8":{"name":"@bluetree242/youtube-chat","version":"1.1.8","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/FreeTubeApp/youtube-chat.git"},"bugs":{"url":"https://github.com/BlueTree242/youtube-chat/issues"},"homepage":"https://github.com/FreeTubeApp/youtube-chat#readme","author":{"name":"Svallinn","email":"svallinn@protonmail.com"},"contributors":[{"name":"LinaTsukusu","email":"lina.tsukusu@gmail.com"},{"name":"IcedCoffeee","url":"https://github.com/IcedCoffeee/"},{"name":"BlueTree242","url":"https://github.com/BlueTree242"}],"license":"MIT","private":false,"publishConfig":{"access":"public"},"scripts":{"build":"tsc","start":"NODE_ENV=production node dist","debug":"tsc && NODE_ENV=development node dist/debug.js","test":"jest --verbose"},"keywords":["youtube","chat","live-chat","livechat"],"devDependencies":{"@types/jest":"^29.1.2","@types/node":"^18.11.2","tsconfig-paths":"^4.1.0","typescript":"^5.0.4"},"dependencies":{"axios":"^1.1.3","tslib":"^2.4.0"},"gitHead":"cc53c74d443c890d150c6cc14d11aa468ea7fe72","description":"> Fetch Youtube live chat without API","_id":"@bluetree242/youtube-chat@1.1.8","_nodeVersion":"18.14.2","_npmVersion":"9.6.0","dist":{"integrity":"sha512-GqmhwE1rvg7UTrBju0GKqFmL+avF3HOqBb8f0ZDFSAoVzDQdR0nUQB4WFVOCkeeNyNAOZnl8cn0ex7HHVKUweQ==","shasum":"455c782def6c7a0ed6d1e60248a12dcaae557af2","tarball":"https://registry.npmjs.org/@bluetree242/youtube-chat/-/youtube-chat-1.1.8.tgz","fileCount":15,"unpackedSize":24596,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/fVC0NM683Exe/zTyfBAuY87NaoBdDc47v98jTFXtKgIhAJ+oRxy/ZncaHY0jL0kLBKJgRAiMzoQIFdyrzooE4jNb"}]},"_npmUser":{"name":"bluetree242","email":"yahiamsm2@gmail.com"},"directories":{},"maintainers":[{"name":"bluetree242","email":"yahiamsm2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/youtube-chat_1.1.8_1683992721524_0.23784589867244876"},"_hasShrinkwrap":false}},"maintainers":[{"name":"bluetree242","email":"yahiamsm2@gmail.com"}],"description":"> Fetch Youtube live chat without API","homepage":"https://github.com/FreeTubeApp/youtube-chat#readme","keywords":["youtube","chat","live-chat","livechat"],"repository":{"type":"git","url":"git+https://github.com/FreeTubeApp/youtube-chat.git"},"contributors":[{"name":"LinaTsukusu","email":"lina.tsukusu@gmail.com"},{"name":"IcedCoffeee","url":"https://github.com/IcedCoffeee/"},{"name":"BlueTree242","url":"https://github.com/BlueTree242"}],"author":{"name":"Svallinn","email":"svallinn@protonmail.com"},"bugs":{"url":"https://github.com/BlueTree242/youtube-chat/issues"},"license":"MIT","readme":"# youtube-chat\r\n> Fetch Youtube live chat without API\r\n\r\nThis module is a fork of `youtube-chat`, which was written by [LinaTsukusu](https://github.com/LinaTsukusu) and fixed up by [IcedCoffeee](https://github.com/IcedCoffeee), then it was used for freetube.. and was fixed again by BlueTree242.\r\n\r\nSince all those people don't work on it anymore, i had to fix the bugs myself.\r\n\r\n***You will need to take full responsibility for your actions***\r\n\r\n## Getting started\r\n1. Install\r\n    - `npm i @freetube/youtube-chat`\r\n    - `yarn add @freetube/youtube-chat`\r\n2. Import\r\n    - Javascript\r\n    ```javascript\r\n    const LiveChat = require('@freetube/youtube-chat').LiveChat\r\n    ```\r\n    - Typescript\r\n    ```typescript\r\n    import {LiveChat} from '@freetube/youtube-chat'\r\n    ```\r\n3. Create instance with ChannelID or LiveID\r\n    ```javascript\r\n    // If channelId is specified, liveId in the current stream is automatically acquired.\r\n    const liveChat = new LiveChat({channelId: 'UCxkOLgdNumvVIQqn5ps_bJA?'})\r\n    \r\n    // Or specify LiveID in Stream manually.\r\n    const liveChat = new LiveChat({liveId: 'bc5DoKBZRIo'})\r\n    ```\r\n4. Add events\r\n    ```typescript\r\n    // Emit at start of observation chat.\r\n    // liveId: string\r\n    liveChat.on('start', (liveId) => {})\r\n   \r\n    // Emit at end of observation chat.\r\n    // reason: string?\r\n    liveChat.on('end', (reason) => {})\r\n    \r\n    // Emit at receive chat.\r\n    // comment: CommentItem\r\n    liveChat.on('comment', (comment) => {})\r\n    \r\n    // Emit when an error occurs\r\n    // err: Error\r\n    liveChat.on('error', (err) => {})\r\n    ```\r\n\r\n## Types\r\n### CommentItem\r\n```typescript\r\ninterface CommentItem {\r\n  id: string\r\n  author: {\r\n    name: string\r\n    thumbnail?: ImageItem\r\n    channelId: string\r\n    badge?: {\r\n      thumbnail: ImageItem\r\n      label: string\r\n    }\r\n  }\r\n  message: MessageItem[]\r\n  superchat?: {\r\n    amount: string\r\n    color: number\r\n  }\r\n  membership: boolean\r\n  isOwner: boolean\r\n  timestamp: number\r\n}\r\n```\r\n\r\n### MessageItem\r\n```typescript\r\ntype MessageItem = { text: string } | ImageItem\r\n```\r\n\r\n### ImageItem\r\n```typescript\r\ninterface ImageItem {\r\n  url: string\r\n  alt: string\r\n  width: number\r\n  height: number\r\n}\r\n```\r\n","readmeFilename":"README.md"}