jayasme/SpotlightLyrics

Does not start over from beginning

Closed this issue · 5 comments

Hi,
Thanks for the update, however, the problem remains same, when I use the following code, it still does not start over from the beginning of the lyrics,
lyricsView.timer.seek(toTime: 0)
lyricsView.timer.play()

It just resumes where it paused. Please help on this issue

Hi, coder-efay, please make sure that you are using the dependency of version 0.1.5, due to this version was just uploaded to the Cocoapods yesterday, you should update your pods cache via the command ‘pod update’ to update it to the latest and then run ‘pod install’. Meantime I’ll make a thorough check for my code, thanks for reply!

Hi, thanks for the response, however, the code still does not work after I did "pod update" and "pod install" . I saw your sources code that you only had the following change, which I do not think will fix the problem, because eplasedTime was not used.
screen shot 2019-03-01 at 10 37 16 pm

Please check your code and run the app and try it again.

lyricsView.timer.seek(toTime: 0) does not return to the beginning of the lyrics

Hi, coder-efay, it's weird, I've tested the latest dependency on the demo, everything works fine, may I disturb you to ask you few questions about the situation of your project?

  1. Do you call the timer.pause() function before you calling the timer.seek(toTime) function?
  2. Do you manually call the function scrollToTime of the lyricsView?
  3. Do you call any function which derives from UITableView or UIScrollView to the lyricsView?
  4. Do you re-assign the timer property of the lyricsView?

I am so appreciate to your cooperation and understanding!!

Thank you for answering, not sure what the problem was. however, the following code works this time as expected. Thanks again, this is a great library 👍 🥇

`
@IBAction func startButtonTapped(_ sender: Any) {

    // Start it over
    lyricsView.timer.seek(toTime: 0)
    lyricsView.timer.play()
    
}


@IBAction func stopButtonTapped(_ sender: Any) {
    
    
    /// Pause
    lyricsView.timer.pause()
}
`

I am so pleasure to help you, If you have any question please let me know.