diff --git a/examples/jspsych-mirror-camera.html b/examples/jspsych-mirror-camera.html index c48c6cfc..85ccdad9 100644 --- a/examples/jspsych-mirror-camera.html +++ b/examples/jspsych-mirror-camera.html @@ -16,7 +16,8 @@ } const mirror_camera = { - type: jsPsychMirrorCamera + type: jsPsychMirrorCamera, + width: 320, } jsPsych.run([init_camera, mirror_camera]); diff --git a/packages/plugin-mirror-camera/src/index.ts b/packages/plugin-mirror-camera/src/index.ts index f6c00386..50a416c0 100644 --- a/packages/plugin-mirror-camera/src/index.ts +++ b/packages/plugin-mirror-camera/src/index.ts @@ -8,6 +8,16 @@ const info = { type: ParameterType.STRING, default: "Continue", }, + /** Height of the video element */ + height: { + type: ParameterType.INT, + default: null, + }, + /** Width of the video element */ + width: { + type: ParameterType.INT, + default: null, + }, }, }; @@ -33,7 +43,9 @@ class MirrorCameraPlugin implements JsPsychPlugin { this.stream = this.jsPsych.pluginAPI.getCameraStream(); display_element.innerHTML = ` - +

`;