Package dev.lavalink.youtube.cipher
Class RemoteCipherManager
java.lang.Object
dev.lavalink.youtube.cipher.RemoteCipherManager
- All Implemented Interfaces:
CipherManager
Handles parsing and caching of ciphers via a remote service
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.lavalink.youtube.cipher.CipherManager
CipherManager.CachedPlayerScript -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRemoteCipherManager(@NotNull String remoteUrl) Create a new remote cipher manager -
Method Summary
Modifier and TypeMethodDescriptioncom.sedmelluq.discord.lavaplayer.tools.io.HttpInterfaceconfigureHttpInterface(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface) getCachedPlayerScript(@NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface) @NotNull StringgetTimestamp(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, String sourceUrl) @NotNull URIresolveFormatUrl(@NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull String playerScript, @NotNull StreamFormat format) Produces a valid playback URL for the specified track@NotNull StringvalidateAndGetResponseBody(@NotNull org.apache.http.HttpResponse response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.lavalink.youtube.cipher.CipherManager
getPlayerScript
-
Field Details
-
cachedPlayerScript
-
-
Constructor Details
-
RemoteCipherManager
Create a new remote cipher manager
-
-
Method Details
-
getRemoteUrl
-
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:
resolveFormatUrlin interfaceCipherManager- Parameters:
httpInterface- HTTP interface to useplayerScript- Address of the script which is used to decipher signaturesformat- 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:
getCachedPlayerScriptin interfaceCipherManager
-
getTimestamp
public String getTimestamp(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, String sourceUrl) throws IOException - Specified by:
getTimestampin interfaceCipherManager- Throws:
IOException
-
configureHttpInterface
public com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface configureHttpInterface(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface) -
validateAndGetResponseBody
@NotNull public @NotNull String validateAndGetResponseBody(@NotNull @NotNull org.apache.http.HttpResponse response) throws IOException - Throws:
IOException
-