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:
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
First of all, about every browser will give an error if internet connection is lost. HTML5 can take care if this problem.
But then you can only use client site js, which will not allow to do the things you want to do. Why dont you make a normal desktop application? Me an some friends are making an CLI-based application to que music to a central server, that server has the speakers and will play the music. Our github: https://github.com/Infogroep/mpgc
There are plenty of other aps out there that do the same: check out XBMC
FYI: what you could do as well is create an ad hoc network that doesnt rely on a central server. But that is still something that is beeing researched (i.e. http://soft.vub.ac.be/amop/ )
w3c has an interesting paper on Home Networking Implementation for HTML5 http://www.w3.org/2011/09/webtv/papers/W3C_HNTF_Position_Paper_Sept_2011.pdf
and check out a html5 websocket api http://dev.w3.org/html5/websockets/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With