Class RemoteCipherManager

java.lang.Object
dev.lavalink.youtube.cipher.RemoteCipherManager
All Implemented Interfaces:
CipherManager

public class RemoteCipherManager extends Object implements CipherManager
Handles parsing and caching of ciphers via a remote proxy
  • Field Details

  • Constructor Details

    • RemoteCipherManager

      public RemoteCipherManager(String remoteUrl, @Nullable @Nullable String remotePass)
      Create a new remote cipher manager
  • Method Details

    • getRemoteUrl

      public String getRemoteUrl()
    • getRemotePass

      @Nullable public @Nullable String getRemotePass()
    • resolveFormatUrl

      @NotNull public @NotNull URI resolveFormatUrl(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String playerScript, @NotNull @NotNull StreamFormat format) throws IOException
      Produces a valid playback URL for the specified track
      Specified by:
      resolveFormatUrl in interface CipherManager
      Parameters:
      httpInterface - HTTP interface to use
      playerScript - Address of the script which is used to decipher signatures
      format - The track for which to get the URL
      Returns:
      Valid playback URL
      Throws:
      IOException - On network IO error
    • getCachedPlayerScript

      public CipherManager.CachedPlayerScript getCachedPlayerScript(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface)
      Specified by:
      getCachedPlayerScript in interface CipherManager
    • getTimestamp

      public String getTimestamp(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, String sourceUrl) throws IOException
      Specified by:
      getTimestamp in interface CipherManager
      Throws:
      IOException