A post about remote connection I found

I'm wondering if it can be improved with a library that's in Snap!...

I think it's too bleeding edge to be made into a library just yet

WebRTC is an official web standard. I see that Mozilla writes "Because implementations of WebRTC are still evolving, and because each browser has different levels of support for codecs and WebRTC features, you should strongly consider making use of the Adapter.js library provided by Google before you begin to write your code."

However, this is relevant only if one were to extend this project to send audio or video. I believe the data part of WebRTC is mature.

The project itself could be simplified by someone who knows the Snap! internals better than me since most of the JavaScript is for converting data between Snap! and JavaScript and calling a block from within JavaScript. Further simplifications could rely upon Snap!'s new abilities to produce and consume JSON.

WebRTC can support multi-player Snap! projects and also simplify real-time remote collaboration between Snap! programmers.

I meant implementing it with an existing library.


Yes, but you have to enable JS before you can use it.

If this code was made into a library, then that wouldn't matter (?)

I can easily incorporate it into the eCraft2Learn library by using this block

untitled script pic (52)

So enabling JavaScript would no longer be necessary.

But this primitive was white-listed to enable access to AI and machine learning components and while I am not aware of any danger from WebRTC, I'll only add it if some of the Snap! developers agrees that it is harmless and helpful.

Makes sense. I feel like I’ve been saying that a lot recently, haha.

That's why I want to make it with a built-in library!

I took a look at the link you gave, and it seems quite interesting!