main
reng 3 months ago
parent 44f5124396
commit 3f9cc3b1e1
  1. 6
      vite/src/pages/flow_free.jsx
  2. 3
      vite/src/util/backend.js

@ -77,6 +77,8 @@ export function FreeFlow(){
const refCurrentCue= useRef(null); const refCurrentCue= useRef(null);
const refData=useRef(data); const refData=useRef(data);
const refHintTimeout=useRef();
const { history, status, reset, sendMessage, setStatus, audioOutput, setAudioOutput, stop:stopChat, const { history, status, reset, sendMessage, setStatus, audioOutput, setAudioOutput, stop:stopChat,
audioUrl }=useChat(); audioUrl }=useChat();
@ -121,7 +123,6 @@ export function FreeFlow(){
resetData(); resetData();
} }
break; break;
} }
// Handle OSC messages here // Handle OSC messages here
@ -327,7 +328,8 @@ export function FreeFlow(){
// if(cue.callback=='fade_out_light') refLight.current.fadeOut(); // Fade out light for conversation end // if(cue.callback=='fade_out_light') refLight.current.fadeOut(); // Fade out light for conversation end
if(cue.hint!=null){ if(cue.hint!=null){
setTimeout(()=>{ if(refHintTimeout.current) clearTimeout(refHintTimeout.current);
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);
} }

@ -52,7 +52,8 @@ export async function writeToGoogleSheet(date, session, userId, password){
"date":date, "date":date,
"session":session, "session":session,
"userId":userId, "userId":userId,
"password":password "password":password,
"createdTime": new Date().toLocaleString()
}) })
}); });
console.log("Data successfully sent to Google Sheet!"); console.log("Data successfully sent to Google Sheet!");

Loading…
Cancel
Save