[mirotalk] - fix: resolve peer volume indicator not showing after mic toggle
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
# ====================================================
|
||||
# MiroTalk P2P v.1.8.16 - Environment Configuration
|
||||
# MiroTalk P2P v.1.8.17 - Environment Configuration
|
||||
# ====================================================
|
||||
|
||||
# App environment
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* ==============================================
|
||||
* MiroTalk P2P v.1.8.16 - Configuration File
|
||||
* MiroTalk P2P v.1.8.17 - Configuration File
|
||||
* ==============================================
|
||||
*
|
||||
* This file is the central configuration source.
|
||||
|
||||
+1
-1
@@ -45,7 +45,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.8.16
|
||||
* @version 1.8.17
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.8.16",
|
||||
"version": "1.8.17",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mirotalk",
|
||||
"version": "1.8.16",
|
||||
"version": "1.8.17",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@mattermost/client": "11.6.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.8.16",
|
||||
"version": "1.8.17",
|
||||
"description": "A free WebRTC browser-based video call",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ let brand = {
|
||||
},
|
||||
about: {
|
||||
imageUrl: '../images/mirotalk-logo.gif',
|
||||
title: 'WebRTC P2P v1.8.16',
|
||||
title: 'WebRTC P2P v1.8.17',
|
||||
html: `
|
||||
<button
|
||||
id="support-button"
|
||||
|
||||
+2
-2
@@ -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.8.16
|
||||
* @version 1.8.17
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -15532,7 +15532,7 @@ function showAbout() {
|
||||
Swal.fire({
|
||||
background: swBg,
|
||||
position: 'center',
|
||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.8.16',
|
||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.8.17',
|
||||
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
|
||||
customClass: { image: 'img-about' },
|
||||
html: `
|
||||
|
||||
@@ -35,7 +35,6 @@ async function getMicrophoneVolumeIndicator(stream) {
|
||||
workletNode = new AudioWorkletNode(audioContext, 'volume-processor', {
|
||||
processorOptions: {
|
||||
peerId: myPeerId, // Your peer ID
|
||||
myAudioStatus: myAudioStatus, // Your audio status
|
||||
threshold: 10, // Volume threshold
|
||||
silenceThreshold: 0.01, // Silence threshold
|
||||
},
|
||||
|
||||
@@ -4,7 +4,6 @@ class VolumeProcessor extends AudioWorkletProcessor {
|
||||
super();
|
||||
this.threshold = options.processorOptions.threshold || 10;
|
||||
this.peerId = options.processorOptions.peerId || '';
|
||||
this.myAudioStatus = options.processorOptions.myAudioStatus || false;
|
||||
this.silenceThreshold = options.processorOptions.silenceThreshold || 0.01;
|
||||
}
|
||||
|
||||
@@ -32,8 +31,8 @@ class VolumeProcessor extends AudioWorkletProcessor {
|
||||
const volume = Math.max(0, Math.min(1, rms * 10));
|
||||
const finalVolume = Math.round(volume * 100);
|
||||
|
||||
// Only send data when volume exceeds threshold and status is true
|
||||
if (this.myAudioStatus && finalVolume > this.threshold) {
|
||||
// Only send data when volume exceeds threshold
|
||||
if (finalVolume > this.threshold) {
|
||||
this.port.postMessage({
|
||||
type: 'micVolume',
|
||||
peer_id: this.peerId,
|
||||
|
||||
Reference in New Issue
Block a user