English
Appearance
Comment rendering library that is somewhat compatible with the official Nico Nico Douga player
NodeJS:
npm i @xpadev-net/niconicomments
Web:
<script src="https://cdn.jsdelivr.net/npm/@xpadev-net/niconicomments@0.5.0/dist/bundle.js"></script>
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); setInterval(() => niconiComments.drawCanvas(Math.floor(video.currentTime * 100)), 10);
const canvas = document.getElementById("canvas"); const video = document.getElementById("video"); const req = await fetch("sample.json"); const res = await req.json(); const renderer = new NiconiComments.internal.renderer.CanvasRenderer(canvas); const niconiComments = new NiconiComments(renderer, res); setInterval(() => niconiComments.drawCanvas(Math.floor(video.currentTime * 100)), 10);
This library may infringe on Dwango's patents depending on how it is used
Please carefully review the following applicable patents and case law before using this library with caution.
niconicomments
Comment rendering library that is somewhat compatible with the official Nico Nico Douga player
Links
Install
NodeJS:
Web:
Example
Using HTMLCanvasElement
Using CanvasRenderer
For users who use this library for domestic use in Japan
This library may infringe on Dwango's patents depending on how it is used
Please carefully review the following applicable patents and case law before using this library with caution.