Type aliases
AccountDetails
AccountDetails: { bgColor: string; icon: string; id: string; loggedIn: boolean; name: string; packageName: string; username?: string; signinCallback: any; signoutCallback: any }
Type declaration
bgColor: string
icon: string
id: string
loggedIn: boolean
name: string
packageName: string
Optional username?: string
signinCallback:function
- signinCallback(): void | Promise<void>
Returns void | Promise<void>
signoutCallback:function
- signoutCallback(): void | Promise<void>
Returns void | Promise<void>
ContextMenuTypes
ContextMenuTypes: "SONGS" | "GENERAL_SONGS" | "PLAYLIST" | "GENERAL_PLAYLIST" | "PLAYLIST_CONTENT" | "QUEUE_ITEM" | "ARTIST" | "ALBUM" | "CURRENT_SONG"
CustomRequestReturnType
CustomRequestReturnType: { data?: Buffer; mimeType?: string; redirectUrl?: string }
Type declaration
Optional data?: Buffer
Optional mimeType?: string
Optional redirectUrl?: string
EntityApiOptions
Entity
Api
Options<T>
: { inclusive
?: boolean; invert
?: boolean } & (T extends Artists ? { artist
: Partial<Artists> | boolean } : T extends Album ? { album
: Partial<Album> | boolean } : T extends Genre ? { genre
: Partial<Genre> | boolean } : T extends Playlist ? { playlist
: Partial<Playlist> | boolean } : Record<string, never>)Type parameters
ExtensionContextMenuHandlerArgs
Extension
Context
Menu
Handler
Args<T>
: T extends "SONGS" ? Song[] : T extends "PLAYLIST" ? Playlist : T extends "PLAYLIST_CONTENT" ? Song[] : T extends "QUEUE_ITEM" ? Song : T extends "ARTIST" ? Artists : T extends "ALBUM" ? Album : T extends "CURRENT_SONG" ? Song : undefinedType parameters
ExtensionContextMenuItem
Extension
Context
Menu
Item<T>
: { children
?: ExtensionContextMenuItem<T>[]; disabled
?: boolean; label
: string; type
: T; handler
?: any }Type parameters
Type declaration
Optional disabled?: boolean
label: string
type: T
handler?:function
ExtensionPreferenceGroup
Extension
Preference
Group
: { description
?: string; index
?: number; key
: string; title
?: string } & ({ items
: Checkbox[]; type
: "CheckboxGroup" } | { default
: string; inputType
?: "text" | "number" | "password" | "url"; type
: "EditText" } | { default
: string; type
: "FilePicker" } | { default
: PathGroup[]; type
: "DirectoryGroup" } | { items
: Buttons[]; type
: "ButtonGroup" } | { default
: number; type
: "ProgressBar" } | { default
: string; type
: "TextField" } | { default
: string; type
: "InfoField" })ExtraExtensionEventData
Extra
Extension
Event
Data<T>
: T extends "requestedPlaylistSongs" ? [playlistID
: string, invalidateCache
: boolean, nextPageToken
: unknown | undefined] : T extends "requestedPlaylists" ? [invalidateCache
: boolean] : T extends "oauthCallback" ? [url
: string] : T extends "songQueueChanged" ? [songQueue
: SongQueue] : T extends "seeked" ? [newTime
: number] : T extends "volumeChanged" ? [newVolume
: number] : T extends "playerStateChanged" ? [newState
: PlayerState] : T extends "songChanged" ? [song
: Song] : T extends "preferenceChanged" ? [preference
: { key
: string; value
: unknown }] : T extends "playbackDetailsRequested" ? [song
: Song] : T extends "customRequest" ? [url
: string] : T extends "requestedSongFromURL" ? [url
: string, invalidateCache
: boolean] : T extends "requestedPlaylistFromURL" ? [url
: string, invalidateCache
: boolean] : T extends "requestedSearchResult" ? [term
: string] : T extends "requestedLyrics" ? [song
: Song] : T extends "requestedArtistSongs" ? [artist
: Artists, nextPageToken
: unknown | undefined] : T extends "requestedAlbumSongs" ? [album
: Album, nextPageToken
: unknown | undefined] : T extends "songAdded" | "songRemoved" ? [songs
: Song[]] : T extends "playlistAdded" | "playlistRemoved" ? [playlists
: Playlist[]] : T extends "requestedSongFromId" ? [id
: string] : T extends "getRemoteURL" ? [song
: Song] : never[]Type parameters
ExtraExtensionEventReturnType
Type parameters
ExtraExtensionEventTypes
ExtraExtensionEventTypes: "requestedPlaylists" | "requestedPlaylistSongs" | "oauthCallback" | "songQueueChanged" | "seeked" | "volumeChanged" | "playerStateChanged" | "songChanged" | "preferenceChanged" | "playbackDetailsRequested" | "customRequest" | "requestedSongFromURL" | "requestedPlaylistFromURL" | "requestedSearchResult" | "requestedRecommendations" | "requestedLyrics" | "requestedArtistSongs" | "requestedAlbumSongs" | "songAdded" | "songRemoved" | "playlistAdded" | "playlistRemoved" | "requestedSongFromId" | "getRemoteURL"
ForwardRequestReturnType
Forward
Request
Return
Type<T>
: { forwardTo
: "youtube" | "spotify" | string; transformedData
?: ExtraExtensionEventData<T> }Type parameters
Type declaration
forwardTo: "youtube" | "spotify" | string
LoginModalOptions
LoginModalOptions: { providerColor: string; providerName: string; text?: string; url?: string } & ({ manualClick: true; oauthPath: string } | { manualClick?: false; oauthPath?: string })
PlaybackDetailsReturnType
PlaybackDetailsReturnType: { duration: number; url: string }
Type declaration
duration: number
url: string
PlayerState
PlayerState: "PLAYING" | "PAUSED" | "STOPPED" | "LOADING"
PlayerTypes
PlayerTypes: "LOCAL" | "YOUTUBE" | "SPOTIFY" | "URL" | "DASH" | "HLS"
PlaylistAndSongsReturnType
Playlist
And
Songs
Return
Type
: { playlist
: Playlist; songs
: Song[] }PlaylistReturnType
Playlist
Return
Type
: { playlists
: Playlist[] }RecommendationsReturnType
Recommendations
Return
Type
: { songs
: Song[] }SongReturnType
Song
Return
Type
: { song
: Song }SongSortOptions
Song
Sort
Options
: { asc
: boolean; type
: keyof Song }Type declaration
asc: boolean
type: keyof Song
SongsReturnType
Songs
Return
Type
: { songs
: Song[] }SongsWithPageTokenReturnType
Songs
With
Page
Token
Return
Type
: { nextPageToken
?: unknown; songs
: Song[] }Type declaration
Optional nextPageToken?: unknown
songs: Song[]
Options for searching entities like Albums, Artists, Playlists or Genre