|
|
|
@ -60,7 +60,7 @@ export function FreeFlow(){ |
|
|
|
|
|
|
|
|
|
|
|
const [padInput, setPadInput] = useState(null); |
|
|
|
const [padInput, setPadInput] = useState(null); |
|
|
|
|
|
|
|
|
|
|
|
const [showMessage, setShowMessage] = useState(false); |
|
|
|
const [inputReady, setInputReady] = useState(false); |
|
|
|
|
|
|
|
|
|
|
|
const { userId, setUserId, getFileId, setPassword, reset:resetUser, uploadHistory, setSummary, summary,setChoice,choice, getUploadFolder,getDataId, writeSheet } = useUser(); |
|
|
|
const { userId, setUserId, getFileId, setPassword, reset:resetUser, uploadHistory, setSummary, summary,setChoice,choice, getUploadFolder,getDataId, writeSheet } = useUser(); |
|
|
|
|
|
|
|
|
|
|
|
@ -83,6 +83,7 @@ export function FreeFlow(){ |
|
|
|
const refData=useRef(data); |
|
|
|
const refData=useRef(data); |
|
|
|
|
|
|
|
|
|
|
|
const refHintTimeout=useRef(); |
|
|
|
const refHintTimeout=useRef(); |
|
|
|
|
|
|
|
const refInputTimeout=useRef(); |
|
|
|
|
|
|
|
|
|
|
|
const refFadeOutInterval=useRef(); |
|
|
|
const refFadeOutInterval=useRef(); |
|
|
|
const refVolDownInterval=useRef(); |
|
|
|
const refVolDownInterval=useRef(); |
|
|
|
@ -431,9 +432,19 @@ export function FreeFlow(){ |
|
|
|
if(cue.hint!=null && cue.hint_time!=null){ |
|
|
|
if(cue.hint!=null && cue.hint_time!=null){ |
|
|
|
refHintTimeout.current=setTimeout(()=>{ |
|
|
|
refHintTimeout.current=setTimeout(()=>{ |
|
|
|
sendOsc(OSC_ADDRESS.HINT, cue.hint); // Send OSC hint message |
|
|
|
sendOsc(OSC_ADDRESS.HINT, cue.hint); // Send OSC hint message |
|
|
|
|
|
|
|
|
|
|
|
}, cue.hint_time); |
|
|
|
}, cue.hint_time); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setInputReady(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(cue.input_time!=null){ |
|
|
|
|
|
|
|
if(refInputTimeout.current) clearTimeout(refInputTimeout.current); |
|
|
|
|
|
|
|
refInputTimeout.current=setTimeout(()=>{ |
|
|
|
|
|
|
|
setInputReady(()=>true); |
|
|
|
|
|
|
|
}, cue.input_time); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(cue.audioFile){ |
|
|
|
if(cue.audioFile){ |
|
|
|
playAudio(cue.audioFile); |
|
|
|
playAudio(cue.audioFile); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -857,7 +868,7 @@ export function FreeFlow(){ |
|
|
|
<span className="">{localIP || '...'}</span> |
|
|
|
<span className="">{localIP || '...'}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<DebugControl onReset={resetData}/> |
|
|
|
<DebugControl onReset={resetData}/> |
|
|
|
<div className="w-full p-2 grid grid-cols-4 gap-2 items-stretch justify-center *:max-h-[5rem]"> |
|
|
|
<div className="w-full p-2 grid grid-cols-3 gap-2 items-stretch justify-center *:max-h-[5rem]"> |
|
|
|
<div className="bg-gray-100 text-4xl font-bold mb-4 flex justify-center items-center"> |
|
|
|
<div className="bg-gray-100 text-4xl font-bold mb-4 flex justify-center items-center"> |
|
|
|
{refCurrentCue.current?.name} |
|
|
|
{refCurrentCue.current?.name} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -866,12 +877,12 @@ export function FreeFlow(){ |
|
|
|
|
|
|
|
|
|
|
|
{/* <button onClick={saveImage}>Save image</button> */} |
|
|
|
{/* <button onClick={saveImage}>Save image</button> */} |
|
|
|
<NumPad onSend={onNumpad} |
|
|
|
<NumPad onSend={onNumpad} |
|
|
|
disabled={currentCue?.callback !== 'numpad'} |
|
|
|
disabled={currentCue?.callback !== 'numpad' || !inputReady} |
|
|
|
type={currentCue?.numpad_type} |
|
|
|
type={currentCue?.numpad_type} |
|
|
|
clientId={data?.id} |
|
|
|
clientId={data?.id} |
|
|
|
/> |
|
|
|
/> |
|
|
|
{/* <Light ref={refLight} /> */} |
|
|
|
{/* <Light ref={refLight} /> */} |
|
|
|
<VoiceAnalysis/> |
|
|
|
{/* <VoiceAnalysis/> */} |
|
|
|
|
|
|
|
|
|
|
|
{/* <div className="flex flex-col"> |
|
|
|
{/* <div className="flex flex-col"> |
|
|
|
<label className="text-center">Voice</label> |
|
|
|
<label className="text-center">Voice</label> |
|
|
|
|