Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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