LegacyPlayerContext
Source-related Player surface shared by actual Players and standalone hosts.
You are reading the v8 docsDev
InterfaceTypeScript@discord-player/plugin-host
View sourcepackages/plugin-host/src/legacy-player.ts:21interface LegacyPlayerContextSource-related Player surface shared by actual Players and standalone hosts.
Properties
pluginsreadonly
readonly plugins: PluginRegistryShared source registry.
extractorsreadonly
readonly extractors: ExtractorExecutionContextLegacy extractor registration and lookup.
optionsreadonly
readonly options: {
blockExtractors?: readonly string[];
probeTimeout?: number;
}Supported source options.
emit
emit: <E extends string | symbol>(eventName: "debug" | "error" | "voiceStateUpdate" | E | keyof EventEmitterEventMap, ...args: E extends keyof SourceRuntimeEvents ? SourceRuntimeEvents[E] : E extends keyof EventEmitterEventMap ? EventEmitterEventMap[E] : any[]) => booleanPublish a supported event.
Methods
getRemedia
getRemedia(): RemediaClientAccess the embedding audio client; standalone contexts reject required access.
Returns
RemediaClient
getRemedia(throwOnMissing: false): RemediaClient | nullOptional audio client lookup, null in standalone execution.
Parameters
| Name | Type | Description |
|---|---|---|
| throwOnMissing | false | Optional lookup flag. |
Returns
RemediaClient | null
search
search(query: MediaResource, options?: SearchOptions): Promise<SearchResult>Search registered providers.
Parameters
| Name | Type | Description |
|---|---|---|
| query | MediaResource | Query or existing metadata. |
| options? | SearchOptions | Source hints and cancellation. |
Returns
Promise<SearchResult>
debug
debug(message: string): voidReport a diagnostic.
Parameters
| Name | Type | Description |
|---|---|---|
| message | string | Diagnostic text. |
Returns
void