Error loading video #784
Replies: 2 comments 3 replies
-
Yep, this is a typical CORS error. Typically the server you're trying to retrieve the images from should allow cross-domain requests. Can you host the videos on the same server you're hosting the experiment on? Otherwise, consider setting up CORS on your S3 bucket: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html |
Beta Was this translation helpful? Give feedback.
-
Ok, have a new problem :(. I configured CORS on my S3 bucket, and this allows the experiment to work without preloading the stimuli, but when I try to preload I get the following error: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm having a problem loading video into a jsPsych task. It currently randomly selects URLs to a public S3 bucket from an initial array and returns it as a HTML5 video tag. The current problems I am running into are:
i) If I include a preload_video statement in the jsPsych.init object, the experiment crashes before the progress bar even starts and I get the error:
Access to XMLHttpRequest at 'https://spacetopvids.s3.us-east-2.amazonaws.com/scan_1_HB_CUT.mp4-00.00.00.000-00.00.57.000.mp4' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
ii) If I do not include the preload statement, the experiment runs but the video does not load at all. It is just stuck on the first frame.
Has anyone ran into this before? Thanks. Code attached below
Beta Was this translation helpful? Give feedback.
All reactions