GuildQueuePlayerNode
new GuildQueuePlayerNode(queue)
Parameter | Type | Optional | Description |
---|---|---|---|
queue | GuildQueue<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
Parameter | Type | Optional | Description |
---|---|---|---|
stream | string | Readable | β | - |
track | Track | β | - |
seek | number | β | - |
cookies | string | β | - |
private #createGenericStream(track): Promise<null | string | Readable>
Parameter | Type | Optional | Description |
---|---|---|---|
track | Track | β | - |
private #performPlay(resource): Promise<void>
Parameter | Type | Optional | Description |
---|---|---|---|
resource | AudioResource<Track> | β | - |
public createProgressBar(options?): null | string
Create progress bar for current progress
Parameter | Type | Optional | Description |
---|---|---|---|
options | PlayerProgressbarOptions | β | Progress bar options |
public getDurationMultiplier(): number
Get duration multiplier
public getTimestamp(ignoreFilters): null | PlayerTimestamp
Get stream progress
Parameter | Type | Optional | Description |
---|---|---|---|
ignoreFilters | boolean | β | Ignore filters |
public getTrackPosition(track): number
Get track position
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | β | The track |
public insert(track, index): void
Insert a track on the given position in queue
Parameter | Type | Optional | Description |
---|---|---|---|
track | Track | β | The track to insert |
index | number | β | 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
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | β | 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
Parameter | Type | Optional | Description |
---|---|---|---|
res | Track | β | The track to play |
options | ResourcePlayOptions | β | Options for playing the track |
public playRaw(resource): Promise<void>
Play raw audio resource
Parameter | Type | Optional | Description |
---|---|---|---|
resource | AudioResource<unknown> | β | The audio resource to play |
public remove(track): null | Track
Remove the given track from queue
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | β | The track to remove |
public resetProgress(): void
Reset progress history
public resume(): boolean
Resume the playback
public seek(duration): Promise<boolean>
Seek the player
Parameter | Type | Optional | Description |
---|---|---|---|
duration | number | β | The duration to seek to |
public setBitrate(rate): void
Set bit rate
Parameter | Type | Optional | Description |
---|---|---|---|
rate | number | 'auto' | β | The bit rate to set |
public setPaused(state): boolean
Set paused state
Parameter | Type | Optional | Description |
---|---|---|---|
state | boolean | β | The state |
public setVolume(vol): boolean
Set volume
Parameter | Type | Optional | Description |
---|---|---|---|
vol | number | β | Volume amount to set |
public skip(): boolean
Skip current track
public skipTo(track): boolean
Skip to the given track, removing others on the way
Parameter | Type | Optional | Description |
---|---|---|---|
track | TrackResolvable | β | The track to skip to |
public stop(force): boolean
Stop the playback
Parameter | Type | Optional | Description |
---|---|---|---|
force | boolean | β | Whether or not to forcefully stop the playback |