| |
| |
| |
|
|
| import type { PlaybackSnapshot } from '@/lib/utils/playback-storage'; |
|
|
| export type { PlaybackSnapshot }; |
|
|
| |
| export type Effect = |
| | { kind: 'spotlight'; targetId: string; dimOpacity?: number } |
| | { kind: 'laser'; targetId: string; color?: string }; |
|
|
| |
| export type EngineMode = 'idle' | 'playing' | 'paused' | 'live'; |
|
|
| |
| export type TopicState = 'active' | 'pending' | 'closed'; |
|
|
| |
| export interface TriggerEvent { |
| id: string; |
| question: string; |
| prompt?: string; |
| agentId?: string; |
| } |
|
|
| |
| export interface PlaybackEngineCallbacks { |
| onModeChange?: (mode: EngineMode) => void; |
| onSceneChange?: (sceneId: string) => void; |
| onSpeechStart?: (text: string) => void; |
| onSpeechEnd?: () => void; |
| onTextDelta?: (content: string) => void; |
| onSpeakerChange?: (role: string) => void; |
| onEffectFire?: (effect: Effect) => void; |
|
|
| |
| onProactiveShow?: (trigger: TriggerEvent) => void; |
| onProactiveHide?: () => void; |
|
|
| |
| onDiscussionConfirmed?: (topic: string, prompt?: string, agentId?: string) => void; |
| onDiscussionEnd?: () => void; |
| onUserInterrupt?: (text: string) => void; |
|
|
| |
| onTopicStart?: (type: 'lecture' | 'discussion', title: string) => void; |
| onTopicAppend?: (role: string, text: string) => void; |
| onTopicEnd?: () => void; |
|
|
| |
| onProgress?: (snapshot: PlaybackSnapshot) => void; |
|
|
| |
| isAgentSelected?: (agentId: string) => boolean; |
|
|
| |
| getPlaybackSpeed?: () => number; |
|
|
| onComplete?: () => void; |
| } |
|
|