| 2 | import { installRuntimeControlBridge } from "./bridge"; |
| 3 | |
| 4 | function createMockDeps() { |
| 5 | return { |
| 6 | onPlay: vi.fn(), |
| 7 | onPause: vi.fn(), |
| 8 | onStopMedia: vi.fn(), |
| 9 | onSeek: vi.fn(), |
| 10 | onTick: vi.fn(), |
| 11 | onSetMuted: vi.fn(), |
| 12 | onSetVolume: vi.fn(), |
| 13 | onSetMediaOutputMuted: vi.fn(), |
| 14 | onSetNativeMediaSyncDisabled: vi.fn(), |
| 15 | onSetWebAudioMediaDisabled: vi.fn(), |
| 16 | onSetPlaybackRate: vi.fn(), |
| 17 | onSetColorGrading: vi.fn(), |
| 18 | onSetColorGradingCompare: vi.fn(), |
| 19 | onEnablePickMode: vi.fn(), |
| 20 | onDisablePickMode: vi.fn(), |
| 21 | }; |
| 22 | } |
| 23 | |
| 24 | function makeControlMessage(action: string, extra?: Record<string, unknown>) { |
| 25 | return new MessageEvent("message", { |