Interface LyricsProvider

All Known Implementing Classes:
LocalLyrics

public interface LyricsProvider
Finds lyrics for a track. Called on a background thread of the library and may block; it is given one track at a time. Lyrics are copyrighted works: a provider is responsible for having the right to show what it returns.
  • Method Summary

    Modifier and Type
    Method
    Description
    find(Track track)
     
    default void
    onChange(Runnable listener)
    Registers a callback the provider runs when it may have new answers, so a failed lookup can be retried.
  • Method Details

    • find

      LyricsMatch find(Track track) throws Exception
      Returns:
      the best match, or null when there is none
      Throws:
      Exception - treated as "no match"
    • onChange

      default void onChange(Runnable listener)
      Registers a callback the provider runs when it may have new answers, so a failed lookup can be retried.