Thanks again. I tried this without success. Can you tell me if it looks right?
// Upload the video blob as form data
upload.addEventListener('click', () => {
const body = new FormData()
body.append('myvideo', blob)
fetch('upload.php', { method: 'POST', body })
.then(() => console.log('Success!'))
.catch(console.error)
})
$myVideo = $_FILES['myvideo'];
move_uploaded_file(
$myVideo['tmp_name'],
'../uploads/' . basename($myVideo['name'])
);
}
navigator
.mediaDevices
.getUserMedia({ video: true })
.then(initRecorder)
.catch(console.error)
</script>