Whether or not the node is connected to the websocket.
Connects to the server.
Decodes a track.
const identifier = 'QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA==';const track = await http.decode(identifier);console.log(track);// Logs: {// "identifier": "dQw4w9WgXcQ",// "isSeekable": true,// "author": "RickAstleyVEVO",// "length": 212000,// "isStream": false,// "position": 0,// "title": "Rick Astley - Never Gonna Give You Up",// "uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"// }
The track to be decoded.
Decodes multiple tracks.
This returns an array of Tracks, not a TrackInfo.
The tracks to be decoded.
Loads a song.
// Load from URL:const result = await node.load('https://www.youtube.com/watch?v=dQw4w9WgXcQ');console.log(result);// {// "loadType": "TRACK_LOADED",// "playlistInfo": {},// "tracks": [// {// "track": "QAAAjQIAJVJpY2sgQXN0bGV5IC0gTmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXAADlJpY2tBc3RsZXlWRVZPAAAAAAADPCAAC2RRdzR3OVdnWGNRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9ZFF3NHc5V2dYY1EAB3lvdXR1YmUAAAAAAAAAAA==",// "info": {// "identifier": "dQw4w9WgXcQ",// "isSeekable": true,// "author": "RickAstleyVEVO",// "length": 212000,// "isStream": false,// "position": 0,// "title": "Rick Astley - Never Gonna Give You Up",// "uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"// }// }// ]// }
// Load from YouTube search:const result = await node.load('ytsearch: Never Gonna Give You Up');console.log(result);// {// "loadType": "SEARCH_RESULT",// "playlistInfo": {},// "tracks": [// {// "track": "...",// "info": {// "identifier": "dQw4w9WgXcQ",// "isSeekable": true,// "author": "RickAstleyVEVO",// "length": 212000,// "isStream": false,// "position": 0,// "title": "Rick Astley - Never Gonna Give You Up",// "uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"// }// },// ...// ]// }
The track to be loaded.
Generated using TypeDoc
Whether or not the node is connected to the websocket.