安装
npm install lyric-parser
用法
let lyric = new Lyric(lyricStr, handler)
function hanlder({lineNum, txt}){
// this hanlder called when lineNum change
}
API
//播放歌词
play()
//暂停歌词
stop()
//歌词跳转
seek(startTime)
//切换播放/暂停状态
toggelePlay()
原文地址
https://blog.csdn.net/qq_35844177/article/details/73381663
https://api.mlwei.com/ (公共接口)
网友评论