I’m coding an experiment with PsychoJS and I had a problem with bringing experiment to full screen.
The experiment starts with
psychoJS.openWindow({
fullscr: false,
color: new util.Color('black'),
units: 'norm'
});
I need to bring the window to full screen after a loop. So in the scheduler function of the full screen loop, I added
psychoJS.window.adjustScreenSize();
According to the source code this should be the function. But it doesn’t seem to work. There is also no log related to window size such as ‘Unable to go fullscreen’ or 'Resizing Window: ’ in console.
I have also tried having a dedicated scheduler just for this function. But it’s still the same.
Please let me know where I should put this function and if I missed something here.
After digging around a bit more I found out that the “adjustScreenSize()” checks window.fullscr before bringing the window to full screen. Should have check this function first.
For anyone who wants to enable/disable fullscreen after initialization, window.fullscr needs to be set along with adjustScreenSize() or closeFullScreen().
Please could you give the exact JS code you used for JavaScript novices? I feel like I wouldn’t know what to type in the JS window without further research.
This may seem like a basic question, but where did you input that code snippet to bring the experiment to full screen? At the beginning of the routine you want to be full screen, or outside it in some scheduler function?
Thanks for the prompt response! I tried that and got an error that says: “NameError: name ‘true’ is not defined.” It’s weird because I wrote the word true in lower case and without quotes. I just invited you to the repo on GitLab, if you are free to take a look! Or if you have other suggestions on how to combat this, I will try them out.
Thank you very much for checking! I just ran it on a different Internet browser (I was trying to run it on Safari, but switched to Google Chrome and Mozilla Firefox) and it works now.