Discord Player

AppleMusicExtractor

No description provided

AppleMusicExtractor extends BaseExtractor<AppleMusicExtractorInit>

new AppleMusicExtractor(context, options);
ParameterTypeOptionalDescription
contextExtractorExecutionContext❌Context that instantiated this extractor
optionsAppleMusicExtractorInit✅Initialization options for this extractor

Properties

public context: any

public createBridgeQuery: any

Handle bridge query creation

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 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>

Handle stream extraction for another extractor

ParameterTypeOptionalDescription
trackTrack<unknown>❌The track to bridge
sourceExtractornull | BaseExtractor<object>❌The source extractor

public createResponse(playlist?, tracks?): ExtractorInfo

Create extractor response

ParameterTypeOptionalDescription
playlistnull | Playlist✅The playlist
tracksArray<Track<unknown>>✅The track array

public deactivate(): Promise<void>

public debug(message): boolean

Write debug message

ParameterTypeOptionalDescription
messagestring❌The debug message

public emit(event, args): boolean

Dispatch an event to the player

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

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
streamReadable❌The incoming stream
nextNextFunction❌The next function

public reconfigure(options): Promise<void>

Reconfigures this extractor

ParameterTypeOptionalDescription
optionsAppleMusicExtractorInit❌The new options to apply

public stream(info): Promise<ExtractorStreamable>

ParameterTypeOptional
infoTrack<unknown>❌

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

ParameterTypeOptional
querystring❌
typenull | SearchQueryType✅