REDCap can't natively listen or watch to see how long an embedded video is being played within a REDCap survey (unfortunately).  It can record the amount of time that a user spends in a particular part of a survey (if you are displaying one survey section at a time via the Pagination survey settings) or how long a participant spends in a full survey. You can control oh a REDCap Survey displays online via the below survey setting in the online designer.   

Pagination
One page or multiple pages? Section headers, which begin new sections on the instrument, will serve as the page break in a multi-page survey, in which each page will begin with a section header.

There are a few different ways to track the time spent in a survey or survey section. Here is an example survey that shows some of the tools in action: 

https://redcap.link/EmbeddedVideoTimeTrackingCCTSTResourceCenter


Option 1: Capture Time Stamps and Calculate the Difference between Page Load and Submit

Use the now-server action tag to document the start of the survey or survey section. 


 


Use the capture saved time external module (ask help-redcap@bmi.cchmc.org to add this to your project) to capture the time stamp of when a user hit 'submit' or 'next page' 




Then use a standard calculated field to document the difference in time between the start of the survey or survey section, and the submit or next page click. 

This variable will note the difference between the Start Time and Hitting Next page.  It's a calculated field using the formula: round(datediff([now_server], [capturesavetime], 'm'),2).  Here we are rounding to 2 decimal points. It can also display in seconds, minutes, hours, days, and months by changing the 'm' to 's', 'h', or 'd' or 'M'  


Option 2: Use Survey UI Tweaks


The Survey UI Tweaks External Module (ask help-redcap@bmi.cchmc.org to add this to your project) will allow you to define a variable to record the number of seconds a user was in a survey or a survey section.

This will only give you the duration in seconds, and won't record stop or start time. But it's the fastest to set up. You can use 'option 1' along with 'option 2'


Option 3: Use a StopWatch (if you can trust your survey participants to start the clock)

The Stopwatch External Module (ask help-redcap@bmi.cchmc.org to add this to your project) will allow you to insert a stopwatch with server different options into your project. 


Simple


Option 4: Use HIDESUBMIT Action Tags to hide the Submit or Next Page Options if Attestation to Video Completion is not "Yes" 


The HIDESUBMIT Action Tags External Module (ask help-redcap@bmi.cchmc.org to add this to your project) allows users to conditionally hide various Submit/Save/Next instance buttons on surveys and/or data entry forms using Action Tags and branching logic. In this example, we are hiding "Next Page" until the survey respondent indicates they have watched the video.  



Here we are using the action tag HIDESUBMIT-SURVEY.  

If this field appears based on its branching logic, it will hide the submit option. If this field doesn't appear based on its branching logic, then the submit option will be available.  In this example, we are using the branching logic [watched] <> '1' (watched video does not equal 1) to hide submit or next page until a user attests that they have watched the video. 


Once a user clicks "yes" then [watched] <> '1' (watched video does not equal 1) is no longer true, REDCap hides the variable, and allows "Submit" or "Next Page" to appear. 



Conclusion


A survey demonstrating all of these options can be tested here: https://redcap.link/EmbeddedVideoTimeTrackingCCTSTResourceCenter


Following the implementation of options 1 and 2 your output will look like the below (but you can always hide these values from the survey view).


  • No labels