@xpadev-net/niconicomments
TypeScript icon, indicating that this package has built-in type declarations

0.2.71 • Public • Published

niconicomments

GitHub license CodeQL TypeDoc

[English]

ニコニコ動画の公式プレイヤー互換の高パフォーマンスなコメント描画ライブラリ
High peformance High compatibility comment drawing library
Reference: https://xpadev-net.github.io/niconicomments/
Github: https://github.com/xpadev-net/niconicomments
npm: https://www.npmjs.com/package/@xpadev-net/niconicomments

Installation

<script src="https://cdn.jsdelivr.net/npm/@xpadev-net/niconicomments@latest/dist/bundle.min.js"></script>

or

npm i @xpadev-net/niconicomments

Examples

const canvas = document.getElementById("canvas");
const video = document.getElementById("video");
const req = await fetch("sample.json");
const res = await req.json();
const niconiComments = new NiconiComments(canvas, res);
//video.ontimeupdateを使用すると、呼び出し回数の関係でコメントカクつく
setInterval(
  () => niconiComments.drawCanvas(video.currentTime * 100),
  10
);

Sample

サンプル

このライブラリを使用される方へ

このライブラリを使用するかどうかに関わらず、リアルタイムでコメントを取得、画面を描画、コメントの投稿という一連の流れを実装した場合、ニコニコの特許を侵害する可能性があります
詳しくはこちらニコニコが保有する特許についてを参照してください

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.71
    4
    • latest

Version History

Package Sidebar

Install

npm i @xpadev-net/niconicomments

Weekly Downloads

10

Version

0.2.71

License

MIT

Unpacked Size

318 kB

Total Files

6

Last publish

Collaborators

  • xpadev-net