Open rluiten opened 5 years ago
this is probably hopefully an upstream issue in RecordRTC..
Do you mean this ? https://github.com/muaz-khan/RecordRTC Should I report it there ?
@rluiten yeah that is the 'recorder' library that videojs-record uses, but not sure if the bug's there, I'll have to check. Can you try one of the recordrtc examples and see if you get different/better error messages there?
I can try, can you point me at one? Or just dig around in the RecordRTC doc?
Ok tried out https://www.webrtc-experiment.com/RecordRTC/simple-demos/video-recording.html
In Firefox 66 in Private mode with my video tied up by the Win10 Camera app.
Visible in the js console i see this error logged in console after I click Ok on the Unable capture dialog
MediaStreamError { name: "NotReadableError", message: "Failed to allocate videosource", constraint: "", stack: "" }
In Chrome 73 in Incognito mode with my video tied up by the Win10 Camera app.
started recording video stream.
RecordRTC.js:1049 Using recorderType: MediaStreamRecorder
RecordRTC.js:2081 Passing following config over MediaRecorder API. {type: "video", mimeType: "video/webm", initCallback: ƒ, checkForInactiveTracks: false}
RecordRTC.js:705 Recorder state changed: recording
RecordRTC.js:99 Initialized recorderType: MediaStreamRecorder for output-type: video
RecordRTC.js:763 RecordRTC is destroyed.
destroy @ RecordRTC.js:763
stopRecordingCallback @ video-recording.html:40
_callback @ RecordRTC.js:177
mediaRecorder.ondataavailable @ RecordRTC.js:2148
blob:https://www.webrtc-experiment.com/0ce9274c-8eee-4d2c-8a0e-134b57637880:1 GET blob:https://www.webrtc-experiment.com/0ce9274c-8eee-4d2c-8a0e-134b57637880 net::ERR_REQUEST_RANGE_NOT_SATISFIABLE
So Chrome doesnt report video unavailable it appears.
thanks for the details. There's also a lot of info here: https://blog.addpipe.com/common-getusermedia-errors/ Maybe try something like:
var constraints = {
video: true,
audio: true
}
navigator.mediaDevices.getUserMedia(constraints).then(function success(stream) {
console.log('device ready');
}).catch(function(err) {
//log to console first
console.log(err); /* handle the error */
if (err.name == "NotFoundError" || err.name == "DevicesNotFoundError") {
//required track is missing
} else if (err.name == "NotReadableError" || err.name == "TrackStartError") {
//webcam or mic are already in use
} else if (err.name == "OverconstrainedError" || err.name == "ConstraintNotSatisfiedError") {
//constraints can not be satisfied by avb. devices
} else if (err.name == "NotAllowedError" || err.name == "PermissionDeniedError") {
//permission denied in browser
} else if (err.name == "TypeError" || err.name == "TypeError") {
//empty constraints object
} else {
//other errors
}
});
Nice, I should be able to figure where I am at with that page and your example. Thanks so much! I'll let you know if I learn anything else I think might be useful.
Even using that code directly with getUserMedia() is failing in Chrome to tell me its in use, it behaves as if the video stream is available. Oh well, it a known problem its not a show stopper for me at the moment.
Thanks for the details. Annoying issue. Not sure if this ticket should be closed or.. Did you find any chrome/chromium bug reports for this? And if not, maybe open one?
I havnt gone looking in chrome bugs, but it does appear to be squarely in that court. I did a few searches, but got little information on any reports or even properly where to report it.
this is from '15: https://stackoverflow.com/questions/31108855/webrtc-check-if-camera-and-microphone-are-in-use-on-chrome If it's still a bug, chrome is just lame.
I do hope the chromium devs have an open issue for this, haven't found it yet though.
The testrtc project has a test that detects silence from a microphone here that could be useful in determining if the audio track returned is silent, and a similar video test that detects frozen or black frames.
Come on, this can't be real. :man_facepalming:
Description
In Firefox 66 I get a
deviceErrorCode
name of "NotReadableError" if video is in use.In Chrome 73 I do not get a
deviceError
in fact i get adeviceReady
But when I try to start recording I get an error in console.This data is captured in my local dev environment.
Steps to reproduce
On my Windows 10 (build 1803) development pc.
The error isn't surprising, what is surprising is that I get a deviceReady. Despite reporting deviceReady I do not see the video preview it remains black.
Results
Expected
In Chrome I should receive deviceError event.
Actual
In Chrome I do receive a
deviceReady
event. It fails later in start() video capture.Error output
This error appears in the Chrome js console when I execute start() because Chrome things I have the device due to deviceReady event.
Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs
"videojs-record": "^3.6.0"
browsers
Launched in Incognito mode in Chrome to isolate addons.
OSes
Windows 10 build 1803 64bit, up to date patches.