Class YoutubeAudioSourceManager
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager
-
- All Implemented Interfaces:
AudioSourceManager,HttpConfigurable
@Deprecated public class YoutubeAudioSourceManager extends java.lang.Object implements AudioSourceManager, HttpConfigurable
Deprecated.Audio source manager that implements finding Youtube videos or playlists based on an URL or ID. This source manager is now deprecated. Please use youtube-source
-
-
Constructor Summary
Constructors Constructor Description YoutubeAudioSourceManager()Deprecated.YoutubeAudioSourceManager(boolean allowSearch, java.lang.String email, java.lang.String password)Deprecated.YoutubeAudioSourceManager(boolean allowSearch, java.lang.String email, java.lang.String password, YoutubeTrackDetailsLoader trackDetailsLoader, YoutubeSearchResultLoader searchResultLoader, YoutubeSearchMusicResultLoader searchMusicResultLoader, YoutubeSignatureResolver signatureResolver, YoutubePlaylistLoader playlistLoader, YoutubeLinkRouter linkRouter, YoutubeMixLoader mixLoader)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidconfigureBuilder(java.util.function.Consumer<org.apache.http.impl.client.HttpClientBuilder> configurator)Deprecated.voidconfigureRequests(java.util.function.Function<org.apache.http.client.config.RequestConfig,org.apache.http.client.config.RequestConfig> configurator)Deprecated.AudioTrackdecodeTrack(AudioTrackInfo trackInfo, java.io.DataInput input)Deprecated.Decodes an audio track from the encoded format encoded with encodeTrack().voidencodeTrack(AudioTrack track, java.io.DataOutput output)Deprecated.Encodes an audio track into the specified output.YoutubeAccessTokenTrackergetAccessTokenTracker()Deprecated.ExtendedHttpConfigurablegetHttpConfiguration()Deprecated.HttpInterfacegetHttpInterface()Deprecated.ExtendedHttpConfigurablegetMainHttpConfiguration()Deprecated.ExtendedHttpConfigurablegetSearchHttpConfiguration()Deprecated.ExtendedHttpConfigurablegetSearchMusicHttpConfiguration()Deprecated.YoutubeSignatureResolvergetSignatureResolver()Deprecated.java.lang.StringgetSourceName()Deprecated.Every source manager implementation should have its unique name as it is used to determine which source manager should be able to decode a serialized audio track.YoutubeTrackDetailsLoadergetTrackDetailsLoader()Deprecated.booleanisTrackEncodable(AudioTrack track)Deprecated.Returns whether the specified track can be encoded.AudioItemloadItem(AudioPlayerManager manager, AudioReference reference)Deprecated.Returns an audio track for the input string.AudioItemloadTrackWithVideoId(java.lang.String videoId, boolean mustExist)Deprecated.Loads a single track from video ID.voidsetPlaylistPageCount(int playlistPageCount)Deprecated.voidshutdown()Deprecated.Shut down the source manager, freeing all associated resources and threads.
-
-
-
Constructor Detail
-
YoutubeAudioSourceManager
@Deprecated public YoutubeAudioSourceManager()
Deprecated.Create an instance with default settings. This source manager is now deprecated. Please use youtube-source
-
YoutubeAudioSourceManager
@Deprecated public YoutubeAudioSourceManager(boolean allowSearch, java.lang.String email, java.lang.String password)Deprecated.Create an instance. This source manager is now deprecated. Please use youtube-source- Parameters:
allowSearch- Whether to allow search queries as identifiersemail- Email of Google account to auth in, required for playing age restricted trackspassword- Password of Google account to auth in, required for playing age restricted tracks
-
YoutubeAudioSourceManager
@Deprecated public YoutubeAudioSourceManager(boolean allowSearch, java.lang.String email, java.lang.String password, YoutubeTrackDetailsLoader trackDetailsLoader, YoutubeSearchResultLoader searchResultLoader, YoutubeSearchMusicResultLoader searchMusicResultLoader, YoutubeSignatureResolver signatureResolver, YoutubePlaylistLoader playlistLoader, YoutubeLinkRouter linkRouter, YoutubeMixLoader mixLoader)Deprecated.This source manager is now deprecated. Please use youtube-source
-
-
Method Detail
-
getTrackDetailsLoader
public YoutubeTrackDetailsLoader getTrackDetailsLoader()
Deprecated.
-
getSignatureResolver
public YoutubeSignatureResolver getSignatureResolver()
Deprecated.
-
setPlaylistPageCount
public void setPlaylistPageCount(int playlistPageCount)
Deprecated.- Parameters:
playlistPageCount- Maximum number of pages loaded from one playlist. There are 100 tracks per page.
-
getSourceName
public java.lang.String getSourceName()
Deprecated.Description copied from interface:AudioSourceManagerEvery source manager implementation should have its unique name as it is used to determine which source manager should be able to decode a serialized audio track.- Specified by:
getSourceNamein interfaceAudioSourceManager- Returns:
- The name of this source manager
-
loadItem
public AudioItem loadItem(AudioPlayerManager manager, AudioReference reference)
Deprecated.Description copied from interface:AudioSourceManagerReturns an audio track for the input string. It should return null if it can immediately detect that there is no track for this identifier for this source. If checking that requires more expensive operations, then it should return a track instance and check that in InternalAudioTrack#loadTrackInfo.- Specified by:
loadItemin interfaceAudioSourceManager- Parameters:
manager- The audio manager to attach to the loaded tracksreference- The reference with the identifier which the source manager should find the track with- Returns:
- The loaded item or null on unrecognized identifier
-
isTrackEncodable
public boolean isTrackEncodable(AudioTrack track)
Deprecated.Description copied from interface:AudioSourceManagerReturns whether the specified track can be encoded. The argument is always a track created by this manager. Being encodable also means that it must be possible to play this track on a different node, so it should not depend on any resources that are only available on the current system.- Specified by:
isTrackEncodablein interfaceAudioSourceManager- Parameters:
track- The track to check- Returns:
- True if it is encodable
-
encodeTrack
public void encodeTrack(AudioTrack track, java.io.DataOutput output)
Deprecated.Description copied from interface:AudioSourceManagerEncodes an audio track into the specified output. The contents of AudioTrackInfo do not have to be included since they are written to the output already before this call. This will only be called for tracks which were loaded by this source manager and for which isEncodable() returns true.- Specified by:
encodeTrackin interfaceAudioSourceManager- Parameters:
track- The track to encodeoutput- Output where to write the decoded format to
-
decodeTrack
public AudioTrack decodeTrack(AudioTrackInfo trackInfo, java.io.DataInput input)
Deprecated.Description copied from interface:AudioSourceManagerDecodes an audio track from the encoded format encoded with encodeTrack().- Specified by:
decodeTrackin interfaceAudioSourceManager- Parameters:
trackInfo- The track infoinput- The input where to read the bytes of the encoded format- Returns:
- The decoded track
-
shutdown
public void shutdown()
Deprecated.Description copied from interface:AudioSourceManagerShut down the source manager, freeing all associated resources and threads. A source manager is not responsible for terminating the tracks that it has created.- Specified by:
shutdownin interfaceAudioSourceManager
-
getAccessTokenTracker
public YoutubeAccessTokenTracker getAccessTokenTracker()
Deprecated.
-
getHttpInterface
public HttpInterface getHttpInterface()
Deprecated.- Returns:
- Get an HTTP interface for a playing track.
-
configureRequests
public void configureRequests(java.util.function.Function<org.apache.http.client.config.RequestConfig,org.apache.http.client.config.RequestConfig> configurator)
Deprecated.- Specified by:
configureRequestsin interfaceHttpConfigurable- Parameters:
configurator- Function to reconfigure request config.
-
configureBuilder
public void configureBuilder(java.util.function.Consumer<org.apache.http.impl.client.HttpClientBuilder> configurator)
Deprecated.- Specified by:
configureBuilderin interfaceHttpConfigurable- Parameters:
configurator- Function to reconfigure HTTP builder.
-
getHttpConfiguration
public ExtendedHttpConfigurable getHttpConfiguration()
Deprecated.
-
getMainHttpConfiguration
public ExtendedHttpConfigurable getMainHttpConfiguration()
Deprecated.
-
getSearchHttpConfiguration
public ExtendedHttpConfigurable getSearchHttpConfiguration()
Deprecated.
-
getSearchMusicHttpConfiguration
public ExtendedHttpConfigurable getSearchMusicHttpConfiguration()
Deprecated.
-
loadTrackWithVideoId
public AudioItem loadTrackWithVideoId(java.lang.String videoId, boolean mustExist)
Deprecated.Loads a single track from video ID.- Parameters:
videoId- ID of the YouTube video.mustExist- True if it should throw an exception on missing track, otherwise returns AudioReference.NO_TRACK.- Returns:
- Loaded YouTube track.
-
-