Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f01c941c90 | ||
|
|
95d391e869 | ||
|
|
af107168db |
@@ -13,6 +13,8 @@
|
||||
<description>
|
||||
<p>A very WIP custom discord client that supports streaming with audio on Linux, made possible by the great work of @edisionnano and the Rohrkabel library by @Curve.</p>
|
||||
<p>The purpose of this project is not to provide an alternative to the original Discord client. Rather, it should be used in addition to the original client in case you want to stream something, maybe used with a second account. For anything else, this client has way too many things that work less well than in the original client.</p>
|
||||
<p>Technically this could be against Discord's TOS, so be warned. Discord probably won't ban you for using this, but if they do I told you and it's not my fault.</p>
|
||||
<p>Known issues:<ul><li>Only works with PipeWire</li><li>Can only share primary screen on X11</li></ul></p>
|
||||
</description>
|
||||
|
||||
<launchable type="desktop-id">
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
navigator.mediaDevices.chromiumGetDisplayMedia =
|
||||
navigator.mediaDevices.getDisplayMedia;
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
const getAudioDevice = async (nameOfAudioDevice) => {
|
||||
await navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
});
|
||||
await sleep(500);
|
||||
let devices = await navigator.mediaDevices.enumerateDevices();
|
||||
let audioDevice = devices.find(({ label }) => label === nameOfAudioDevice);
|
||||
return audioDevice;
|
||||
|
||||
14
src/main.cpp
14
src/main.cpp
@@ -1,3 +1,5 @@
|
||||
#include "main.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "virtmic.h"
|
||||
|
||||
@@ -20,10 +22,9 @@ int main(int argc, char *argv[]) {
|
||||
QCommandLineOption virtmicOption("virtmic", "Start the Virtual Microphone",
|
||||
"target");
|
||||
parser.addOption(virtmicOption);
|
||||
#ifdef DEBUG
|
||||
parser.addOption(QCommandLineOption(
|
||||
"remote-debugging-port", "Chromium Remote Debugging Port", "port"));
|
||||
#endif
|
||||
QCommandLineOption degubOption("remote-debugging",
|
||||
"Open Chromium Remote Debugging on port 9222");
|
||||
parser.addOption(degubOption);
|
||||
parser.process(app);
|
||||
|
||||
if (parser.isSet(virtmicOption)) {
|
||||
@@ -34,6 +35,11 @@ int main(int argc, char *argv[]) {
|
||||
"--enable-features=WebRTCPipeWireCapturer " +
|
||||
qgetenv("QTWEBENGINE_CHROMIUM_FLAGS"));
|
||||
|
||||
if (parser.isSet(degubOption))
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS",
|
||||
"--remote-debugging-port=9222 " +
|
||||
qgetenv("QTWEBENGINE_CHROMIUM_FLAGS"));
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
|
||||
|
||||
6
src/main.h
Normal file
6
src/main.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
int main(int argc, char *argv[]);
|
||||
void addToEnvVar(const char *var, const char *val);
|
||||
Reference in New Issue
Block a user