Plugin API for writing surface integrations for Companion.
yarn add @companion-surface/base
Implement the SurfacePlugin interface to create a surface integration. Your plugin handles all surfaces of a given type.
import { SurfacePlugin, SurfaceContext } from '@companion-surface/base'
export const MySurfacePlugin: SurfacePlugin = {
async init(): Promise<void> {
// Initialize your plugin
}
async destroy(): Promise<void> {
// Clean up
}
// Implement detection or manual connection methods
}
Check the template repository for a complete example.
| Companion | Module-base |
|---|---|
| v4.x | v1.0 |
This package is part of a monorepo. See the root README for development instructions.