// Pop-out teleprompter: shows the notes large, with recording controls that drive the recorder // window over a BroadcastChannel. import { useEffect, useRef, useState } from 'react'; import type { Video } from '../../shared/types.ts'; import { api } from '../api.ts'; import { Icon } from '../components/Icon.tsx'; import { channelName, type RecCommand, type RecMessage, type RecState } from '../lib/channel.ts'; import { fmtDuration, loadPref, savePref } from '../lib/format.ts'; export function Prompter({ videoId }: { videoId: string }) { const [video, setVideo] = useState