GithubHelp home page GithubHelp logo

lyric-parser's Issues

调用seek()方法,handler会从头开始播放

写法:
if (lyric){
lyric.seek(this.data.processValue);
}
processValue:整数和浮点数都不行
调用这句话的时候,handler回调还是会从0 开始,应该怎么才能继续播放呢?

求解答,谢谢

使用网易云音乐API返回的歌词,调用play()后歌词不会滚动

lyric.js

this.lines.push({
time: parseInt(result[1]) * 60 * 1000 +
        parseInt(result[2]) * 1000 +
        (parseInt(result[3]) || 0),
txt: txt
});

这个插件的针对网易云音乐API的返回歌词格式的时间计算有bug,本来JS字符串遇到 * 会自动转换成数字,但是在这里自动转换会有bug,需要将源码中的上述转换 时分秒 到 毫秒 的代码,全部手动parseInt()转换成数字

该bug可导致:
play() 函数调用后,歌词好像不会滚动

看了源码之后:
和我之前猜想的一样,内部的计时器setTimeout,并不是没有调用,而是因为歌词间隔时间计算bug,导致delay--间隔时间很大,毫秒转换多了一个或几个 0 ,导致短时间内看不到滚动

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.