extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Add PeerJS Extension

Open MikeDev101 opened this issue 10 months ago • 24 comments

https://github.com/cloudlink-omega/peerjs-scratch

This was intended to be an experimental foundation for a CL5 rewrite but I thought it would be perfectly fine making it it's own thing.

I'm not 100% sure if my tweaks to the original code would make it fully compliant with the "Banned APIs" section.

MikeDev101 avatar Jan 29 '25 18:01 MikeDev101

PeerJS?! Your Adding It? Yayyyyyyyyyy

Thebloxers998 avatar Feb 01 '25 17:02 Thebloxers998

Where is the create peer block

Thebloxers998 avatar Feb 01 '25 17:02 Thebloxers998

Noted requested changes, will be working on them.

MikeDev101 avatar Feb 05 '25 21:02 MikeDev101

I'll do a review

CubesterYT avatar Feb 06 '25 01:02 CubesterYT

!format

CubesterYT avatar Feb 06 '25 02:02 CubesterYT

huh, neat

MikeDev101 avatar Feb 06 '25 02:02 MikeDev101

huh, neat

Yeah, lol, it's a workflow I made (polished by GarboMuffin)

CubesterYT avatar Feb 06 '25 02:02 CubesterYT

since we're here, can someone please fix the website's credit link to point to my new account? thanks

MikeDev101 avatar Feb 06 '25 02:02 MikeDev101

Ok, I haven't run this yet or looked at the code. I'm clicking this button so people don't get eager and merge it too early.

I'm sad about that, but it's understandable.

If this is true p2p then we need something like Scratch.canP2P() that attempts to explain the risks of sharing IP with random people

This is a valid concern. I have no intentions of merging without letting people know what they're working with.

(Since the WebRTC stack that it runs on top of supports forced TURN-only mode, I might enable that. TURN should prevent IP leaking at the cost of increased latency.)

Don't know yet what the approach should be for the big copied and pasted compressed library but will have to be figured out first

Yeah. Before I made the PR I had the library loaded dynamically and injected into the DOM...

MikeDev101 avatar Feb 06 '25 13:02 MikeDev101

let's see if this will work for me

MikeDev101 avatar Feb 06 '25 13:02 MikeDev101

~~!format~~

~~guess not.~~

spoke too soon?

MikeDev101 avatar Feb 06 '25 13:02 MikeDev101

I don't think I'm using Scratch.canRecordAudio() correctly - Is it awaitable or is it blocking?

MikeDev101 avatar Feb 06 '25 13:02 MikeDev101

I don't think I'm using Scratch.canRecordAudio() correctly - Is it awaitable or is it blocking?

it's async (so awaitable)

CST1229 avatar Feb 06 '25 14:02 CST1229

!format

MikeDev101 avatar Feb 06 '25 23:02 MikeDev101

:sob:

MikeDev101 avatar Feb 07 '25 00:02 MikeDev101

Why does the block "enableVerboseLogs" exist even though the toggle logs block exists?

SharkPool-SP avatar Feb 07 '25 03:02 SharkPool-SP

Why does the block "enableVerboseLogs" exist even though the toggle logs block exists?

He released this extension earlier to his own people, so technically, just like your extensions, they are already being used by real people, and he rather not break compatibility.

CubesterYT avatar Feb 07 '25 03:02 CubesterYT

Why does the block "enableVerboseLogs" exist even though the toggle logs block exists?

He released this extension earlier to his own people, so technically, just like your extensions, they are already being used by real people, and he rather not break compatibility.

Ah okay.

SharkPool-SP avatar Feb 07 '25 05:02 SharkPool-SP

Seems all good then

SharkPool-SP avatar Feb 07 '25 05:02 SharkPool-SP

I realized way too late that I forgot to add a function to close channels. Oopsies.

This should be a draft anyways since TW needs some sort of warning mechanism about P2P.

MikeDev101 avatar Mar 31 '25 18:03 MikeDev101

So can someone help me understand what exactly is keeping this from being merged?

Brackets-Coder avatar Jul 17 '25 14:07 Brackets-Coder

So can someone help me understand what exactly is keeping this from being merged?

I haven't paid much attention to this issue, but there are a few key elements that needs addressing before it's safe to merge.

  1. Lack of ability to close a channel.
  2. Known bug with certain hats - This could be remedied by backporting CL5 code.
  3. TW still doesn't have a mechanism for alerting users about P2P connections.

MikeDev101 avatar Sep 22 '25 14:09 MikeDev101

https://github.com/cloudlink-omega/peerjs-scratch/issues/4

MikeDev101 avatar Sep 22 '25 14:09 MikeDev101

Going to bump this. The repository changed ownership back to my personal account, and there have been a few bugfixes here and there. Still waiting on some sort of menu alert to warn about P2P connectivity.

Edit: I am stupid and realized that bumps don't exist for PRs

MikeDev101 avatar Oct 15 '25 02:10 MikeDev101