lrchelper
v0.0.6
Published
This is a package to parse lrc strings for your lyrics player.
Downloads
4
Readme
LrcHelper
Example
import { LRCHelper } from 'lrchelper';
const player = document.getElementById("player") // <audio> or <video>
const lyrics = "<LRC strings>"
const lrcHelper = new LRCHelper(player, lyrics)
const lyricsArray = lplayer.lyricsLists // get lines of lyrics
const l1 = lplayer.addUpdateListener(data => {
const index = data.index // index of line
const line = data.lyricString // lyrics line
const timeMs = timeMs // lyrics line in ms
const timeString = timeString // lyrics time in string
})