Nordmoen
Nordmoen

Reputation: 215

Communication between different HTML page on different devices

I'm beginning to develop a program(in the beginning at least) aimed at Firefox OS to transfer files(Music, Pictures and Video) from another device(lets call it device2) to the device(device1) running Firefox OS. One problem is how to transfer files from the webpage running on device2 to device1. I have looked at XHR and websockets which both would suffice, but I have not found a way to receive on the Firefox OS driven device. My question then is if there is a way to transfer files between webpages on different devices without an intermediary web server somewhere else.

On another note, to make the application as robust as possible I would also like to serve the HTML/JS/CSS files from device1 to device2 if that can factor into the answer to the above it would be even better.

Upvotes: 0

Views: 544

Answers (1)

Nick Sharp
Nick Sharp

Reputation: 1891

WebRTC data channels sound like your only solution for this without an intermediary server.

I couldn't find specifics on if the data channels part is already supported in FirefoxOS, but given that FF and Chrome are leading and cooperating on the WebRTC stuff it should be supported by the time the OS becomes freely available.

That said, usually for transferring html/css/js you would usually just transfer the URL and let the device fetch/parse/load the file using the normal channels. But for transferring blob encoded data/files the WebRTC magic would be your bet.

Upvotes: 1

Related Questions