-
Notifications
You must be signed in to change notification settings - Fork 23
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
Local peer discovery, to enable local WebRTC connections #242
Comments
One approach is to use clipboard https://gist.github.com/guest271314/04a539c00926e15905b86d05138c113c or a parent HTML page containing |
@guest271314 This proposal is unrelated. I'm referring to the use case where I have several clients on a LAN, and they want to connect their browsers directly to each other. Or, perhaps a use case where the browser is pre-configured to connect to a certain network address somewhere else, transparently from the WebRTC application. In any case, a port that can be opened between browsers on different devices. (I suppose sure, they could be the same device... but that isn't the intent of the proposal.) |
The same approach applies. WebRTC uses SDP to establish connections. It does not matter if it is the same machine or a different machine. As long as you can orivde signaling, or signaling is completed, by any means, the connection can be establish and data and media can be streamed. |
@bradisbell See this answer at WebRTC datachannel with manual signaling, example please?
|
One way to do this on the Web would be to use a private or public gist which is served with I do not fully gather this case
A similar concept re |
Thanks, I'm aware.
The issue isn't in doing the signalling, it's having a channel to do it over in the first place. I can't ask users to copy/paste SDP.
Sure, or, I could just use any signalling server at that point. With no internet access, this won't work.
Yes, and using some native application via browser extension is something I've considered to facilitate all this, but it really needs to be built into the browser to be the most useful. Otherwise, everyone has to install an extension, the developers have to maintain it for all platforms, and mobile browsers don't get to participate. |
That is essentially how API's are developed. I do not wait on
I built it irrespective of what browsers do or do not do. For example, Web Speech API does not provide any means to capture synthesis output.
How do you intended to do that? |
You should be able to create a local |
Let us explore and test our options. This is the Quic implementation I mentioned earlier |
title: Local peer discovery, to enable local WebRTC connections
date: 2020-12-07T22:28:17.424Z
submitter: PRIVATE
number: 5fceac811b340e1de0f630d3
tags: [ ]
discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/
status: [ discussing || in-progress || complete ]
related:
url:
type: [ article || explainer || draft || spec || note || discussion ]
This would be an enhancement to the Channel Messaging API.
Browsers could prompt the user to select a remote browser to connect to. Once chosen, the receiving browser would prompt their user to accept the connection. If agreed, a MessageChannel would be established between the two browsers.
The web pages on each end could then communicate over the ports of the channel. If they wished, they could use these ports as a signalling channel to further create WebRTC connections.
The method that the browsers use to establish the MessageChannel can be a simple TCP connection, or perhaps even a PeerConnection itself. The underlying method is not visible to the web application.
Essentially, we're looking for the same flow that Chromecast currently uses. A user tries to cast content. The browser prompts for which device to connect to. Once chosen, a channel is opened and data can be sent/received. The Chromecast is given a web page URL to load, which can then further set up communication if it chooses. In this proposal, when the receiving user accepts the connection, it is expected that the communication would be sent to the target URL, a new tab would be opened if necessary, or they could choose a different registered URL based on the protocol configured by the sending user.
In other words, if both users have a chat application open (let's call it "SuperChat") and User A tries to connect to User B, User A's connection request will contain a protocol identifier (called "chat-proto"), as well as a URL (https://superchat.example.com/). User B will receive the request, and since they already have https://superchat.example.com/ open, an event will be fired on that page, and it will receive the new port. If the page wasn't already open, a new tab with that page will be opened. Alternatively, User B may have configured their own preferred "chat-proto" handler (perhaps, "UltraChat"), and the URL for UltraChat will be used in this same flow instead.
While the local peer discovery is most important to my immediate use case, it also makes sense that the browser could connect to other peers. Perhaps registered users of Google Chrome may want to connect to other folks on their contact list who are online. In effect, the browsers call each other, and then pass the phone off to the other web application to do all the communicating. It doesn't matter how the browsers "call" each other... whether that's a local network, a friend list, or anything else the browser implementers come up with.
This proposal simplifies several use cases for communication. If I want to connect two computers in the same room, I currently have to establish connectivity through a WebRTC signalling server, send some initial information via e-mail or message, connect, and then eventually get connected locally. This is excessive infrastructure, and prone to failure when there is unreliable internet access. Also, it doesn't enable passive peer discovery. For example, suppose I'm on an plane and want to play a game with someone over a shared network, but there is no internet access. If users want to enable themselves to be discoverable, they should be able to do that.
There is no good workaround today for this problem. At best, a browser extension can enable some of this capability, but it isn't a good solution and not exactly cross-platform.
Brad Isbell
[email protected]
If posted, this will appear at https://webwewant.fyi/wants/5fceac811b340e1de0f630d3/
The text was updated successfully, but these errors were encountered: