This record-video script works successfully. How can I limit the recording time once the ‘Start’ button is selected?
I'm trying to add this:
<script>
var recordTimeout;
function stopClickHandler(evt) {
clearTimeout(recordTimeout);
}
function startClickHandler(evt) {
stopClickHandler();
recordTimeout = setTimeout(recLimit,3000);
}
var recLimit;
function recLimit() {
stopvideo.addEventListener('click', ())
.trigger( event );
}
document.querySelector(".start").