Ah, I assumed it was an online test that the students would be taking off campus - but then it seems that the solution you found is good! All you gotta do is take this HTML snippet:
<p><video class="exam-video" style="width: 100%; height: 100%;" src="INSERT-LINK" controls="controls"></video></p>
And insert it into the quiz question (using the HTML editor). Replace where it says "INSERT-LINK" with the link to the video you want to play - retain the "" around the link. This has to be a direct link to the video and not something an embed link from YouTube or Vimeo.
This is a paragraph with a video in it, scaling 100% meaning it will scale to the max size of the quiz question window (and it will respond if the window is resized). It has a special class called "exam-video" which we will be using to target it's video controls for removal. We handle this with JavaScript, so you will need to upload a JavaScript file in the Canvas account themes. This is the JS you need:
if (document.getElementsByClassName("exam-video") != null){
const exam_video = document.querySelector(".exam-video")
exam_video.addEventListener("play", (event) => {
exam_video.removeAttribute("controls");
});
}
This works a little different than the GitHub project you posted, issue being that Canvas doesn't allow inline-JavaScript in the Rich Content Editor and it will be erased upon saving the content. But basically, this little script checks - every time a page on the course account is loaded - if there's any elements on the page with the "exam-video" class and if true, it adds an event to the video that removes the video controls once the video plays.
You can get both the HTML and the JS file here: https://github.com/MichaelMarboe/remove_vidcontrols
Then, go into your Canvas instance and open the sub-account that has the course with the exam quiz in it. Select Themes on the left-side menu, open your current theme, select Upload in the top left corner, find JavaScript and select the JavaScript file on your computer. NB: If there's already a JavaScript file here, you already have custom JavaScript and you will need to make a file that has both this code and mine (put it in the end of the file using something like Sublime Text to edit it). Hit Preview, Save and then Apply and you should be up and running. 🙂
NB: This won't work on more than the first exam-video per page load. Also, do some tests once it's up and running - I only tested it in a single question in a classic quiz (not the New Quizzes but it should work the same).
Edit: I only tested this in Firefox. The script will use whatever standard, basic video controls the browser has (and they can vary a bit) but if the special lockdown browser you're using doesn't have basic video controls in it, this may not work at all.