added an option to fix the "Zoom can't capture the sound" problem (it is IMPORTANT to choose "share sound" when share screen in Zoom).

This commit is contained in:
Xiaohan-Tian
2025-08-20 15:48:26 -07:00
parent 365acdae7e
commit c1112f41d5
4 changed files with 78 additions and 0 deletions
@@ -3,6 +3,7 @@ import { ConfigManager } from '../../../core/config/ConfigManager';
const BehaviorSettings: React.FC = () => {
const [chatboxDefaultOpen, setChatboxDefaultOpen] = useState<boolean>(true);
const [enableAudioCapture, setEnableAudioCapture] = useState<boolean>(false);
const configManager = ConfigManager.instance();
@@ -14,6 +15,7 @@ const BehaviorSettings: React.FC = () => {
}
setChatboxDefaultOpen((configManager.get('chatbox.default_open') as boolean) ?? true);
setEnableAudioCapture((configManager.get('audio.enable_audio_capture_for_screen_sharing') as boolean) ?? false);
};
loadConfig();
@@ -26,6 +28,12 @@ const BehaviorSettings: React.FC = () => {
await configManager.set('chatbox.default_open', boolValue);
};
const handleEnableAudioCaptureChange = async (value: string) => {
const boolValue = value === 'yes';
setEnableAudioCapture(boolValue);
await configManager.set('audio.enable_audio_capture_for_screen_sharing', boolValue);
};
return (
<div className="settings-section">
<div className="settings-section-header">
@@ -50,6 +58,29 @@ const BehaviorSettings: React.FC = () => {
</select>
</div>
</div>
<div className="settings-group">
<h4>Audio</h4>
<div className="settings-item">
<label className="settings-label">
Capture Audio for Screen Sharing
</label>
<select
className="settings-select"
value={enableAudioCapture ? 'yes' : 'no'}
onChange={(e) => handleEnableAudioCaptureChange(e.target.value)}
>
<option value="no">No</option>
<option value="yes">Yes</option>
</select>
<div className="settings-help" style={{ fontSize: '12px', color: '#888', marginTop: '4px' }}>
Restart KGStudio (refresh the page) to take effect. Enable this option when KGStudio's audio cannot be captured during screen sharing in video calls (e.g., Zoom, Teams). This creates an additional audio stream that screen capture applications can detect.
<br />
<b>It is important to make sure when screen sharing in Zoom, the "Share Sound" option is enabled.</b>
</div>
</div>
</div>
</div>
</div>
);