Skip to content

Commit 71645a5

Browse files
committed
fix: Applied basic styling concerns raised in meeting 8/13/2025:
- Changed black video backgrounds to white - Updated the instruction video survey to include more specific details - removed the ability to progress task until after video completion - Added start time stamp
1 parent 383849c commit 71645a5

23 files changed

+153
-72
lines changed

webcamstudy/asset-manifest.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": {
33
"main.css": "https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css",
4-
"main.js": "https://seresl.unl.edu/webcamstudy/static/js/main.6c79de19.js",
4+
"main.js": "https://seresl.unl.edu/webcamstudy/static/js/main.907ceee0.js",
55
"static/js/453.e44939a0.chunk.js": "https://seresl.unl.edu/webcamstudy/static/js/453.e44939a0.chunk.js",
66
"static/media/clip2.mp4": "https://seresl.unl.edu/webcamstudy/static/media/clip2.1e6e426f2cdb61fe74ec.mp4",
77
"static/media/clip3.mp4": "https://seresl.unl.edu/webcamstudy/static/media/clip3.3341365941d9bce4b98b.mp4",
@@ -67,19 +67,19 @@
6767
"static/media/image-10.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-10.fcdfd9fbc352940b0d95.jpg",
6868
"static/media/image-16.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-16.8583b0dd5e9bb251fc9c.jpg",
6969
"static/media/image-8.jpg": "https://seresl.unl.edu/webcamstudy/static/media/image-8.e491c615c0e21b7007f5.jpg",
70-
"static/media/Star.mp4": "https://seresl.unl.edu/webcamstudy/static/media/Star.388e38b3b5f3bf1da0f3.mp4",
71-
"static/media/Infinity.mp4": "https://seresl.unl.edu/webcamstudy/static/media/Infinity.956b2d87181ad169c213.mp4",
72-
"static/media/Circle.mp4": "https://seresl.unl.edu/webcamstudy/static/media/Circle.5116e4afb5a982335a49.mp4",
73-
"static/media/Triangle.mp4": "https://seresl.unl.edu/webcamstudy/static/media/Triangle.4aa86744bd0e40e70c45.mp4",
74-
"static/media/Square.mp4": "https://seresl.unl.edu/webcamstudy/static/media/Square.97d1564e2ad6437c0d73.mp4",
75-
"static/media/Left_to_right.mp4": "https://seresl.unl.edu/webcamstudy/static/media/Left_to_right.a018dc1145d70a3cb6d1.mp4",
70+
"static/media/star.mp4": "https://seresl.unl.edu/webcamstudy/static/media/star.4ef05bdc2fc475de7ffc.mp4",
71+
"static/media/circle.mp4": "https://seresl.unl.edu/webcamstudy/static/media/circle.3184123639689d8cb70c.mp4",
72+
"static/media/infinity.mp4": "https://seresl.unl.edu/webcamstudy/static/media/infinity.bb85296e15efd7b45cf4.mp4",
73+
"static/media/triangle.mp4": "https://seresl.unl.edu/webcamstudy/static/media/triangle.02ed6938bb5c26d62d0d.mp4",
74+
"static/media/square.mp4": "https://seresl.unl.edu/webcamstudy/static/media/square.6b4e142b525756885f3e.mp4",
75+
"static/media/left_right.mp4": "https://seresl.unl.edu/webcamstudy/static/media/left_right.9f5c2b82daf57a7954e4.mp4",
7676
"index.html": "https://seresl.unl.edu/webcamstudy/index.html",
7777
"main.3de88975.css.map": "https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css.map",
78-
"main.6c79de19.js.map": "https://seresl.unl.edu/webcamstudy/static/js/main.6c79de19.js.map",
78+
"main.907ceee0.js.map": "https://seresl.unl.edu/webcamstudy/static/js/main.907ceee0.js.map",
7979
"453.e44939a0.chunk.js.map": "https://seresl.unl.edu/webcamstudy/static/js/453.e44939a0.chunk.js.map"
8080
},
8181
"entrypoints": [
8282
"static/css/main.3de88975.css",
83-
"static/js/main.6c79de19.js"
83+
"static/js/main.907ceee0.js"
8484
]
8585
}

webcamstudy/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="https://seresl.unl.edu/webcamstudy/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="https://seresl.unl.edu/webcamstudy/logo192.png"/><link rel="manifest" href="https://seresl.unl.edu/webcamstudy/manifest.json"/><title>React App</title><script type="module">import EmbeddedPageSdk from"https://app.realeye.io/sdk/js/testRunnerEmbeddableSdk-1.7.1.js";let reSdk=null;window.addEventListener("DOMContentLoaded",()=>{reSdk=new EmbeddedPageSdk(!1,null,!1),reSdk.startNextExposure()}),window.addEventListener("endmeplease",()=>{reSdk&&reSdk.finishEyeTrackingTest()})</script><script defer="defer" src="https://seresl.unl.edu/webcamstudy/static/js/main.6c79de19.js"></script><link href="https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="https://seresl.unl.edu/webcamstudy/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="https://seresl.unl.edu/webcamstudy/logo192.png"/><link rel="manifest" href="https://seresl.unl.edu/webcamstudy/manifest.json"/><title>React App</title><script type="module">import EmbeddedPageSdk from"https://app.realeye.io/sdk/js/testRunnerEmbeddableSdk-1.7.1.js";let reSdk=null;window.addEventListener("DOMContentLoaded",()=>{reSdk=new EmbeddedPageSdk(!1,null,!1),reSdk.startNextExposure()}),window.addEventListener("endmeplease",()=>{reSdk&&reSdk.finishEyeTrackingTest()})</script><script defer="defer" src="https://seresl.unl.edu/webcamstudy/static/js/main.907ceee0.js"></script><link href="https://seresl.unl.edu/webcamstudy/static/css/main.3de88975.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

webcamstudy/src/App.jsx

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ function App() {
2323
faceTask: null
2424
});
2525

26+
// State to track study timing
27+
const [startTime, setStartTime] = useState(null);
28+
29+
// State to track video completion
30+
const [instructionVideoEnded, setInstructionVideoEnded] = useState(false);
31+
const [videoTaskEnded, setVideoTaskEnded] = useState(false);
32+
const [smoothPursuitTaskEnded, setSmoothPursuitTaskEnded] = useState(false);
33+
2634
useEffect(() => {
2735
generateTaskSequence();
2836
}, []);
@@ -48,6 +56,11 @@ function App() {
4856
[taskType]: data
4957
}));
5058

59+
// Set start time when consent form is completed
60+
if (taskType === 'consent') {
61+
setStartTime(new Date().toISOString());
62+
}
63+
5164
// Auto-advance to next task
5265
setTimeout(() => {
5366
incrementTask();
@@ -56,6 +69,10 @@ function App() {
5669

5770
const incrementTask = () => {
5871
setCurrentTask((prev) => prev + 1);
72+
// Reset video end states when moving to next task
73+
setInstructionVideoEnded(false);
74+
setVideoTaskEnded(false);
75+
setSmoothPursuitTaskEnded(false);
5976
};
6077

6178
const downloadAllData = useCallback(() => {
@@ -71,7 +88,8 @@ function App() {
7188
wearsGlasses: studyData.consent?.wearsGlasses || '',
7289
wearsContactLenses: studyData.consent?.wearsContactLenses || '',
7390
responses: [],
74-
timestamp: new Date().toISOString()
91+
startTime: startTime,
92+
endTime: new Date().toISOString()
7593
};
7694

7795
// Add text task response
@@ -166,7 +184,7 @@ function App() {
166184
document.body.appendChild(link);
167185
link.click();
168186
document.body.removeChild(link);
169-
}, [studyData]);
187+
}, [studyData, startTime]);
170188

171189
// Auto-download data when all tasks are completed
172190
useEffect(() => {
@@ -228,13 +246,16 @@ function App() {
228246
case 'TextSurvey':
229247
return <TextSurvey onSubmit={(data) => handleTaskComplete('textTask', data)} />;
230248
case 'SmoothPursuitVideoTask':
231-
return <SmoothPursuitVideoTask onSubmit={(data) => handleTaskComplete('smoothPursuitVideoTask', data)} />;
249+
return <SmoothPursuitVideoTask
250+
onSubmit={(data) => handleTaskComplete('smoothPursuitVideoTask', data)}
251+
onTaskComplete={() => setSmoothPursuitTaskEnded(true)}
252+
/>;
232253
case 'InstructionVideoTask':
233-
return <InstructionVideoTask />;
254+
return <InstructionVideoTask onVideoEnded={() => setInstructionVideoEnded(true)} />;
234255
case 'InstructionVideoSurvey':
235256
return <InstructionVideoSurvey onSubmit={(data) => handleTaskComplete('instructionVideoTask', data)} />;
236257
case 'VideoTask':
237-
return <VideoTask />;
258+
return <VideoTask onVideoEnded={() => setVideoTaskEnded(true)} />;
238259
case 'VideoSurvey':
239260
return <VideoSurvey onSubmit={(data) => handleTaskComplete('videoTask', data)} />;
240261
case 'FaceTask':
@@ -247,9 +268,25 @@ function App() {
247268
const isTaskComplete = currentTask >= taskFiles.length;
248269
const currentTaskName = taskFiles[currentTask];
249270

271+
// Check if current video task has ended
272+
const isVideoTaskComplete = () => {
273+
if (currentTaskName === 'InstructionVideoTask') {
274+
return instructionVideoEnded;
275+
}
276+
if (currentTaskName === 'VideoTask') {
277+
return videoTaskEnded;
278+
}
279+
if (currentTaskName === 'SmoothPursuitVideoTask') {
280+
return smoothPursuitTaskEnded;
281+
}
282+
return true; // For non-video tasks, always allow next button
283+
};
284+
250285
// Show Next Task button only for tasks that don't have their own Continue button
286+
// and only when video tasks have ended
251287
const showNextButton = !isTaskComplete &&
252-
!['ConsentForm', 'TextSurvey', 'SmoothPursuitVideoTask', 'InstructionVideoSurvey', 'VideoSurvey', 'FaceTask'].includes(currentTaskName);
288+
!['ConsentForm', 'TextSurvey', 'InstructionVideoSurvey', 'VideoSurvey', 'FaceTask'].includes(currentTaskName) &&
289+
isVideoTaskComplete();
253290

254291
return (
255292
<div id="app" style={styles.appContainer}>
1.58 KB
Binary file not shown.
-1.46 KB
Binary file not shown.
-11 KB
Binary file not shown.
4.69 KB
Binary file not shown.
-2.34 KB
Binary file not shown.
1.66 KB
Binary file not shown.
16.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)