You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a separate mic check file that should be part of the lookit-jspsych repo, in the record package, but has been copied into the lookit-api files because of problems accessing this file from the built record package.
Summary
The microphone check requires the use of addModule, which must load a separate JS file that creates/registers the Audio Worklet Processor for the mic check. I haven't been able to figure out how to access this JS file in the built version of the record package, and have resorted to loading it from the lookit-api static directory. This solution is not ideal because it belongs with the record package, and we're copying it into the lookit-api repo.
Options:
Because the mic check code has to be separate file, the code can't be added into the record package's main output file in dist (index.browser.js). But we could copy the file as-is into dist and try to load from there (so far I haven't been able to get this to work).
Keep the mic check file in the lookit-api static directory, and add a build process that updates the lookit-api version whenever changes are made to the lookit-jspsych file (e.g. hook for commits on main).
Publish/host the mic check file separately (via NPM/unpkg?) and load it as a URL. This way, in the record package code, instead of doing this: .addModule("/static/js/mic_check.js")
we could do this: .addModule("https://unpkg.com/lookit-jspsych/record/mic_check.js").
The text was updated successfully, but these errors were encountered:
TL;DR
We have a separate mic check file that should be part of the lookit-jspsych repo, in the
record
package, but has been copied into the lookit-api files because of problems accessing this file from the builtrecord
package.Summary
The microphone check requires the use of
addModule
, which must load a separate JS file that creates/registers the Audio Worklet Processor for the mic check. I haven't been able to figure out how to access this JS file in the built version of therecord
package, and have resorted to loading it from the lookit-api static directory. This solution is not ideal because it belongs with therecord
package, and we're copying it into the lookit-api repo.Options:
record
package's main output file indist
(index.browser.js
). But we could copy the file as-is intodist
and try to load from there (so far I haven't been able to get this to work).main
).record
package code, instead of doing this:.addModule("/static/js/mic_check.js")
we could do this:
.addModule("https://unpkg.com/lookit-jspsych/record/mic_check.js")
.The text was updated successfully, but these errors were encountered: