Class AndroidMusic

All Implemented Interfaces:
Client

public class AndroidMusic extends Android
  • Field Details

    • CLIENT_VERSION

      public static String CLIENT_VERSION
    • BASE_CONFIG

      public static ClientConfig BASE_CONFIG
  • Constructor Details

    • AndroidMusic

      public AndroidMusic()
    • AndroidMusic

      public AndroidMusic(@NotNull @NotNull ClientOptions options)
  • Method Details

    • getBaseClientConfig

      @NotNull protected @NotNull ClientConfig getBaseClientConfig(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface)
      Description copied from class: NonMusicClient
      Retrieves a base client config payload to be used for requests.
      Overrides:
      getBaseClientConfig in class Android
      Parameters:
      httpInterface - The HTTP interface to use for fetching a config, if applicable.
      Returns:
      A client configuration.
    • extractMixPlaylistData

      @NotNull protected @NotNull com.sedmelluq.discord.lavaplayer.tools.JsonBrowser extractMixPlaylistData(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.JsonBrowser json)
      Overrides:
      extractMixPlaylistData in class NonMusicClient
    • extractSearchResults

      @NotNull protected @NotNull List<com.sedmelluq.discord.lavaplayer.track.AudioTrack> extractSearchResults(@NotNull @NotNull YoutubeAudioSourceManager source, @NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.JsonBrowser json)
      Overrides:
      extractSearchResults in class NonMusicClient
    • extractAudioTrack

      @Nullable protected @Nullable com.sedmelluq.discord.lavaplayer.track.AudioTrack extractAudioTrack(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.JsonBrowser json, @NotNull @NotNull YoutubeAudioSourceManager source)
      Overrides:
      extractAudioTrack in class NonMusicClient
    • canHandleRequest

      public boolean canHandleRequest(@NotNull @NotNull String identifier)
      Description copied from interface: Client
      Returns a boolean determining whether this client can be used to handle requests for the given identifier.
      Specified by:
      canHandleRequest in interface Client
      Overrides:
      canHandleRequest in class NonMusicClient
      Parameters:
      identifier - The resource identifier. Could be an arbitrary string or a URL.
      Returns:
      True, if this client can handle the request.
    • getIdentifier

      @NotNull public @NotNull String getIdentifier()
      Specified by:
      getIdentifier in interface Client
      Overrides:
      getIdentifier in class Android
      Returns:
      The unique identifier for this client.
    • loadPlaylist

      public com.sedmelluq.discord.lavaplayer.track.AudioItem loadPlaylist(@NotNull @NotNull YoutubeAudioSourceManager source, @NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String playlistId, @Nullable @Nullable String selectedVideoId)
      Description copied from interface: Client
      Loads a playlist.
      Specified by:
      loadPlaylist in interface Client
      Overrides:
      loadPlaylist in class NonMusicClient
      Parameters:
      source - The source manager responsible for this client.
      httpInterface - The interface to use for requests.
      playlistId - The ID of the playlist.
      Returns:
      An AudioItem.