I’ve been brainstorming a webapp idea, something a la Turntable.fm but for LANs, that way all the computers on the SAME network aren’t all downloading a song at the same time (killing bandwidth) but rather streaming the music around. The basic functionality would be for the “master” PC (the one with speakers) to play a local song or receive the songs over LAN and then play them.
My question is if there is a way for an HTML5 page (hosted online) to use JS to detect LAN users and communicate to each other directly without the need of any central server? Example case to make it clear:
Office LAN has 2 users, Bob and Bill
Bob enters lanmusic.com
Bill enters lanmusic.com
Internet dies, LAN is fine.
Bob can still detect via the page that local user Bill is on the page too
Bill sends a song to Bob through the page directly
Bob plays song with page's javascript music player
So key points:
- Javascript/HTML5 only
- Doesn’t depend on internet except for initial load of web app
- Can detect LAN users, make LAN connections
Please read this blog and another article published by W3C with title Web Real-Time Communications
This functionality is still in the process by W3C and the Candidate Release for this functionality will be out in Q4 2012. So it won’t be available soon.
For the time being, as an alternative my suggestion are
using the Offline Capabilities of HTML5 as an alternative, which
described in this presentation by Google Make it work offline.
using Adobe Cirrus Beta. It can embedded inside your HTML, and it supports P2P conversation and P2P content delivery.
Cirrus1 http://labs.adobe.com/technologies/stratus/images/evolution1.jpg
Cirrus1 http://labs.adobe.com/technologies/stratus/images/evolution2.jpg
Cirrus2 http://labs.adobe.com/technologies/stratus/images/evolution3.jpg