-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # src/comments/FlashComment.ts # src/definition/config.ts
- Loading branch information
Showing
17 changed files
with
1,130 additions
and
1,359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# [niconicomments](https://xpadev.net/niconicomments/) | ||
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/xpadev-net/niconicomments/blob/master/LICENSE) | ||
|
||
[English](https://github.com/xpadev-net/niconicomments/blob/develop/README.md) | ||
|
||
ニコニコ動画の公式プレイヤー互換の高パフォーマンスなコメント描画ライブラリ | ||
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 | ||
|
||
## [重要]このライブラリを使用される方へ | ||
ニコニコ運営が画面にコメントを流すアドオンを特許侵害だと騒ぎ立てて潰して回っているようです | ||
このライブラリ本体は描画部分のみのため特許侵害に当たるとは考えていませんが、ニコニコ動画運営(とその近辺の人)に叩かれる可能性があります | ||
(名前は出しませんがすでにいくつかのOSSに被害が出ています) | ||
また、このライブラリを使用するかどうかに関わらず、リアルタイムでコメントを取得、画面を描画、コメントの投稿という一連の流れを実装した場合、ニコニコの特許を侵害する可能性があります | ||
詳しくはこちら[ニコニコが保有する特許について](https://github.com/xpadev-net/niconicomments/blob/develop/ABOUT_PATENT.md)を参照してください | ||
**※当ライブラリを削除する予定は一切ありません** | ||
|
||
## Installation | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/@xpadev-net/niconicomments@latest/dist/bundle.min.js"></script> | ||
``` | ||
or | ||
``` | ||
npm i @xpadev-net/niconicomments | ||
``` | ||
|
||
## Examples | ||
```javascript | ||
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(Math.floor(video.currentTime * 100)), 10); | ||
``` | ||
|
||
## Sample | ||
[サンプル](https://xpadev-net.github.io/niconicomments/sample/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.