Class YoutubeSignatureCipherManager
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSignatureCipherManager
-
- All Implemented Interfaces:
YoutubeSignatureResolver
public class YoutubeSignatureCipherManager extends java.lang.Object implements YoutubeSignatureResolver
Handles parsing and caching of signature ciphers
-
-
Constructor Summary
Constructors Constructor Description YoutubeSignatureCipherManager()Create a new signature cipher manager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description YoutubeSignatureCiphergetExtractedScript(HttpInterface httpInterface, java.lang.String cipherScriptUrl)java.lang.StringresolveDashUrl(HttpInterface httpInterface, java.lang.String playerScript, java.lang.String dashUrl)Produces a valid dash XML URL from the possibly ciphered URL.java.net.URIresolveFormatUrl(HttpInterface httpInterface, java.lang.String playerScript, YoutubeTrackFormat format)Produces a valid playback URL for the specified track
-
-
-
Method Detail
-
resolveFormatUrl
public java.net.URI resolveFormatUrl(HttpInterface httpInterface, java.lang.String playerScript, YoutubeTrackFormat format) throws java.io.IOException
Produces a valid playback URL for the specified track- Specified by:
resolveFormatUrlin interfaceYoutubeSignatureResolver- 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:
java.io.IOException- On network IO error
-
resolveDashUrl
public java.lang.String resolveDashUrl(HttpInterface httpInterface, java.lang.String playerScript, java.lang.String dashUrl) throws java.io.IOException
Produces a valid dash XML URL from the possibly ciphered URL.- Specified by:
resolveDashUrlin interfaceYoutubeSignatureResolver- Parameters:
httpInterface- HTTP interface instance to useplayerScript- Address of the script which is used to decipher signaturesdashUrl- URL of the dash XML, possibly with a ciphered signature- Returns:
- Valid dash XML URL
- Throws:
java.io.IOException- On network IO error
-
getExtractedScript
public YoutubeSignatureCipher getExtractedScript(HttpInterface httpInterface, java.lang.String cipherScriptUrl) throws java.io.IOException
- Specified by:
getExtractedScriptin interfaceYoutubeSignatureResolver- Throws:
java.io.IOException
-
-