Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mute audio on live recording reloading the video #603

Open
keval101 opened this issue Aug 18, 2021 · 3 comments
Open

mute audio on live recording reloading the video #603

keval101 opened this issue Aug 18, 2021 · 3 comments

Comments

@keval101
Copy link

keval101 commented Aug 18, 2021

Description

I want mute functionality on live video but when I change audio: false in config, live recording is started again

Steps to reproduce

 this.config = {
      controls: false,
      autoplay: false,
      fluid: false,
      loop: false,
      width: 320,
      height: 240,
      bigPlayButton: false,
      controlBar: {
        fullscreenToggle: false,
        volumePanel: false,
        recordIndicator: false,
      },
      plugins:{
        // configure videojs-record plugin
        record: {
          audio: true,
          video: {
            facingMode: 'environment',
          },
          debug: true,
          maxLength: 10000
        }
      }
    };
  }

this.headerService.muteUnmuteMic.subscribe(
      res =>{
        console.log(res)
        this.micValue = res
        console.log(this.micValue)
        this.config.plugins.record.audio = this.micValue
       
      })

Results

When I change audio in config, it reload the recording.

Expected

It should not reload recording. It should disable/enable audio while recording is going on

Actual

Please describe what actually happened.

Error output

If there are any errors at all, please include them here.

Additional Information

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

versions

videojs

what version of videojs does this occur with?

browsers

what browser(s) are affected? Make sure to test with all third-party browser extensions disabled.

OSes

what platforms (operating systems and devices) are affected?

@thijstriemstra
Copy link
Member

I want mute functionality on live video

Can you clarify? Sounds like you want a video-only recording?

@keval101
Copy link
Author

keval101 commented Aug 19, 2021

No... I want mute and unmute audio functionality while audio-video recording.

@z639
Copy link

z639 commented Feb 25, 2023

Keep the constraints to true. ie: audio : true and mute the track.

player.record().stream.getTracks().forEach((track,) => { if (track.kind === "audio") { track.enabled = false; // false = muted, true = not muted. } });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants