Replies: 1 comment
-
This is a great idea. I'll open an issue to track it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I try to load a completely nonexistent video file for the plugin,
video-keyboard-response
, no error will be thrown in the console; instead, jsPsych will go ahead and create the video html element with the (nonexistent) source.For example, the following code...
...will result in this html element being created:
(Obviously that filename isn't even valid because it lacks the file extension.)
Instead of creating the html element for something that isn't a video (or is one, but doesn't exist), jsPsych could check that the video file is a valid file and does exist; if neither of these conditions are met, then throw an error. This isn't really a critical feature to add, but it still might be nice to have. The context that motivated this suggestion was the following situation, where I used this code:
...instead of this code:
A small mistake on my end for not reading the documentation closely enough, but what ended up happening for the first example is that the plugin created a video element for every single character in the string, which is because the plugin contains code that expects and iterates over each element of an array. In this case, it treated the string itself as an array.
Beta Was this translation helpful? Give feedback.
All reactions