Hacker News new | ask | show | jobs
by pimterry 1362 days ago
Looks like LAN depends on multicast for discovery, which isn't available in browsers as far as I can tell: https://docs.ditto.live/javascript/common/mesh-network/suppo...

Regardless you definitely wouldn't be able to do browser-to-browser discovery and connection via HTTP or WebSockets, since you can't create a web server in browser, but I imagine you could do P2P via WebRTC if you can just find a way to discover the other peer's details in the first place.

2 comments

Perhaps the Web Share API [1]? Once you've got the share prompt up, the end user could use AirDrop or similar?

1: https://developer.mozilla.org/en-US/docs/Web/API/Web_Share_A...

Webrtc allows getting the local IP address. maybe these could be distributed manually or when a discovery service is available, and then tried when it's not?