1 Star 2 Fork 0

Ar-Sr-Na / ArLRC To HTML-纯前端原生带歌词音乐播放器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ArLRC To HTML-纯前端原生带歌词音乐播放器

原理参见:Ar-Sr-Na | 【教程】纯前端做一个歌词显示的音乐播放器

介绍

纯前端,轻量,使用方便嗷

安装教程

  1. 在您的HTML代码里添加一段
<script src="https://cdn.jsdelivr.net/gh/ArSrNa/lrc2html/js/arlrc2html.js"></script>

注:如果需要lrc转array,请再引用

<script src="https://cdn.jsdelivr.net/gh/ArSrNa/lrc2html/js/lrc2array.js"></script>
  1. 用法:HTML里添加一段

如果是JSON格式的歌词:

var json = {"time":"00:19.54","timeout":20 ,"lrc":"いつまでも忘れない best of my love"},{......}
arlrc.json(json,'音视频控件id','显示时间的控件ID','显示歌词的控件ID')
//这里的json就是你的歌词json变量,要求看下面

如果是Array格式的歌词:(不支持时间显示)

var array = [130,"どこまでも続く空"],[......],
arlrc.array(array,'音视频控件id','显示歌词的控件ID')
//这里的array就是你的歌词array变量,要求看下面

转换成array的lrc,请直接使用parseLyric(text) text是您的lrc文本

格式要求

json格式要求

{"time":"00:19.54","timeout":20 ,"lrc":"いつまでも忘れない best of my love"},
{"time":"lrc时间","timeout":时间秒数 ,"lrc":"歌词内容"},
对象 释义 类型
time lrc时间 string
timeout 时间秒数 number(K∈R)
lrc 歌词内容 string

Array格式要求

[33.65, "初めてよね? こんな風に手を繋いであなたと歩くの"]
[38.7, "初めてよね? こんな風に手を繋いであなたと歩くの"]
对象 释义 类型
[0] 秒数时间 number
[1] 歌词 string

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

此致 Ar-Sr-Na云计算项目- Ar-Sr-Na

MIT License Copyright (c) 2021 Ar-Sr-Na Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

纯前端,轻量,使用方便嗷 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/arsrna_admin/lrc2html.git
git@gitee.com:arsrna_admin/lrc2html.git
arsrna_admin
lrc2html
ArLRC To HTML-纯前端原生带歌词音乐播放器
master

搜索帮助