Skip to content

Commit

Permalink
refactor: full screen trial with additional data from gearshift proje…
Browse files Browse the repository at this point in the history
…ct code
  • Loading branch information
YUUU23 committed Jun 26, 2024
1 parent cbd7745 commit 94ba324
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/experiment/trials/fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import jsPsychFullscreen from "@jspsych/plugin-fullscreen";
export const enterFullscreenTrial = {
type: jsPsychFullscreen,
fullscreen_mode: true,
on_finish: (data) => {
// Record some additional information about the user's screen
data.screen_width = screen.width;
data.screen_height = screen.height;
data.screen_pixel_ratio = window.devicePixelRatio;
},
};

/**
Expand Down

0 comments on commit 94ba324

Please sign in to comment.