UNPKG

soundcraft-ui-connection

Version:

Library for controlling the Soundcraft Ui series audio mixers

63 lines (62 loc) 2.26 kB
import { MixerConnection } from '../mixer-connection'; import { MixerStore } from '../state/mixer-store'; import { ShowsWithDetails } from '../types'; /** * Controller for Shows, Snapshots and Cues */ export declare class ShowController { private conn; private store; /** Currently loaded show */ readonly currentShow$: import('rxjs').Observable<string>; /** Currently loaded snapshot */ readonly currentSnapshot$: import('rxjs').Observable<string>; /** Currently loaded cue */ readonly currentCue$: import('rxjs').Observable<string>; /** * All available shows with their snapshots and cues (show name -> { snapshots, cues }). * Snapshots and cues are not hierarchical; both hang off a show in parallel. * Fetched on connect; refresh manually with {@link refreshShows}. */ readonly shows$: import('rxjs').Observable<ShowsWithDetails>; constructor(conn: MixerConnection, store: MixerStore); /** * Load a show by name * @param show Show name */ loadShow(show: string): void; /** * Load a snapshot in a show * @param show Show name * @param snapshot Snapshot name in the show */ loadSnapshot(show: string, snapshot: string): void; /** * Load a cue in a show * @param show Show name * @param cue Cue name in the show */ loadCue(show: string, cue: string): void; /** * Save a snapshot in a show. This will overwrite an existing snapshot. * @param show Show name * @param snapshot Snapshot name in the show */ saveSnapshot(show: string, snapshot: string): void; /** * Save a cue in a show. This will overwrite an existing cue. * @param show Show name * @param cue Cue name in the show */ saveCue(show: string, cue: string): void; /** Update and overwrite the currently loaded snapshot */ updateCurrentSnapshot(): void; /** Update and overwrite the currently loaded cue */ updateCurrentCue(): void; /** * Request the list of shows and, for each show, its snapshots and cues from the mixer. * Results are exposed through {@link shows$}. * This is called automatically on every connection open. */ refreshShows(): void; }