Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videos #211

Open
chamarun opened this issue Aug 2, 2023 · 1 comment
Open

Videos #211

chamarun opened this issue Aug 2, 2023 · 1 comment

Comments

@chamarun
Copy link

chamarun commented Aug 2, 2023

Hello,

I am currently working on my bachelor thesis and want to use lab.js to build my experiment. Since this is the first time that I do this on my own I have to incorporate myself into lab.js. In my study the participants have to react with three different keys to choose from three options. There will be four blocks but before each block I want to add an explanation video (which is part of my hypothesis).

I added a new screen and wanted to add a video. But by using the plus in the corner of the screen I am only able to add images from my laptop. I am able to load the video into the files, but I cannot select it to put it on the screen.
The Browser I am using is Microsoft Edge Version 115.0.1901.188 (Offizielles Build) (64-Bit).

If it is possible to add videos I also want to ask if there is an restriction of the duration of the video. The video I added to the files was about 5 seconds long, but I tried it with a longer video (about 15 seconds) and got the message that "this file is too large to be opened".

@mcfarla9
Copy link

I have never used videos with lab.js, and do not know the "proper" way to do so. But as an exercise I added an html.Screen component and then added a video element there, e.g.,

<video controls><source src=${this.files["movie.mp4"]} type="video/mp4"></video>

I also uploaded the video file (a small one) to the component. This all worked. I would not, however, trust this if you need to present a video with millisecond accuracy.

I had to use a small file to avoid the "This file is too large to be opened" error in the Builder. That seems to be a limitation of what the Builder allows you to upload, not a limitation of lab.js itself. To get around the limit in the Builder I edited my video element to

<video controls><source src="movie.mp4" type="video/mp4"></video>

I then exported the study for local use, manually added my larger movie file to the same folder as the study, and this worked.

-- David McFarlane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants