How can I record response time to a video in Qualtrics using keypress and autoadvancing to next question

Hi all and thanks for reading. I am new to JS and Qualtrics and want to record the response time to a video being played. (For context subjects will be responding to a video of a driving situation and using the enter/return button to respond). I want to be able to record response time for each video. I could use the timing question but that begins the timer from the moment the page loads, I want to record it from the start of the video playing. This is the code I currently have in which enables fullscreen and allows me to press the enter button to then auto advance to the next question. What and where should I add code to capture response time to each video? Any help would be great.

Qualtrics.SurveyEngine.addOnload(function() {
var qid = this.questionId;
document.onkeydown = function(event) {
    if (event.which == 13) {
var qobj = this;
jQuery("#clip1").on("ended", function() { qobj.clickNextButton() });

var element = document.querySelector("#clip1");

    .then(function() {