Documentation
Classes
discord-player
GuildQueuePlayerNode

GuildQueuePlayerNode

new GuildQueuePlayerNode(queue)
ParameterTypeOptionalDescription
queueGuildQueue<Meta>❌-

Properties

private #progress: number

public queue: GuildQueue<Meta>

public estimatedDuration: number

Estimated total duration of the player

public estimatedPlaybackTime: number

Estimated progress of the player

public playbackTime: number

Current playback duration with history included

public streamTime: number

The stream time for current session

public volume: number

Current volume

Methods

private #createFFmpegStream(stream, track, seek, cookies?): Readable

ParameterTypeOptionalDescription
streamstring | Readable❌-
trackTrack❌-
seeknumber❌-
cookiesstringβœ…-

private #createGenericStream(track): Promise<null | string | Readable>

ParameterTypeOptionalDescription
trackTrack❌-

private #performPlay(resource): Promise<void>

ParameterTypeOptionalDescription
resourceAudioResource<Track>❌-

public createProgressBar(options?): null | string

Create progress bar for current progress

ParameterTypeOptionalDescription
optionsPlayerProgressbarOptionsβœ…Progress bar options

public getDurationMultiplier(): number

Get duration multiplier

public getTimestamp(ignoreFilters): null | PlayerTimestamp

Get stream progress

ParameterTypeOptionalDescription
ignoreFiltersboolean❌Ignore filters

public getTrackPosition(track): number

Get track position

ParameterTypeOptionalDescription
trackTrackResolvable❌The track

public insert(track, index): void

Insert a track on the given position in queue

ParameterTypeOptionalDescription
trackTrack❌The track to insert
indexnumber❌The position to insert to, defaults to 0.

public isBuffering(): boolean

If the player is currently buffering the track

public isIdle(): boolean

If the player is currently in idle mode

public isPaused(): boolean

If the player is currently paused

public isPlaying(): boolean

If the player is currently playing a track

public jump(track): boolean

Jump to specific track on the queue

ParameterTypeOptionalDescription
trackTrackResolvable❌The track to jump to without removing other tracks

public pause(): boolean

Pause the playback

public play(res?, options?): Promise<void>

Play the given track

ParameterTypeOptionalDescription
resTrackβœ…The track to play
optionsResourcePlayOptionsβœ…Options for playing the track

public playRaw(resource): Promise<void>

Play raw audio resource

ParameterTypeOptionalDescription
resourceAudioResource<unknown>❌The audio resource to play

public remove(track): null | Track

Remove the given track from queue

ParameterTypeOptionalDescription
trackTrackResolvable❌The track to remove

public resetProgress(): void

Reset progress history

public resume(): boolean

Resume the playback

public seek(duration): Promise<boolean>

Seek the player

ParameterTypeOptionalDescription
durationnumber❌The duration to seek to

public setBitrate(rate): void

Set bit rate

ParameterTypeOptionalDescription
ratenumber | 'auto'❌The bit rate to set

public setPaused(state): boolean

Set paused state

ParameterTypeOptionalDescription
stateboolean❌The state

public setVolume(vol): boolean

Set volume

ParameterTypeOptionalDescription
volnumber❌Volume amount to set

public skip(): boolean

Skip current track

public skipTo(track): boolean

Skip to the given track, removing others on the way

ParameterTypeOptionalDescription
trackTrackResolvable❌The track to skip to

public stop(force): boolean

Stop the playback

ParameterTypeOptionalDescription
forceboolean❌Whether or not to forcefully stop the playback