FFmpegFilterer
new FFmpegFilterer(af)
Parameter | Type | Optional | Description |
---|---|---|---|
af | GuildQueueAudioFilters<Meta> | ❌ | - |
Properties
private #ffmpegFilters: Array<keyof QueueFilters>
public af: GuildQueueAudioFilters<Meta>
public filters: Array<keyof QueueFilters>
Currently active ffmpeg filters
Methods
private #setFilters(filters): Promise<boolean>
Parameter | Type | Optional | Description |
---|---|---|---|
filters | Array<keyof QueueFilters> | ❌ | - |
public createStream(source, options): Readable
Create ffmpeg stream
Parameter | Type | Optional | Description |
---|---|---|---|
source | string | Readable | ❌ | The stream source |
options | FFmpegStreamOptions | ❌ | The stream options |
public getFiltersDisabled(): Array<keyof QueueFilters>
Get list of disabled filters
public getFiltersEnabled(): Array<keyof QueueFilters>
Get list of enabled filters
public isDisabled(filter): boolean
Check if the given filter is disabled
Parameter | Type | Optional | Description |
---|---|---|---|
filter | T | ❌ | The filter |
public isEnabled(filter): boolean
Check if the given filter is enabled
Parameter | Type | Optional | Description |
---|---|---|---|
filter | T | ❌ | The filter |
public isValidFilter(filter): filter is keyof QueueFilters
Check if the given filter is a valid filter
Parameter | Type | Optional | Description |
---|---|---|---|
filter | string | ❌ | The filter to test |
public setDefaults(ff): void
Set default filters
Parameter | Type | Optional | Description |
---|---|---|---|
ff | Array<keyof QueueFilters> | ❌ | Filters list |
public setFilters(filters): Promise<boolean>
Set ffmpeg filters
Parameter | Type | Optional | Description |
---|---|---|---|
filters | boolean | Array<keyof QueueFilters> | Record<keyof QueueFilters, boolean> | ❌ | The filters |
public toArray(): Array<string>
Convert current filters to array
public toJSON(): Record<keyof QueueFilters, string>
Convert current filters to JSON object
public toString(): string
String representation of current filters
public toggle(filters): Promise<boolean>
Toggle given ffmpeg filter(s)
Parameter | Type | Optional | Description |
---|---|---|---|
filters | keyof QueueFilters | Array<keyof QueueFilters> | ❌ | The filter(s) |