Creates an audio resource that can be played by audio players.
Remarks
If the input is given as a string, then the inputType option will be overridden and FFmpeg will be used.If the input is not in the correct format, then a pipeline of transcoders and transformers will be created to ensure that the resultant stream is in the correct format for playback. This could involve using FFmpeg, Opus transcoders, and Ogg/WebM demuxers.Name | Constraints | Optional | Default | Description |
---|---|---|---|---|
Metadata | No | the type for the metadata (if any) of the audio resource |
Name | Type | Optional | Description |
---|---|---|---|
input | Readable | string | No | The resource to play |
options | CreateAudioResourceOptions<Metadata> & Pick<Metadata extends null | undefined ? CreateAudioResourceOptions<Metadata> : Required<CreateAudioResourceOptions<Metadata>>, 'metadata'> | No | Configurable options for creating the resource |