Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ustbhuangyi/lyric-parser
lyric-parser base on javascript
https://github.com/ustbhuangyi/lyric-parser
Last synced: 3 days ago
JSON representation
lyric-parser base on javascript
- Host: GitHub
- URL: https://github.com/ustbhuangyi/lyric-parser
- Owner: ustbhuangyi
- License: mit
- Created: 2017-03-20T04:16:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T15:20:32.000Z (about 5 years ago)
- Last Synced: 2024-04-14T06:33:52.210Z (7 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 524
- Watchers: 9
- Forks: 86
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lyric-parser
lyric-parser base on javascript## Install
```
npm install lyric-parser
```## Usage
```
import Lyric from 'lyric-parser'
let lyric = new Lyric(lyricStr, handler)function hanlder({lineNum, txt}){
// this hanlder called when lineNum change
}
```## API
#### play()
play the lyric
#### stop()
stop play
#### seek(startTime)
seek to correspond starTime
#### togglePlay()
toggle play state