Skip to content

autoMuteDevice not working in Chrome #389

Open
@retrocausal

Description

@retrocausal

Description

This has been discussed across various tickets #304 , #157 etc.
Basically, Upon hitting stop / on finishing recording, the devices Must Turn Off.
Since this isn't happening, we are either to pass autoMuteDevices, or, handle it in a callback.
However, even with these options configured, the user can only record Once. A second tap on record with these configurations in place, breaks MediaRecorder and throws a DOM Exception

Steps to reproduce

  1. Create a react component with react v16.2
  2. install videojs-record from npm with all its dependencies - version 3.8.0
  3. import videojs into your component.
  4. write out your component exactly as it is in the guide / wiki
  5. add autoMuteDevices to the record plugin and set it to true
  6. Also add a callback to your onFinish / onStop events on the player. and follow the code as given here
  7. open your component on the browser
  8. hit record
  9. Once recording is complete, Hit record again.

Results

Expected

  1. All controls must be retained
  2. The recorder must start recording again

Actual

  1. The stop button disappears, as does the replay button
  2. The recorder resizes abruptly and then comes back to actual dimensions.
  3. There are errors on the console that say
    VIDEOJS: ERROR: DOMException: Failed to execute 'start' on 'MediaRecorder': The MediaRecorder failed to start because there are no audio or video tracks available.
  4. The recorder turns blank on timeout - maxLength without recording anything

Error output

If there are any errors at all, please include them here.
VIDEOJS: ERROR: DOMException: Failed to execute 'start' on 'MediaRecorder': The MediaRecorder failed to start because there are no audio or video tracks available.

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

what version of videojs does this occur with?
3.8.0

browsers

what browser(s) are affected? Make sure to test with all third-party browser
chrome v75.x / firefox v 67.x
extensions disabled.

OSes

what platforms (operating systems and devices) are affected?
macOS mojave

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