Host pattern
How the plugin SDK connects to the player through hosts.
The three layers
1. Host interface (packages/plugin-sdk/src/types/)
// types/queue.ts
export type QueueHost = {
getQueue(): Queue;
addToQueue(tracks: Track[]): void;
// ...
};2. API class (packages/plugin-sdk/src/api/)
3. Host implementation (packages/player/src/services/)
What hosts wrap
Domain
Backed by
Data flow
Adding a new domain
Last updated