Class WebEmbedded

All Implemented Interfaces:
Client

public class WebEmbedded extends Web
  • Field Details

  • Constructor Details

    • WebEmbedded

      public WebEmbedded()
    • WebEmbedded

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

    • setPoTokenAndVisitorData

      public static void setPoTokenAndVisitorData(String poToken, String visitorData)
    • isEmbedded

      public boolean isEmbedded()
    • transformPlaybackUri

      @NotNull public @NotNull URI transformPlaybackUri(@NotNull @NotNull URI originalUri, @NotNull @NotNull URI resolvedPlaybackUri)
      Description copied from interface: Client
      Transforms a given playback URL as necessary. For example, you can add query parameters or resolve any challenge parameters that might be needed.
      Specified by:
      transformPlaybackUri in interface Client
      Overrides:
      transformPlaybackUri in class Web
      Parameters:
      originalUri - The original stream URI. This will be completely unmodified, and is provided as it has been received from YouTube.
      resolvedPlaybackUri - The playback URI. This will have already been transformed by the SignatureCipherManager.
      Returns:
      The new playback URI.
    • getBaseClientConfig

      @NotNull public @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 Web
      Parameters:
      httpInterface - The HTTP interface to use for fetching a config, if applicable.
      Returns:
      A client configuration.
    • getIdentifier

      @NotNull public @NotNull String getIdentifier()
      Specified by:
      getIdentifier in interface Client
      Overrides:
      getIdentifier in class Web
      Returns:
      The unique identifier for this client.
    • 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.
    • loadSearch

      public com.sedmelluq.discord.lavaplayer.track.AudioItem loadSearch(@NotNull @NotNull YoutubeAudioSourceManager source, @NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String searchQuery)
      Description copied from interface: Client
      Loads search results for a query.
      Specified by:
      loadSearch in interface Client
      Overrides:
      loadSearch in class NonMusicClient
      Parameters:
      source - The source manager responsible for this client.
      httpInterface - The interface to use for requests.
      searchQuery - The search query.
      Returns:
      An AudioItem.
    • 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.
    • loadMix

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