Chrome fires deviceReady event when cam is in use
See original GitHub issueDescription
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 a deviceReady
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.
- I start the local windows 10 camera app and let it hold camera.
- I then proceed into my app and go to the video recording page.
- In Chrome I get a deviceReady called in my page - my page enables the start video capture button.
- When I click the start capture button get the above error in javascript console.
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.
VM16438 1.chunk.js:83096 VIDEOJS: ERROR: DOMException: Failed to execute 'start' on 'MediaRecorder': The MediaRecorder failed to start because there are no audio or video tracks available.
at MediaStreamRecorder.record (http://localhost:5004/static/js/1.chunk.js:99218:21)
at initRecorder (http://localhost:5004/static/js/1.chunk.js:97053:19)
at Object.startRecording (http://localhost:5004/static/js/1.chunk.js:97035:5)
at MRecordRTC.startRecording (http://localhost:5004/static/js/1.chunk.js:98180:28)
at RecordRTCEngine.start (webpack://VideojsRecord/./src/js/engine/record-rtc.js?:96:19)
at Record.startRecording (webpack://VideojsRecord/./src/js/videojs.record.js?:622:19)
at Player.eval (webpack://VideojsRecord/./src/js/videojs.record.js?:600:22)
at HTMLDivElement.bound (http://localhost:5004/static/js/1.chunk.js:116215:15)
at HTMLDivElement.func (http://localhost:5004/static/js/1.chunk.js:116042:8)
at HTMLDivElement.data.dispatcher (http://localhost:5004/static/js/1.chunk.js:115857:31)
at trigger (http://localhost:5004/static/js/1.chunk.js:115995:25)
at Player.trigger$$1 [as trigger] (http://localhost:5004/static/js/1.chunk.js:116904:12)
at Player.(anonymous function) [as handleTechLoadedmetadata_] (http://localhost:5004/static/js/1.chunk.js:138060:17)
at Html5.bound (http://localhost:5004/static/js/1.chunk.js:116215:15)
at HTMLVideoElement.bound (http://localhost:5004/static/js/1.chunk.js:116215:15)
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.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
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.
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.
Come on, this can’t be real. 🤦♂️