Class SignatureCipherManager

java.lang.Object
dev.lavalink.youtube.cipher.SignatureCipherManager

public class SignatureCipherManager extends Object
Handles parsing and caching of signature ciphers
  • Field Details

  • Constructor Details

    • SignatureCipherManager

      public SignatureCipherManager()
      Create a new signature cipher manager
  • Method Details

    • 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
      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 SignatureCipherManager.CachedPlayerScript getCachedPlayerScript(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface)
    • getCipherScript

      public SignatureCipher getCipherScript(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String cipherScriptUrl) throws IOException
      Throws:
      IOException