Giter Club home page Giter Club logo

xpadev-net / niconicomments Goto Github PK

View Code? Open in Web Editor NEW
69.0 4.0 5.0 10.65 MB

ニコニコ動画の公式プレイヤー互換の高パフォーマンスなコメント描画ライブラリ / High peformance High compatibility comment drawing library

Home Page: https://xpadev-net.github.io/niconicomments/

License: MIT License

JavaScript 1.27% TypeScript 98.34% Shell 0.05% Dockerfile 0.34%
javascript canvas niconico comment-viewer comments npm npm-package video danmaku comment-art

niconicomments's Introduction

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

サンプル

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.