SpotifyExtractor
No description provided
SpotifyExtractor extends BaseExtractor<SpotifyExtractorInit>
Parameter | Type | Optional | Description |
---|---|---|---|
context | ExtractorExecutionContext | ❌ | Context that instantiated this extractor |
options | SpotifyExtractorInit | ✅ | Initialization 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 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
Parameter | Type | Optional | Description |
---|---|---|---|
track | Track<unknown> | ❌ | The track to bridge |
sourceExtractor | null | BaseExtractor<object> | ❌ | The source extractor |
public createResponse(playlist?, tracks?): ExtractorInfo
Create extractor response
Parameter | Type | Optional | Description |
---|---|---|---|
playlist | null | Playlist | ✅ | The playlist |
tracks | Array<Track<unknown>> | ✅ | The track array |
public deactivate(): Promise<void>
public debug(message): boolean
Write debug message
Parameter | Type | Optional | Description |
---|---|---|---|
message | string | ❌ | The debug message |
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 |
public getRelatedTracks(track): Promise<ExtractorInfo>
Parameter | Type | Optional |
---|---|---|
track | Track<unknown> | ❌ |
public handle(query, context): Promise<ExtractorInfo>
Parameter | Type | Optional |
---|---|---|
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 |
public parse(q): {
id | : string | ; queryType | : string | ; }
Parameter | Type | Optional |
---|---|---|
q | string | ❌ |
public reconfigure(options): Promise<void>
Reconfigures this extractor
Parameter | Type | Optional | Description |
---|---|---|---|
options | SpotifyExtractorInit | ❌ | The new options to apply |
public stream(info): Promise<ExtractorStreamable>
Parameter | Type | Optional |
---|---|---|
info | Track<unknown> | ❌ |
public validate(query, type?): Promise<boolean>
Parameter | Type | Optional |
---|---|---|
query | string | ❌ |
type | null | SearchQueryType | ✅ |