This fixes a problem with the webcam display in the video-assent frame. This problem was introduced recently when I made changes to ensure that the video recorder was ready before the participant was able to start recording in the video-assent and video-consent frames (#388).
Description of changes
The check for camera/recorder use (doUseCamera) was only checking for recordWholeProcedure and recordLastPage - now it also checks to see whether any of the pages display the webcam feed.
While testing this version, I noticed that the whenPossibleToRecordObserver could incorrectly trigger the next page more than and the logic was overly complicated. I simplified it so that now it only has an effect on the very first page (since we're just checking whether the recorder is ready at the start, to trigger the first page content). And now when the recorder is ready, the logic is simpler and less error-prone: it either just starts the recording (if recording should start automatically) or shows the first page content.
Setting the recorder container's width centers it in the page content. This change only affects the video-assent frame.
Testing
I've tested this in all of the recording/non-recording variations that were tested in #388:
record whole procedure
record last page
no recording
session recording (see 'Docs Updates' section)
As well as the recording-related parameter combinations involving webcam display:
webcam shown on first page
webcam shown on second page
webcam shown on both pages
webcam not shown
Screenshots
Currently, when the showWebcam: true parameter setting is used, the frame does not the display the webcam feed as it should:
This change fixes this so that the showWebcam: true setting works correctly:
Docs Updates
As part of testing, I noticed that the webcam display does not work when session recording is in progress. Getting that to work is non-trivial, as the session recorder is attached to a different part of the page (so that it keeps running across frames) and it is designed to stay hidden. Also, AFAIK there's no strong use case for using session recording during consent/assent frames. Therefore I've added a note to the docs to warn users not to use session recording during the video-assent/consent frames, and instead to start session recording after those frames.
Fixes #398
Summary
This fixes a problem with the webcam display in the
video-assent
frame. This problem was introduced recently when I made changes to ensure that the video recorder was ready before the participant was able to start recording in the video-assent and video-consent frames (#388).Description of changes
doUseCamera
) was only checking forrecordWholeProcedure
andrecordLastPage
- now it also checks to see whether any of the pages display the webcam feed.whenPossibleToRecordObserver
could incorrectly trigger the next page more than and the logic was overly complicated. I simplified it so that now it only has an effect on the very first page (since we're just checking whether the recorder is ready at the start, to trigger the first page content). And now when the recorder is ready, the logic is simpler and less error-prone: it either just starts the recording (if recording should start automatically) or shows the first page content.Testing
I've tested this in all of the recording/non-recording variations that were tested in #388:
As well as the recording-related parameter combinations involving webcam display:
Screenshots
Currently, when the
showWebcam: true
parameter setting is used, the frame does not the display the webcam feed as it should:This change fixes this so that the
showWebcam: true
setting works correctly:Docs Updates
As part of testing, I noticed that the webcam display does not work when session recording is in progress. Getting that to work is non-trivial, as the session recorder is attached to a different part of the page (so that it keeps running across frames) and it is designed to stay hidden. Also, AFAIK there's no strong use case for using session recording during consent/assent frames. Therefore I've added a note to the docs to warn users not to use session recording during the video-assent/consent frames, and instead to start session recording after those frames.
video assent docs page
video consent docs page