I have reused / modified the available demo samples from RecordRTC as part of my project requirements. Now, I can record Camera + Mic with Screen Recording + Microphone / Speaker Audio.
Because, I have included audio: true
in getDisplayMedia()
, it show the Share Audio
checkbox in the Choose What To Share
popup window which actually allows the user to record the speaker / microphone audio with screen sharing. Here is the code sample for including the Share Audio
checkbox on the popup window:
if (navigator.mediaDevices.getDisplayMedia) {
navigator.mediaDevices.getDisplayMedia({video: true, audio: true}).then(success).catch(error);
}
else {
navigator.getDisplayMedia({video: true, audio: true}).then(success).catch(error);
}
Currently, the Share Audio
checkbox appears as unchecked by default like as follow:
I want this to be always set to true / checked. I've observed that the same checkbox is always set to true / checked by default within the google chrome extension when a user choose to record screen with speaker / microphone sound. I have already done the same functionality in my project as well except the checkbox appears unchecked by default. I want it to be checked by default.
Is it possible with custom JavaScript or JQuery code or do I have to modify system / chrome setting?
you can get audio stream first then add it to display video stream