Skip to content

Commit 7dc971c

Browse files
committed
fix: update webcamstudy folder to contain updated study design
1 parent 616f45b commit 7dc971c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1202
-1
lines changed

webcamstudy/index.html

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,135 @@
1-
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><script defer="defer" src="/js/chunk-vendors.1438a3b8.js"></script><script defer="defer" src="/js/app.673c9d94.js"></script><link href="/css/app.bc16b632.css" rel="stylesheet"></head><body><div id="app"></div></body></html>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Task Application</title>
7+
<style>
8+
body {
9+
margin: 0;
10+
padding: 0;
11+
overflow: hidden;
12+
height: 100vh;
13+
}
14+
#app {
15+
font-family: Avenir, Helvetica, Arial, sans-serif;
16+
-webkit-font-smoothing: antialiased;
17+
-moz-osx-font-smoothing: grayscale;
18+
text-align: center;
19+
color: #2c3e50;
20+
overflow: hidden;
21+
width: 100%;
22+
height: 100vh;
23+
box-sizing: border-box;
24+
display: flex;
25+
flex-direction: column;
26+
}
27+
.button {
28+
height: 40px;
29+
width: 100px;
30+
margin: 10px auto;
31+
}
32+
.hidden {
33+
display: none;
34+
}
35+
iframe {
36+
width: 100%;
37+
height: 100%;
38+
border: none;
39+
overflow: hidden;
40+
display: block;
41+
}
42+
.iframe-container {
43+
width: 100%;
44+
height: 80vh;
45+
overflow: hidden;
46+
margin: 0;
47+
flex-grow: 1;
48+
}
49+
.button-container {
50+
height: 20vh;
51+
display: flex;
52+
align-items: flex-start;
53+
justify-content: center;
54+
}
55+
</style>
56+
<script type="module">
57+
import EmbeddedPageSdk from "https://app.realeye.io/sdk/js/testRunnerEmbeddableSdk-1.7.1.js";
58+
59+
/**
60+
* NOTICE: The SDK MUST be created when the UI is fully loaded and ready.
61+
* So, if you are using (modern) frontend framework please use its proper event to create the SDK when everything is ready and fully rendered, instead of the vanilla JS "DOMContentLoaded" event.
62+
*/
63+
window.addEventListener("DOMContentLoaded", () => {
64+
const debugMode = false;
65+
const stimulusId = null; // Or Stimulus/Item UUID from RealEye Study, e.g. "61560b76-3d31-4f0e-b530-55bd8709aadb"
66+
const forceRun = false;
67+
68+
const reSdk = new EmbeddedPageSdk(debugMode, stimulusId, forceRun);
69+
});
70+
</script>
71+
</head>
72+
<body>
73+
<div id="app">
74+
<div class="iframe-container">
75+
<iframe id="taskFrame" src="" class="hidden" scrolling="no"></iframe>
76+
</div>
77+
<div class="button-container">
78+
<button id="nextTaskButton" class="button hidden">Next Task</button>
79+
</div>
80+
</div>
81+
<script>
82+
let currentTask = 0;
83+
84+
// Task categories
85+
const consentForm = "src/components/consentForm.html";
86+
const textTasks = [
87+
"src/components/textTask.html",
88+
"src/components/textTask2.html",
89+
"src/components/textTask3.html",
90+
];
91+
const videoTasks = [
92+
"src/components/videoTask.html",
93+
"src/components/videoTask2.html",
94+
"src/components/videoTask3.html",
95+
];
96+
const faceTasks = [
97+
"src/components/faceTask2.html",
98+
"src/components/faceTask3.html",
99+
"src/components/faceTask4.html",
100+
];
101+
102+
// Randomly shuffle tasks
103+
const taskFiles = [
104+
consentForm,
105+
textTasks[Math.floor(Math.random() * textTasks.length)],
106+
videoTasks[Math.floor(Math.random() * videoTasks.length)],
107+
faceTasks[Math.floor(Math.random() * faceTasks.length)],
108+
];
109+
110+
const taskFrame = document.getElementById("taskFrame");
111+
const nextTaskButton = document.getElementById("nextTaskButton");
112+
113+
function showTask(taskIndex) {
114+
if (taskIndex < taskFiles.length) {
115+
taskFrame.src = taskFiles[taskIndex];
116+
taskFrame.classList.remove("hidden");
117+
nextTaskButton.classList.remove("hidden");
118+
} else {
119+
taskFrame.src = "about:blank";
120+
nextTaskButton.classList.add("hidden");
121+
}
122+
}
123+
124+
function incrementTask() {
125+
currentTask++;
126+
showTask(currentTask);
127+
}
128+
129+
nextTaskButton.addEventListener("click", incrementTask);
130+
131+
// Initialize the first task
132+
showTask(currentTask);
133+
</script>
134+
</body>
135+
</html>

webcamstudy/src/assets/Fumble.mp4

4.61 MB
Binary file not shown.

webcamstudy/src/assets/clip2.mp4

36.4 MB
Binary file not shown.

webcamstudy/src/assets/clip3.mp4

27.7 MB
Binary file not shown.

webcamstudy/src/assets/clip4.mp4

28.5 MB
Binary file not shown.
1.02 MB
1.13 MB
1.2 MB
1.19 MB
1.18 MB

0 commit comments

Comments
 (0)