Const
Fires whenever a captioned Sound plays - a captioning overlay subscribes here, entirely decoupled from Sound itself, which never imports anything UI-shaped.
Sound
import { onCaption } from '@datamoc/mw_games/audio';onCaption.add(({ text }) => showCaptionOverlay(text));declare function showCaptionOverlay(text: string): void; Copy
import { onCaption } from '@datamoc/mw_games/audio';onCaption.add(({ text }) => showCaptionOverlay(text));declare function showCaptionOverlay(text: string): void;
Fires whenever a captioned
Soundplays - a captioning overlay subscribes here, entirely decoupled fromSounditself, which never imports anything UI-shaped.