Array of media urls. May be empty in the case that the service does not provide streaming.
An array of the authors of the music track. For example, a YouTube channel or SoundCloud user profile
Duration of the track in seconds
Duration of the track in timestamp (e.g. 12:34
)
Is the track live-streaming? (e.g. a YouTube livestream)
An object containing additional metadata that may not always be included; e.g. the user that queued the track
Is the track deemed as explicit?
ID of the track on the platform (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ --> dQw4w9WgXcQ
)
A reference to the user that queued the track - Can be set via MusicTrack.setQueuedBy or modified manually
If the track wasn't streamable (e.g. Spotify), was the tracks audio replaced by an alternative source's track, and which service.
Name of the track
Original data retreieved from request to service's API. For debug and if theres any data not included in MusicTrack itself thats needed.
Has the track been playlisted?
The service providing track (e.g. YouTube)
Thumbnail URL of the track
Friendly URL of the track (e.g. https://youtube.com/watch?v=videoid)
Returns the best audio format.
Note: if SoundCloud is the service, Audio.url
is changed to a time sensitive URL due to SoundCloud APIs.
Note: if Spotify is the service, use resolveUnstreamableTrack()
to try and find an alternative track on YouTube.
Adds neccessary audio data to MusicTrack in the case it was not added.
Searches for the track on Genius and returns a GeniusSong. Contains data including lyrics.
If the track is not streamable (e.g. Spotify), attempts to find a track on an alternative source and overwrites the current audio with the new audio.
The tracks metadata.resolvedTo
property value will also be replaced with the resolved service.
Object containing the search query made (query
) and found track (result
) or undefined if couldn't find an alternative track
Returns a Prism Media FFmpeg object.
Number of seconds to seek in the track. Obviously defaults to 0
An array of extra arguments to pass to Prism when creating the FFmpeg object. Basically just your standard FFmpeg arguments but in array form. For example:
"-ar",
"48000",
"-ac",
"2"
Custom audio object to use instead of relying on {@link MusicTrack.bestAudio()}
Set who queued the track, for example the user's Discord ID
Generated using TypeDoc
An object that represents a music track.