Skip to content

Get WebRTC backend working again #3818

Open
@juj

Description

@juj
Collaborator

Poking at the test sockets.test_webrtc, I see that we have removed the whole WebRTC backend from Emscripten altogether. WebRTC used to be implemented in src/library.js, see e.g. at this point of time: https://github.com/kripken/emscripten/blob/3b99bb7bef220ad98760b117d14854098f86db9e/src/library.js#L7032, where the two implementations WebRTC vs WebSockets were chosen based on a #if SOCKET_WEBRTC. Looks like the WebRTC part of it was never integrated as part of the filesystem in src/library_sockfs.js, which only carries WebSockets -specific code.

This commit d92efe0 removes the sockets specific code from src/library.js, but looks like the WebRTC implementation was not migrated anywhere else, so it got lost as part of the refactoring.

Activity

kripken

kripken commented on Sep 24, 2015

@kripken
Member

Yes, it was never moved to sockfs, and testing was broken, so I didn't have a reliable way to work on it. We could resurrect it if we figure out how to get testing working again.

luser

luser commented on Jan 25, 2016

@luser

I've got a patch to fix the webrtc backend on top of master:
https://github.com/luser/emscripten/commits/fix-webrtc-sockets

It passes test_webrtc fine here with Firefox. I rebased that patch on top of incoming, but it sounds like more work will be necessary to actually get it working again.

luser

luser commented on Jan 25, 2016

@luser

So AFAICT, what needs to happen is to port the code from here:
https://github.com/kripken/emscripten/blob/3b99bb7bef220ad98760b117d14854098f86db9e/src/library.js#L7032

to library_sockfs.js, in a webrtc_sock_ops like the existing websocket_sock_ops?

kripken

kripken commented on Jan 25, 2016

@kripken
Member

Yes, that's correct.

changed the title [-]WebRTC backend has gone missing.[/-] [+]Get WebRTC backend working again[/+] on Feb 17, 2016
kripken

kripken commented on Feb 17, 2016

@kripken
Member

@luser's patches are at https://github.com/luser/emscripten/commits/webrtc-sockets

should be complete and running on master.

kripken

kripken commented on Feb 17, 2016

@kripken
Member

Separately the patch for SDL_net in there could be landed, if we add a test.

luser

luser commented on Feb 17, 2016

@luser

Sorry, I corrected myself on IRC, that was a slightly outdated branch, the working changes are here: https://github.com/luser/emscripten/commits/webrtc-sockets

luser

luser commented on Feb 17, 2016

@luser

That patch is against master, it'd need a bit of rework to get it working against incoming (as mentioned above, refactoring it to work with sockfs).

kkimdev

kkimdev commented on Jun 1, 2017

@kkimdev
Contributor

Hi, what's the status of this?

jkbbwr

jkbbwr commented on Jan 18, 2019

@jkbbwr

Hi was there any progress on this?

stale

stale commented on Jan 18, 2020

@stale

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

VinnyVicious

VinnyVicious commented on Nov 4, 2022

@VinnyVicious

Can this be re-opened?

reopened this on Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kripken@VinnyVicious@juj@luser@jkbbwr

        Issue actions

          Get WebRTC backend working again · Issue #3818 · emscripten-core/emscripten