Closed lmatteis closed 8 years ago
Are all the tabs on the same origin in your scenario?
If the tabs are all on the same origin, then you could use localStorage
paired with storage events. If they are on different origins, then you'll probably want to make a hidden iframe from both that points to the same origin, then relay events between them by using postMessage for talking to the iframes, and using the storage
event within the iframes to communicate between them. But at that point, why bother with webrtc?
@lmatteis Given your structure:
B
/ \
A C
B can act as an intermediary and forward the signaling data. See eg. https://github.com/cjb/serverless-webrtc for a manual example of the process.
Mafintosh even wants to write module for that purpose: https://github.com/mafintosh/todo/issues/1
With webrtc there needs to be a signaling server that both A and B know about in order to shake hands and connect to each other. I'm wonder whether C can be introduced to A via B, and not via the signaling server.