Scenario :

I have a multi-page application in which RTCDataChannel is generated between recently logged in users(2users to be precise).

With in the application, there is a left menu which has links to different pages(all on the same domain).

both the users communicate with each other on each page(fill forms, do annotation etc).

Issue :

When both the users switch to another page using left-menu link then RTCDataChannel is no longer available on the new page. i.e they can no longer communicate via webRTC.

I have thought of using 'local storage' and 'session storage' but both of them can store string only and RTCDataChannel object can't be converted to a string via JSON.stringify().

Creating data channels on each page won't be a good approach.

How can I generate webRTC data channel between two users so that it can be used in multiple pages for communication between two users?

0

There are 0 answers