Class LocalSignatureCipherManager

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

public class LocalSignatureCipherManager extends Object implements CipherManager
Handles parsing and caching of signature ciphers
  • Field Details

  • Constructor Details

    • LocalSignatureCipherManager

      public LocalSignatureCipherManager()
      Create a new local 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
      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
    • getRawScript

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

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

      public String getScriptTimestamp(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, String script, String scriptUrl)