Skip to content
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

Change WebRTC & Bun Support #38

Closed
mertushka opened this issue Jan 5, 2025 · 5 comments
Closed

Change WebRTC & Bun Support #38

mertushka opened this issue Jan 5, 2025 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mertushka
Copy link
Owner

A new branch, node-datachannel, has been created to replace the previous wrtc module with the node-datachannel module. This change aims to provide a more efficient and flexible approach to handling WebRTC within the haxball.js.

Changes:

  • WebRTC Module Replacement: The switch from wrtc to node-datachannel is expected to improve both performance and stability when managing WebRTC.
  • Bun Compatibility: After conducting tests, I can confirm that this branch is fully compatible with Bun. This should offer a faster and more efficient runtime environment for users leveraging Bun.

How to Test:

To begin testing this new branch, please follow the steps below:

  1. Update haxball.js's version to this branch in your package.json
"dependencies": {
   "haxball.js": "github:mertushka/haxball.js#node-datachannel"
}
  1. Run npm install or bun install (and bun pm trust node-datachannel)
  2. Test the functionality within your project.

Known Issue with Bun:

There is a currently unconfirmed bug with Bun when using the node-datachannel library. Please apply the workaround provided in the issue linked below until it is resolved: murat-dogan/node-datachannel#318

Feedback Needed:

Your feedback is essential to ensure the stability and compatibility of this change. Specifically, I’m interested in:

  • General performance and stability with the new node-datachannel library.
  • Any issues or unexpected behavior that might arise when using this branch.
  • Reports of compatibility with Bun, especially in production environments.
@mertushka mertushka added enhancement New feature or request help wanted Extra attention is needed labels Jan 5, 2025
@mertushka mertushka self-assigned this Jan 5, 2025
@mertushka mertushka pinned this issue Jan 5, 2025
@mertushka mertushka mentioned this issue Jan 5, 2025
@Mistik
Copy link

Mistik commented Jan 6, 2025

Have you tried PeerJS?

@mertushka
Copy link
Owner Author

Have you tried PeerJS?

Thanks for your suggestion. However, I believe PeerJS might be irrelevant in this context because i think it’s a library designed to simplify WebRTC usage in web browsers. Since our focus here is on server-side WebRTC functionality in Node.js, PeerJS doesn't directly address our needs. What do you think?

@Mistik
Copy link

Mistik commented Jan 6, 2025

PeerJS

They have a server also I thought https://github.com/peers/peerjs-server

Btw does haxball.js have a developer discord?

@mertushka
Copy link
Owner Author

No, we don't have a discord server for developers.

@mertushka
Copy link
Owner Author

Done with #40

@mertushka mertushka unpinned this issue Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants