Skip to content

Chrome fires deviceReady event when cam is in use #367

Open
@rluiten

Description

@rluiten

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 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.

  1. I start the local windows 10 camera app and let it hold camera.
  2. I then proceed into my app and go to the video recording page.
  3. In Chrome I get a deviceReady called in my page - my page enables the start video capture button.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions