Discord Player

SoundCloudExtractor

No description provided

SoundCloudExtractor extends BaseExtractor<SoundCloudExtractorInit>

new SoundCloudExtractor(context, options);
ParameterTypeOptionalDescription
contextExtractorExecutionContextContext that instantiated this extractor
optionsSoundCloudExtractorInitInitialization options for this extractor

Properties

public context: any

public createBridgeQuery: any

Handle bridge query creation

public internal: any

public options: any

public priority: any

Priority of this extractor. Higher value means higher priority (will be executed first).

public protocols: any

A list of query protocols that this extractor supports.

public static identifier: any

public static instance: any

public identifier: any

Identifier of this extractor

public supportsDemux: any

A flag to indicate Demuxable stream support for opus/ogg/opus/webm/opus formats.

Methods

public activate(): Promise<void>

public bridge(track, sourceExtractor): Promise<null | ExtractorStreamable>

ParameterTypeOptional
trackTrack<unknown>
sourceExtractornull | BaseExtractor<object>

public createResponse(playlist?, tracks?): ExtractorInfo

Create extractor response

ParameterTypeOptionalDescription
playlist | nullPlaylistThe playlist
tracksArray<Track<unknown>>The track array

public deactivate(): Promise<void>

public debug(message): boolean

Write debug message

ParameterTypeOptionalDescription
messagestringThe debug message

public emit(event, args): boolean

Dispatch an event to the player

ParameterTypeOptionalDescription
eventKThe event to dispatch
argsParameters<PlayerEvents[K]>The data to dispatch

public emptyResponse(): ExtractorInfo

public getRelatedTracks(track, history): Promise<ExtractorInfo>

ParameterTypeOptional
trackTrack<unknown>
historyGuildQueueHistory<unknown>

public handle(query, context): Promise<ExtractorInfo>

ParameterTypeOptional
querystring
contextExtractorSearchContext

public handlePostStream(stream, next): void

A stream middleware to handle streams before passing it to the player

ParameterTypeOptionalDescription
streamReadableThe incoming stream
nextNextFunctionThe next function

public reconfigure(options): Promise<void>

Reconfigures this extractor

ParameterTypeOptionalDescription
optionsSoundCloudExtractorInitThe new options to apply

public stream(info): Promise<string>

ParameterTypeOptional
infoTrack<unknown>

public validate(query, type?): Promise<boolean>

ParameterTypeOptional
querystring
typenull | SearchQueryType