Package dev.lavalink.youtube.clients
Class Tv
java.lang.Object
dev.lavalink.youtube.clients.skeleton.NonMusicClient
dev.lavalink.youtube.clients.skeleton.StreamingNonMusicClient
dev.lavalink.youtube.clients.Tv
- All Implemented Interfaces:
Client
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.lavalink.youtube.clients.skeleton.Client
Client.PlayabilityStatus -
Field Summary
FieldsFields inherited from class dev.lavalink.youtube.clients.skeleton.StreamingNonMusicClient
DEFAULT_SIGNATURE_KEYFields inherited from class dev.lavalink.youtube.clients.skeleton.NonMusicClient
MOBILE_PLAYER_PARAMS, playlistPageCount, WEB_PLAYER_PARAMSFields inherited from interface dev.lavalink.youtube.clients.skeleton.Client
API_BASE_URL, BROWSE_URL, MUSIC_API_BASE_URL, MUSIC_SEARCH_PARAMS, MUSIC_SEARCH_URL, NEXT_URL, OAUTH_CLIENT_ATTRIBUTE, PLAYER_URL, SEARCH_PARAMS, SEARCH_URL, WATCH_URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandleRequest(@NotNull String identifier) Returns a boolean determining whether this client can be used to handle requests for the given identifier.protected @NotNull ClientConfiggetBaseClientConfig(@NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface) Retrieves a base client config payload to be used for requests.@NotNull String@NotNull ClientOptions@NotNull Stringcom.sedmelluq.discord.lavaplayer.track.AudioItemloadMix(@NotNull YoutubeAudioSourceManager source, @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull String mixId, @Nullable String selectedVideoId) Loads a mix playlist.com.sedmelluq.discord.lavaplayer.track.AudioItemloadPlaylist(@NotNull YoutubeAudioSourceManager source, @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull String playlistId, @Nullable String selectedVideoId) Loads a playlist.com.sedmelluq.discord.lavaplayer.track.AudioItemloadSearch(@NotNull YoutubeAudioSourceManager source, @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull String searchQuery) Loads search results for a query.com.sedmelluq.discord.lavaplayer.track.AudioItemloadVideo(@NotNull YoutubeAudioSourceManager source, @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull String videoId) Loads a single video.booleanMethods inherited from class dev.lavalink.youtube.clients.skeleton.StreamingNonMusicClient
extractFormat, loadFormatsMethods inherited from class dev.lavalink.youtube.clients.skeleton.NonMusicClient
extractAudioTrack, extractMixPlaylistData, extractPlaylistContinuationToken, extractPlaylistContinuationVideos, extractPlaylistError, extractPlaylistName, extractPlaylistTracks, extractPlaylistVideoList, extractSearchResults, loadJsonResponse, loadMixResult, loadPlaylistResult, loadSearchMusic, loadSearchResults, loadTrackInfoFromInnertube, loadTrackInfoFromInnertube, setPlaylistPageCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.lavalink.youtube.clients.skeleton.Client
buildAudioTrack, findSelectedTrack, getPlayabilityStatus, getUnplayableReason, isEmbedded, requirePlayerScript, supportsFormatLoading, transformPlaybackUri
-
Field Details
-
BASE_CONFIG
-
options
-
-
Constructor Details
-
Tv
public Tv() -
Tv
-
-
Method Details
-
getBaseClientConfig
@NotNull protected @NotNull ClientConfig getBaseClientConfig(@NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface) Description copied from class:NonMusicClientRetrieves a base client config payload to be used for requests.- Specified by:
getBaseClientConfigin classNonMusicClient- Parameters:
httpInterface- The HTTP interface to use for fetching a config, if applicable.- Returns:
- A client configuration.
-
getPlayerParams
- Returns:
- The parameters to use for playback. May be
null, which will avoid populating the "params" field in payloads.
-
getOptions
-
canHandleRequest
Description copied from interface:ClientReturns a boolean determining whether this client can be used to handle requests for the given identifier.- Specified by:
canHandleRequestin interfaceClient- Overrides:
canHandleRequestin classNonMusicClient- Parameters:
identifier- The resource identifier. Could be an arbitrary string or a URL.- Returns:
- True, if this client can handle the request.
-
supportsOAuth
public boolean supportsOAuth()- Returns:
- True, if this client supports account linking via OAuth (i.e. TV)
-
getIdentifier
- Returns:
- The unique identifier for this client.
-
loadPlaylist
public com.sedmelluq.discord.lavaplayer.track.AudioItem loadPlaylist(@NotNull @NotNull YoutubeAudioSourceManager source, @NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String playlistId, @Nullable @Nullable String selectedVideoId) Description copied from interface:ClientLoads a playlist.- Specified by:
loadPlaylistin interfaceClient- Overrides:
loadPlaylistin classNonMusicClient- Parameters:
source- The source manager responsible for this client.httpInterface- The interface to use for requests.playlistId- The ID of the playlist.- Returns:
- An AudioItem.
-
loadVideo
public com.sedmelluq.discord.lavaplayer.track.AudioItem loadVideo(@NotNull @NotNull YoutubeAudioSourceManager source, @NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String videoId) throws CannotBeLoaded, IOException Description copied from interface:ClientLoads a single video.- Specified by:
loadVideoin interfaceClient- Overrides:
loadVideoin classNonMusicClient- Parameters:
source- The source manager responsible for this client.httpInterface- The interface to use for requests.videoId- The ID of the video to load.- Returns:
- An AudioItem.
- Throws:
CannotBeLoaded- If a video doesn't exist etc.IOException
-
loadMix
public com.sedmelluq.discord.lavaplayer.track.AudioItem loadMix(@NotNull @NotNull YoutubeAudioSourceManager source, @NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String mixId, @Nullable @Nullable String selectedVideoId) Description copied from interface:ClientLoads a mix playlist.- Specified by:
loadMixin interfaceClient- Overrides:
loadMixin classNonMusicClient- Parameters:
source- The source manager responsible for this client.httpInterface- The interface to use for requests.mixId- The ID of the mix.- Returns:
- An AudioItem.
-
loadSearch
public com.sedmelluq.discord.lavaplayer.track.AudioItem loadSearch(@NotNull @NotNull YoutubeAudioSourceManager source, @NotNull @NotNull com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface httpInterface, @NotNull @NotNull String searchQuery) Description copied from interface:ClientLoads search results for a query.- Specified by:
loadSearchin interfaceClient- Overrides:
loadSearchin classNonMusicClient- Parameters:
source- The source manager responsible for this client.httpInterface- The interface to use for requests.searchQuery- The search query.- Returns:
- An AudioItem.
-