mwg API
    Preparing search index...

    Variable onCaptionConst

    onCaption: Signal<CaptionEvent> = ...

    Fires whenever a captioned Sound plays - a captioning overlay subscribes here, entirely decoupled from Sound itself, which never imports anything UI-shaped.

    import { onCaption } from '@datamoc/mw_games/audio';

    onCaption.add(({ text }) => showCaptionOverlay(text));

    declare function showCaptionOverlay(text: string): void;