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

video-slider-response plugin: start and slider_start parameters not working #713

Closed
becky-gilbert opened this issue May 22, 2020 · 6 comments · Fixed by #714
Closed

video-slider-response plugin: start and slider_start parameters not working #713

becky-gilbert opened this issue May 22, 2020 · 6 comments · Fixed by #714
Labels
Milestone

Comments

@becky-gilbert
Copy link
Collaborator

In the jspsych-video-slider-response plugin, the start and slider_start parameters do not seem to be working. I'm using the plugin's example HTML file to test this.
The video always starts at the beginning, regardless of the start value. The start parameter works fine in the two other video plugins.
The slider is always set to the maximum value, regardless of the slider_start value. The slider start parameters work fine in the html and image slider plugins.
This happens in Firefox and Chrome, with no errors in the console.
It would be great to know if someone else can reproduce this problem, since I think the plugin must've been tested and worked fine when it was added in jsPsych v6.1.0, and I don't know what would cause it to stop working now.
I'll look for a cause/fix and update here.

@jodeleeuw
Copy link
Member

I think the plugin must've been tested and worked fine when it was added in jsPsych v6.1.0, and I don't know what would cause it to stop working now.

😐 😐 😐

@jodeleeuw jodeleeuw added the bug label May 23, 2020
@jodeleeuw jodeleeuw added this to the 6.2 milestone May 23, 2020
@vijaymarupudi
Copy link
Contributor

html += '<input type="range" value="'+trial.start+'" min="'+trial.min+'" max="'+trial.max+'" step="'+trial.step+'" style="width: 100%;" id="jspsych-video-slider-response-response"></input>';

This is because the start option is used for the slider (instead of slider_start), and the slider_start parameter doesn't appear to be used at all. I'll submit a pull request fixing this now.

@vijaymarupudi
Copy link
Contributor

Regarding start not working, it looks like there are two elements with the same id, so the video element is not being picked by querySelector().

var video_html = '<video id="jspsych-video-slider-response-stimulus"';

html += '<div id="jspsych-video-slider-response-stimulus">' + video_html + '</div>';

@becky-gilbert
Copy link
Collaborator Author

World's fastest fix. Thanks very much @Vijaygopal1234 !!

@becky-gilbert
Copy link
Collaborator Author

I think the plugin must've been tested and worked fine when it was added in jsPsych v6.1.0, and I don't know what would cause it to stop working now.

😐 😐 😐

@jodeleeuw sorry, I genuinely thought that I must've accidentally done something weird with my version to cause it to stop working... 😬

@jodeleeuw
Copy link
Member

I think the plugin must've been tested and worked fine when it was added in jsPsych v6.1.0, and I don't know what would cause it to stop working now.

😐 😐 😐

@jodeleeuw sorry, I genuinely thought that I must've accidentally done something weird with my version to cause it to stop working... 😬

Haha well that's my fault for not having better testing in place!

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

Successfully merging a pull request may close this issue.

3 participants