Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AudioPlayer

The instance to manage and play audio to discord

Hierarchy

Implemented by

Index

Properties

guildID

guildID: string

The linked connection guild id

manager

manager: AudioManager

The manager of the audio player

playbackDuration

playbackDuration: number

For how long this player has been playing audio (in ms)

playing

playing: boolean

Whether or not the audio player is playing audio.

status

status: AudioPlayerStatus

The discord player status

Methods

_switchCache

  • _switchCache(): void
  • Switch to playing cache instead of resource

    This method must not be used by user directly, it is used for custom player implementation to work with cache

    Returns void

filter

  • filter(): void

link

  • link(connection: VoiceConnection): void
  • Link the voice connection to the audio player

    Parameters

    • connection: VoiceConnection

      The voice connection

    Returns void

loop

  • loop(): boolean

pause

  • pause(forcePauseUnpause?: boolean): boolean

play

  • play(urlOrLocation: string, sourceType: number): Promise<void>
  • Play an audio

    Parameters

    • urlOrLocation: string

      The url or location of the audio source

    • sourceType: number

      The source type to identify the source

    Returns Promise<void>

seek

  • seek(seconds: number): Promise<void>

setFilter

  • setFilter(filter?: Filters): void

setManager

setVolume

  • setVolume(volume: number): void

stop

  • stop(): boolean

unlink

  • unlink(): void

Generated using TypeDoc