[mirotalk] - screen share: allow tab audio if mic audio off

This commit is contained in:
Miroslav Pejic
2024-02-05 13:58:13 +01:00
parent 972811fde6
commit 7d15d575e4
4 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ dependencies: {
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.2.81
* @version 1.2.82
*
*/
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mirotalk",
"version": "1.2.81",
"version": "1.2.82",
"description": "A free WebRTC browser-based video call",
"main": "server.js",
"scripts": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+6 -4
View File
@@ -15,7 +15,7 @@
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.2.81
* @version 1.2.82
*
*/
@@ -5532,8 +5532,10 @@ async function toggleScreenSharing(init = false) {
try {
// Set screen frame rate
screenMaxFrameRate = parseInt(screenFpsSelect.value, 10);
// Screen share constraints
const constraints = {
audio: false,
audio: myAudioStatus ? false : true,
video: { frameRate: screenMaxFrameRate },
};
@@ -5573,8 +5575,8 @@ async function toggleScreenSharing(init = false) {
await emitPeerStatus('screen', myScreenStatus);
await stopLocalVideoTrack();
await refreshMyLocalStream(screenMediaPromise);
await refreshMyStreamToPeers(screenMediaPromise);
await refreshMyLocalStream(screenMediaPromise, !useAudio);
await refreshMyStreamToPeers(screenMediaPromise, !useAudio);
if (init) {
// Handle init media stream