Skip to content

Commit

Permalink
fix: enable pulseaudio sharing on non-wayland sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
smartfrigde committed Apr 29, 2024
1 parent 362a116 commit fb50a89
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ if (!app.requestSingleInstanceLock() && getConfigSync("multiInstance") == (false
app.commandLine.appendSwitch("disable-features", "WidgetLayering"); // fix dev tools layers
// Your data now belongs to CCP
crashReporter.start({uploadToServer: false});
// enable pulseaudio audio sharing on linux
if (process.platform === "linux") {
app.commandLine.appendSwitch("enable-features", "PulseaudioLoopbackForScreenShare");
app.commandLine.appendSwitch("disable-features", "WebRtcAllowInputVolumeAdjustment");
}
// enable webrtc capturer for wayland
if (process.platform === "linux" && process.env.XDG_SESSION_TYPE?.toLowerCase() === "wayland") {
app.commandLine.appendSwitch("enable-features", "WebRTCPipeWireCapturer,PulseaudioLoopbackForScreenShare");
app.commandLine.appendSwitch("disable-features", "WebRtcAllowInputVolumeAdjustment");
app.commandLine.appendSwitch("enable-features", "WebRTCPipeWireCapturer");
console.log("Wayland detected, using PipeWire for video capture.");
}
// work around chrome 66 disabling autoplay by default
Expand Down

0 comments on commit fb50a89

Please sign in to comment.