Commit Graph

446 Commits

Author SHA1 Message Date
Josh de Leeuw
e0ee7f02e2 conditional_function only runs once when repetitions > 0 2021-01-26 15:32:57 -05:00
Josh de Leeuw
87b210112d add on_timeline_finish when repetition happens 2021-01-26 13:51:31 -05:00
Josh de Leeuw
bce3b5576e have extension initialize return Promise 2021-01-21 16:42:11 -05:00
Becky Gilbert
e26fbab295 change jsPsych.pluginAPI.preloadAudioFiles to preloadAudio (for consistency with images and video) #1351 2021-01-19 16:51:16 -08:00
Becky Gilbert
188cb14e3d
Merge branch 'master' into feature-css-class-trial 2021-01-18 12:18:43 -08:00
Josh de Leeuw
6a2dc21bc8 replaces keyCode with .key, gets all tests working 2021-01-15 17:55:12 -05:00
Josh de Leeuw
0aac702f1c implements #670, needs further checking 2021-01-14 10:28:18 -05:00
Josh de Leeuw
9d92c58c13 fix broken tests, variable reference error 2021-01-08 14:47:51 -05:00
Josh de Leeuw
d5d462d4c8 switch auto_preload to bool, add trials parameter, implement working tests 2021-01-07 22:15:38 -05:00
Josh de Leeuw
3f1abdec88 adjust getAutoPreloadList to work with timeline description 2021-01-07 16:13:26 -05:00
Josh de Leeuw
6135ed47d5 remove the conditional_function option from registerPreload 2021-01-07 16:06:48 -05:00
Josh de Leeuw
e892d58e2e remove preloading from jsPsych.init 2021-01-07 15:54:05 -05:00
Josh de Leeuw
ba1e7a72c9 core of preload plugin 2021-01-07 10:05:47 -05:00
Josh de Leeuw
d4830275d5 working on shifting preload stuff 2021-01-07 09:19:16 -05:00
Josh de Leeuw
562e993f9c adding a calibration routine, but it's not great 2021-01-02 17:20:21 -05:00
Josh de Leeuw
0ac9fc0d5a add event hooks in jspsych.js 2021-01-02 13:55:50 -05:00
Josh de Leeuw
26a70adc05 filling out extension code 2021-01-02 13:44:28 -05:00
Josh de Leeuw
96ad3adfa0 added tests and fixed function saving behavior #823 2020-12-29 22:25:40 -05:00
Josh de Leeuw
f39f394866 adds test and handles non-array #832 2020-12-29 22:06:28 -05:00
Josh de Leeuw
24369ff282 implements a first pass at #1237 2020-12-28 13:59:19 -05:00
Josh de Leeuw
76c5d02597 add additional testing for #832, fixes function declaration 2020-12-26 17:24:33 -05:00
Josh de Leeuw
f6ac098b4c first draft of #832 2020-12-23 09:56:40 -05:00
Josh de Leeuw
fbb9c5b35e initial pass at #823 2020-12-22 17:40:56 -05:00
Josh de Leeuw
96c4a874ef allow for recursive eval of parameters for #988 2020-12-17 15:36:16 -05:00
Josh de Leeuw
b6a28b0433 adds first pass at #883 2020-12-16 15:15:41 -05:00
Josh de Leeuw
b8225d7add first pass at implementation and test for timeline start and finish events (#585) 2020-12-16 10:49:10 -05:00
Becky Gilbert
0e2745c79d improve preloading test based on console.warn 2020-12-07 16:57:01 -08:00
Becky Gilbert
82c0eeafb3 fix typo in localSave link 2020-12-07 13:46:14 -08:00
Becky Gilbert
918df9475f add link to safe mode console.warn message 2020-12-03 16:40:49 -08:00
Becky Gilbert
a433d81c90 merge in the video parameter name changes from master 2020-12-03 15:43:15 -08:00
Becky Gilbert
de9149c158
Merge pull request #1261 from jspsych/video-plugin-testing
video-* plugins: stim parameter name change and tests
2020-12-03 14:21:18 -08:00
Becky Gilbert
7cd7fc65f4 remove HTML5 stalled event listener & check for progress bar before updating - fixes #1262 2020-12-03 11:01:19 -08:00
Becky Gilbert
91f774a50a add protocol check and file_protocol flag to disable Web Audio and video preloading (CORS errors) 2020-12-02 17:44:34 -08:00
Becky Gilbert
ffc80a372e add console warning when auto preload parameter not found 2020-12-02 12:11:03 -08:00
Josh de Leeuw
a2b0cecfbb fixes Preloading progress bar not centered when experiment_width property is set in jsPsych.init #1160 2020-10-30 12:01:41 -04:00
bjoluc
2f421f4317 delay init() execution until the document is ready
This prevents jsPsych from creating a duplicate `body` element when the
actual `body` element has not yet been initialized.

Fixes  #316
2020-10-28 12:34:22 +01:00
Josh de Leeuw
b216b8f1e1 fixes test suite failure (== vs. === issues!) 2020-10-23 11:15:03 -04:00
Josh de Leeuw
eb08de2a43
Merge branch 'min-rt' into min_RT 2020-10-23 10:06:35 -04:00
Josh de Leeuw
56a74ac745
Merge pull request #990 from egaudrain/master
Patching for issue #989
2020-10-22 11:32:30 -04:00
Josh de Leeuw
fae00cb196 implement #664 and add test 2020-10-21 18:30:51 -04:00
Josh de Leeuw
e952dc7558 Merge branch 'master' of https://github.com/jspsych/jsPsych 2020-10-21 17:42:07 -04:00
Josh de Leeuw
de175d5d52 add error message when timeline is empty throw a useful error message when the timeline is empty #853 2020-10-21 17:41:53 -04:00
Becky Gilbert
fc4ce1267a
Merge branch 'master' into audio-bug 2020-10-20 15:46:52 -07:00
Becky Gilbert
a513a922b1 fix incorrect HTML5 event names, remove loading event listeners after they fire 2020-10-20 15:37:42 -07:00
Becky Gilbert
b58cac1032 Revert "fix incorrect HTML5 audio event names, remove all event listeners after" 2020-10-20 15:32:37 -07:00
Becky Gilbert
d88a6a3e7d fix incorrect HTML5 audio event names, remove all event listeners after
they fire
2020-10-20 15:20:56 -07:00
Josh de Leeuw
099d2e10eb
Merge pull request #976 from aridyckovsky/issue-751
Graceful failure on DataCollection.first and .last
2020-10-20 15:31:38 -04:00
Becky Gilbert
1621169f82 use audio instead of this to remove event listener 2020-10-12 12:10:03 -07:00
Becky Gilbert
7410fd01f0 fixes html5 audio progress bar error - #648 2020-10-11 17:15:13 -07:00
Etienne Gaudrain
934f183b96
Patching for issue #989
Fixing inappropriate looping technique that throws error when attributing default parameters.
2020-08-19 18:52:15 +02:00
Ari Dyckovsky
183c6a6d65 Patch to graceful failure on DataCollection.first and .last
Reason:
- Expected behavior by experimenter to avoid crashing by throw exception

Changes made:
- Tightened up logic statements and returned array directly without
  shallow copy first

Notes:
- Issue #751 and #748
2020-08-14 13:47:27 -06:00
Ari Dyckovsky
9da4bb23d0 Graceful failure on DataCollection.first and .last
Reason:
- When n > number of trials, or nonpositive, failure caused crashing

Changes made:
- Update each .first and .last methods to return when n is within range,
  while throwing an error when it is not.
- Use Array.prototype.slice to create subarrays

Notes:
- Issue #751 and #748
- Unsure of precise goal for graceful failure. Should it throw an error
  create a dummy array of some length?
2020-08-13 23:22:35 -06:00
Vijay Marupudi
4057fc8d88 Fixed undefined type check with typo 2020-04-09 12:05:39 -05:00
Rui Han
a5650993ed
Variable name error? 2020-01-29 16:02:24 -05:00
Josh de Leeuw
87571e9cc9 fixes #659 2019-10-17 15:46:26 -04:00
Josh de Leeuw
b4ca37be1c implement experiment_width #572 2019-07-11 10:21:50 -04:00
Josh de Leeuw
d120b3b470 implement alternating groups sample method (#528) 2019-07-08 21:53:40 -04:00
Josh de Leeuw
5172e6dddc add shuffleAlternateGroups #528 2019-07-08 11:35:25 -04:00
Josh de Leeuw
5cd95bcb7e fixes default iti bug (#632) 2019-07-08 10:26:28 -04:00
Josh de Leeuw
b4bfb1852d fixes timeline vars in conditional functions #574 2019-07-05 11:43:40 -04:00
Josh de Leeuw
eafa1d3269 fixes #628 2019-07-02 11:47:59 -04:00
Josh de Leeuw
355eae8be2 add error message for randomization module (#389) 2019-06-19 10:14:29 -04:00
Josh de Leeuw
b850debcae fixes #391 2019-06-18 12:02:17 -04:00
Josh de Leeuw
6356341944 remove old comment todo 2019-06-18 11:38:22 -04:00
Josh de Leeuw
8eb344fbf1
Merge pull request #609 from retowyss/patch-1
Enable language option for progress bar
2019-06-03 16:47:16 -04:00
Josh de Leeuw
05461d7949 change .variance and .sd to samples (#601) 2019-05-30 17:04:09 -04:00
Josh de Leeuw
4a5a310e79 fixes #597 2019-05-24 17:26:42 -04:00
Josh de Leeuw
7686082446 tentative fix for #603; need to add testing 2019-05-24 15:26:29 -04:00
Reto Wyss
9a1714fbe2
Enable language option for progress bar 2019-04-12 06:23:14 +02:00
Josh de Leeuw
bc03aebfb1 allow functions in data params (#562) 2018-12-14 12:12:50 -05:00
Josh de Leeuw
e59895cb8e updates for video preloading 2018-10-12 11:48:01 -04:00
Josh de Leeuw
b551f99f12
Merge branch 'master' into master 2018-10-12 11:19:51 -04:00
Josh de Leeuw
501a5be52a update all to performance.now() - #492 2018-10-09 16:13:59 -04:00
Josh de Leeuw
6eeed765af make default progress bar amount 0 2018-10-09 13:51:24 -04:00
Josh de Leeuw
954eac9784 fix progress bar bug 2018-10-09 13:47:43 -04:00
Josh de Leeuw
6a6d390cb8 add get of progress bar value (#538) 2018-10-09 13:21:53 -04:00
Josh de Leeuw
59258d3215 implements #324 -- beforeunload event handler 2018-10-09 13:12:07 -04:00
Josh de Leeuw
330e5a8611 add preventDefaul on captured key responses #548 2018-10-04 15:23:34 -04:00
Josh de Leeuw
299e9d7671 fix focus #563 2018-10-04 14:04:54 -04:00
Josh de Leeuw
7a08072070 scroll to top of DOM target at start of next trial #550 2018-10-04 13:55:08 -04:00
Dillon Plunkett
da094d8a30 make shuffleNoRepeats check last two elements 2018-09-14 19:57:34 -04:00
Josh de Leeuw
6eb7ec21ac fix #557 by removing 0s, nulls, and false values from preload arrays 2018-08-15 09:46:57 -04:00
andy
6409d23620 min RT feature, working 2018-07-02 14:35:49 +01:00
andy
cb1071df43 min RT feature, working 2018-07-02 14:02:12 +01:00
andy
9c6e5f292c min RT feature 2018-07-01 20:29:31 +01:00
andy
07cd15dbca preload video + non-preloaded video ability 2018-06-30 20:45:30 +01:00
Josh de Leeuw
2970c94559 fixes #539 2018-06-25 21:33:39 -04:00
Josh de Leeuw
0f92127a49 fixes #541 by moving current_trial_finished to better location 2018-06-25 15:33:29 -04:00
andy
22bd4961d4 working preloaded video 2018-05-31 09:56:42 +01:00
andy
5a6b20f695 untested preload video mod 2018-05-30 20:55:21 +01:00
Josh de Leeuw
442fe05ed9 fixes chrome 66+ audio play #518 2018-05-14 22:24:19 -04:00
Josh de Leeuw
b4a0ce33e6 fix docs, make callback optional #513 2018-04-17 10:43:37 -04:00
Josh de Leeuw
2f568aebdb patch a bug with multiple init calls and webaudio context 2018-03-20 12:27:42 -04:00
Josh de Leeuw
3fb7ef6b6d fix loadFail timeout bug 2018-02-18 16:53:31 -05:00
Josh de Leeuw
2c172a1caf add a small delay between preload reattempts, documentation #503 2018-02-18 16:24:04 -05:00
Josh de Leeuw
f3d5a5043d make webaudio optional #508 2018-02-18 16:19:09 -05:00
Josh de Leeuw
7fa09da61f max_preload_attempts #503 2018-02-10 15:12:17 -05:00
Josh de Leeuw
c4a7f090d8 starts on #503 2018-02-10 15:10:33 -05:00
Josh de Leeuw
49aba8ee08 fix bug with null values 2018-01-11 10:11:13 -05:00
Josh de Leeuw
f7966aeaf1 implements #489 2018-01-03 13:57:20 -05:00