Music() - Classes
Functions
Function download()
Download the music
Builder:
Music.download(format, quality)
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
format | The format of the music (Check available formats) | ✓ | |
quality | The quality of the music (Check available qualities) | ✓ |
Return: promise<any>
Function getLyrics()
Get the lyrics of the music if it's available
Builder:
Music.getLyrics()
Return: promise<{ lyrics: string; source: any; }>
Function getRadioPlaylist()
Get the radio playlist of the music
Builder:
Music.getRadioPlaylist()
Function getThumbnail()
Return Thumbnail with custom size
Builder:
Music.getThumbnail(width, height)
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
width | number | The width of the thumbnail | 𐄂 |
height | number | The height of the thumbnail | 𐄂 |
Return: Thumbnail
Properties
album
Return the album of the music if it's available
Builder:
Music.album
Return:Album
artists
An array of Artist objects
Builder:
Music.artists
artistsNames
Get the name of the artists separated by a comma
Builder:
Music.artistsNames
Return:string
browseID
The browseId of the music (NOT WORKING)
Builder:
Music.browseID
Return:string
duration
The duration of the music
Builder:
Music.duration
Return:Duration
id
The YTmusic id of the music
Builder:
Music.id
Return:string
isAudioOnly
If the music is audio only (considerably reduces the risk of unwanted sounds in the middle of a song)
Builder:
Music.isAudioOnly
Return:boolean
isExplicit
If the music contains explicit content
Builder:
Music.isExplicit
Return:boolean
isTopResult
Is defined as a top result by YouTube Music (but not always true. Please refer to searchRanking field)
Builder:
Music.isTopResult
Return:boolean
relativeBrowseID
The relative browseId of the music (used for fetching related songs)
Builder:
Music.relativeBrowseID
Return:string
resultType
The type of the video
Builder:
Music.resultType
Return:string
searchRanking
Search matching index
Builder:
Music.searchRanking
Return:number
thumbnails
An array of available Artwork in different sizes
Builder:
Music.thumbnails
title
The title of the music
Builder:
Music.title
Return:string
videoType
The YouTube type of the music
Builder:
Music.videoType
Return:string
year
The year of the music if it's available
Builder:
Music.year
Return:number