Create an offer
Last updated
Was this helpful?
Last updated
Was this helpful?
If you are the first user to join a room (the person initiating the call), the app creates an offer and tries to store it inside a structured data with an ID based on the name of the room. This offer includes a session description in format, and it needs to be (the person receiving the call).
The app creates a new using the module. If you are the first user to join this room, props.peerPayload
is false
and therefore the value of initiator
will be true
. This means that the app will create an offer.
PeerView.js
For now, only the connection establishment is done using the SAFE Network. The actual connection is either peer-to-peer () or via a server. At some point later, we will integrate this functionality directly in .
After the offer is created, the signal
event is fired.
PeerView.js
The app tries to create a structured data with an ID based on the name of the room. This structured data will contain the offer as well as a random ID, which will be used to store the answer of the call recipient.
PeerView.js
The app creates a structured data handle for the offer.
store.js
The address of the structured data is based on the app ID (example.signaling.v1
) and the name of the room. The structured data is unversioned (type 500). The data is stored as a base64 string.
store.js
The app saves the structured data by sending a PUT request to the SAFE Network.
store.js