Skip to content

Music() - Classes


Properties

album
artists
artistsNames
browseID
duration
id
isAudioOnly
isExplicit
isTopResult
relativeBrowseID
resultType
searchRanking
thumbnails
title
videoType
year

Functions

download
getLyrics
getRadioPlaylist
getThumbnail

Functions

Function download()

Download the music

Builder:

javascript
Music.download(format, quality)

Parameters

ParameterTypeDescriptionOptional
formatThe format of the music (Check available formats)
qualityThe quality of the music (Check available qualities)

Return:  promiseLink<any>

Function getLyrics()

Get the lyrics of the music if it's available

Builder:

javascript
Music.getLyrics()

Return:  promiseLink<{ lyrics: string; source: any; }>

Function getRadioPlaylist()

Get the radio playlist of the music

Builder:

javascript
Music.getRadioPlaylist()

Return:  promiseLink<Playlist>

Function getThumbnail()

Return Thumbnail with custom size

Builder:

javascript
Music.getThumbnail(width, height)

Parameters

ParameterTypeDescriptionOptional
widthnumberLinkThe width of the thumbnail𐄂
heightnumberLinkThe height of the thumbnail𐄂

Return:  Thumbnail

Properties

album

Return the album of the music if it's available

Builder:

javascript
Music.album

Return:Album

artists

An array of Artist objects

Builder:

javascript
Music.artists

Return:arrayLink<Artist>

artistsNames

Get the name of the artists separated by a comma

Builder:

javascript
Music.artistsNames

Return:stringLink

browseID

The browseId of the music (NOT WORKING)

Builder:

javascript
Music.browseID

Return:stringLink

duration

The duration of the music

Builder:

javascript
Music.duration

Return:Duration

id

The YTmusic id of the music

Builder:

javascript
Music.id

Return:stringLink

isAudioOnly

If the music is audio only (considerably reduces the risk of unwanted sounds in the middle of a song)

Builder:

javascript
Music.isAudioOnly

Return:booleanLink

isExplicit

If the music contains explicit content

Builder:

javascript
Music.isExplicit

Return:booleanLink

isTopResult

Is defined as a top result by YouTube Music (but not always true. Please refer to searchRanking field)

Builder:

javascript
Music.isTopResult

Return:booleanLink

relativeBrowseID

The relative browseId of the music (used for fetching related songs)

Builder:

javascript
Music.relativeBrowseID

Return:stringLink

resultType

The type of the video

Builder:

javascript
Music.resultType

Return:stringLink

searchRanking

Search matching index

Builder:

javascript
Music.searchRanking

Return:numberLink

thumbnails

An array of available Artwork in different sizes

Builder:

javascript
Music.thumbnails

Return:arrayLink<Thumbnail>

title

The title of the music

Builder:

javascript
Music.title

Return:stringLink

videoType

The YouTube type of the music

Builder:

javascript
Music.videoType

Return:stringLink

year

The year of the music if it's available

Builder:

javascript
Music.year

Return:numberLink