AppleMusicExtractor extends BaseExtractor
new AppleMusicExtractor(context)
Parameter | Type | Optional | Description |
---|---|---|---|
context | ExtractorExecutionContext | ❌ | Context that instantiated this extractor |
Properties
private _stream: StreamFN
public context: ExtractorExecutionContext
- Source:
packages/discord-player/dist/index.d.ts#L83
public static identifier: 'com.discord-player.applemusicextractor'
public identifier: string
Identifier of this extractor
Methods
public activate(): Promise<void>
public createResponse(playlist?, tracks?): ExtractorInfo
Create extractor response
Parameter | Type | Optional | Description |
---|---|---|---|
playlist | null | Playlist | ✅ | The playlist |
tracks | Array<Track> | ✅ | The track array |
- Source:
packages/discord-player/dist/index.d.ts#L137
public deactivate(): Promise<void>
This method will be executed when this extractor is deactivated
- Source:
packages/discord-player/dist/index.d.ts#L104
public debug(message): boolean
Write debug message
Parameter | Type | Optional | Description |
---|---|---|---|
message | string | ❌ | The debug message |
- Source:
packages/discord-player/dist/index.d.ts#L142
public emit(event, args): boolean
Dispatch an event to the player
Parameter | Type | Optional | Description |
---|---|---|---|
event | K | ❌ | The event to dispatch |
args | Parameters<PlayerEvents[K]> | ❌ | The data to dispatch |
- Source:
packages/discord-player/dist/index.d.ts#L131
public handle(query, context): Promise<ExtractorInfo>
Parameter | Type | Optional | Description |
---|---|---|---|
query | string | ❌ | - |
context | ExtractorSearchContext | ❌ | - |
public handlePostStream(stream, next): void
A stream middleware to handle streams before passing it to the player
Parameter | Type | Optional | Description |
---|---|---|---|
stream | Readable | ❌ | The incoming stream |
next | NextFunction | ❌ | The next function |
- Source:
packages/discord-player/dist/index.d.ts#L125
public stream(info): Promise<string | Readable>
Parameter | Type | Optional | Description |
---|---|---|---|
info | Track | ❌ | - |
public validate(query, type?): Promise<boolean>
Parameter | Type | Optional | Description |
---|---|---|---|
query | string | ❌ | - |
type | null | SearchQueryType | ✅ | - |