-
-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Support for Spacebar WebRTC #1108
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a tiny amount of work :)
if there isn't already, there should be a way to disable webrtc from loading, because I use windows for development, and I am not switching anytime soon. either config, or at the very least an environment variable |
Worst case you could use WSL I guess? |
Signed-off-by: Christopher Lentocha <[email protected]>
Signed-off-by: Christopher Lentocha <[email protected]>
Signed-off-by: Christopher Lentocha <[email protected]>
Signed-off-by: Christopher Lentocha <[email protected]>
Added but it needs testing directly on Windows, which I don't have, I have Linux. |
No. WSL Is NOT a option, WSL requires Hyper-v which is garbage in general,, slow, etc... WSL is more like emulation than a layer like WineHQ |
what? Wine is a stdlib overlay + bincompat layer, WSL is a full on vm (and it isnt slow either) |
Marked as ready since its possible to disable webrtc |
src/bundle/WinServer.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to include a separate file for windows, you could use dynamic imports or just, a top level if statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to include a separate file for windows, you could use dynamic imports or just, a top level if statement?
I tried, it doesn't seem to work out, because import is required to be used (const require doesn't seem to work) and needs to be at the top without an "if" statement. What I did in my last commit was the easiest and probably cleanest, and understandable by someone else.
You can just (if you want)
diff -aprNu src/bundle/Server.ts src/bundle/WinServer.ts
guild_id: voiceState.guild_id, | ||
user_id: this.user_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is incorrect. That parameter is used to determine the recipients of this gateway event. Your edit only sends the event to the user who left the channel, which means other users in the voice channel won't be updated.
@@ -84,7 +84,7 @@ export class VoiceState extends BaseClass { | |||
@Column({ nullable: true }) | |||
self_stream?: boolean; | |||
|
|||
@Column() | |||
@Column({ nullable: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be nullable, it should just be set to false by default. Regardless, you didn't write migrations for this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be nullable, it should just be set to false by default.
What do you mean by "false by default"?
Regardless, you didn't write migrations for this change.
Wasn't sure if I would keep the change but I will write mig's once the first question gets answered.
server: this.server, | ||
noServer: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rory&, this was done so that the websocket server would not be responsible for upgrading http connections, which is now done above with the uncommented update listener. This was done so that voice ws is mounted on /voice
I don't think this is necessary though, I would rather it just use a different port? This makes routing through nginx less difficult when using bundle.
Signed-off-by: Christopher Lentocha <[email protected]>
WSL 2 needs Hyper-v, the original WSL is to windows what wine is to linux |
honestly, hyper-v/WSL2 is completely fine, the slow part is the 9PFS mount for your windows drive |
please note: WebRTC was ONLY tested using a test client that was since deleted by spacebar owners, no other clients were tested, nor bot libraries were either (discord.js didn't work for me since it always requires a https connection)
NOTE: This PR DOES NOT add Screen sharing, but adds webcam support and voice
BREAKING CHANGES: Windows can no longer be supported after this PR is merged, because medooze-media-server doesn't support windowsWebRTC can now be disabled with a env var to continue support for WindowsKnown bugs: