mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(voice): reuse the Linux audio capture across routing changes (#2440)
This commit is contained in:
1 parent
cc3a9c8613
commit
587324fa38
11 files changed
+206
-1
No files matched your search
+9
@@ -75,6 +75,7 @@ import {
|
||||
captureNativeAudioTrackForLinuxRouting,
|
||||
commitNativeAudioBridgeReplacement,
|
||||
disarmNativeAudio,
|
||||
reconfigureLinuxNativeAudioRouting,
|
||||
} from '@app/features/voice/utils/NativeAudioCaptureBridge';
|
||||
import {SCREEN_SHARE_DEGRADATION_PREFERENCE} from '@app/features/voice/utils/ScreenShareOptions';
|
||||
import {ScreenShareRollbackIncompleteError} from '@app/features/voice/utils/ScreenShareRollbackIncompleteError';
|
||||
@@ -752,6 +753,14 @@ class VoiceEngineV2AppScreenShareExecutionAdapter extends Store {
|
||||
const participant = room?.localParticipant;
|
||||
if (!participant || !participant.isScreenShareEnabled) return false;
|
||||
if (!linuxRule) return false;
|
||||
if (options.replaceExisting !== true) {
|
||||
const reconfigured = await reconfigureLinuxNativeAudioRouting(linuxRule, options);
|
||||
if (reconfigured !== 'unsupported') {
|
||||
this.syncLocalScreenShareAudioStateInternal(participant, true);
|
||||
this.syncPersistedScreenShareAudioPreferenceInternal(participant);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const capturedTrack = await captureNativeAudioTrackForLinuxRouting(linuxRule, options);
|
||||
if (!capturedTrack) return false;
|
||||
let adopted = false;
|
||||
|
||||
Reference in new issue
Block a user