<script src="https://unpkg.com/@yuhongbo1/lrc-player@2.0.0/lrc-player.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@yuhongbo1/lrc-player@2.0.0/lrc-player.css">
$ npm install @yuhongbo1/lrc-player
import LrcPlayer from 'path/to/@yuhongbo1/lrc-player';
const LrcPlayerClass = require("path/to/@yuhongbo1/lrc-player");
const player = LrcPlayer.init(lrcText);
player.play();
player.pause();
player.resume();
player.replay();
player.destroy();
player.setTimeSecond(seconds);
player.setTimeMillisecond(milliseconds);
在HTML播放器中,可以将本项目用于歌词滚动显示。
本项目可以将字幕纵向滚动显示,只需要将字幕按LRC格式编写即可。
本项目可以用作提词器,在直播、视频录制或音频录制场景中使用。
@misc{CNOCTAVE2025, author = {Yu Hongbo, }, title = {lrc-player}, year = {2025}, howpublished = {\url{https://github.com/CNOCTAVE/lrc-player}}, }
@techreport{CNOCTAVE2025, author = {Yu Hongbo, }, title = {lrc-player Document}, institution = {BA DU XIN SHANG}, year = {2025}, number = {16}, month = {6}, url = {https://cnoctave.github.io/lrc-player/index.html}, urldate = {2025-06-16}, }
@article{https://doi.org/10.31224/4702, doi = {10.31224/4702}, url = {https://engrxiv.org/preprint/view/4702}, author = {Yu Hongbo, }, keywords = {CNOCTAVE, lrc-player, LRC file, browser-based player, lyrics synchronization, open-source project}, title = {Exploring the Functionality and Applications of lrc-player: A Browser-Based LRC File Player}, publisher = {engrxiv}, year = {2025}, copyright = {Creative Commons Attribution 4.0 International} }