Heres my code to record the screen (with audio)
let options = {
video: {
cursor: true,
displaySurface: 'window', // monitor, window, application, browser
},
audio: true,
}
voiceStream = null;
desktopStream = await navigator.mediaDevices.getDisplayMedia(options);
if (audio === true) {
voiceStream = await navigator.mediaDevices.getUserMedia({video: false, audio: true});
}
const tracks = [
...desktopStream.getVideoTracks(),
...utilVideo.mergeAudioStreams(desktopStream, voiceStream)
];
stream = new MediaStream(tracks);
console.log('Stream', stream)
blobs = [];
rec = new MediaRecorder(stream, {mimeType: 'video/'+fileFormat+'; codecs=vp8,opus'});
// If our stream goes inactive (user clicked "Stop" on the browser bar), stop it
stream.addEventListener('inactive', () => {
console.log("inactive");
})
stream.getVideoTracks()[0].onended = function () {
console.log("on ended");
};
rec.onstop = function(e) {
console.log("onstop");
};
rec.ondataavailable = function(e) {
console.log("data available");
blobs.push(e.data);
downloadVideo();
}
stopCapture() {
console.log("stopCapture");
if(rec.state!="inactive"){
rec.stop();
}
if(stream!=null){
stream.getTracks().forEach(s => s.stop())
stream = null;
}
}
downloadVideo(){
console.log("download video");
blob = new Blob(blobs, {type: 'video/webm'});
let url = window.URL.createObjectURL(blob);
let downloadLink = document.createElement('a');
downloadLink.href = url;
downloadLink.download = activeUser.activeProject.getName()+'.webm';
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
}
I call the stop function when the user presses escape. This works fine in Chrome, and I get a download of the file, but nothing happens in FireFox and I can see it’s never getting into the ondataavailable event.
Using the console logs in Chrome when I press escape I get the "stop capture", "Stream" and then the stream, "data available", "download video"
In firefox if i look at the console I get "stop capture", "Stream" and then the stream. Nothing else
Can anyone suggest why the ondataavialable is not called the same was in Firefox as it is in Chrome?
no prescription prednisone canadian pharmacy – where can i buy prednisone without a prescription prednisone over the counter uk
provigil generic – provigil cost provigil 100mg
accutane pills cost – where can you get accutane accutane 80 mg daily
buy amoxicilina 500 mg online – buy amoxicilin online amoxicillin prices at walmart
vardenafil free sample – generic vardenafil canada pharmacy what does vardenafil do
ivermectin cream uk – generic name for ivermectin ivermectin 2mg
buy cialis in mexico online – online pharmacy worldwide shipping cheap online generic cialis
ivermectin cream canada cost – ivermectin tablets uk
buy accutane usa – how to get accutane uk canadian online pharmacy accutane
lyrica 150 price – fastphapl.com online drugstore
buy amoxicillin noscript – buy amoxicillin amoxil 500
buy generic viagra in us – sildenafil gel uk buy cheap generic viagra
where to buy tadalafil – levitra cialis where to order tadalafil tablets
ivermectin 18mg – ivermcitin.com buy stromectol 3mg
prednisone for sale – prednisone dosage buy prednisone 20mg without a prescription best price
modafinil for sale – site modafinil 200mg
zithromax pack – zithromax buy price of zithromax
clomiphene online – bodyclmd where can i buy clomiphene
viagra online canadian pharmacy paypal – how to order viagra in canada where can i order viagra
price for cialis in canada – new cialis canadian pharmacy com
stromectol buy uk – ivermectin 10 ml ivermectin cream canada cost
online slots real money – online casino games live casino slots online
ed pills don t work – ed treatment erectile dysfunction drug
50mg prednisone tablets – purchase prednisone 10mg prednisone 60mg daily