Receive an offer
If you are joining a room where another user is waiting for you, the app needs to receive an offer (a session description in SDP format) from the caller (the person initiating the call). The app expects this offer to be stored inside a structured data with an ID based on the name of the room. The call recipient then responds with an answer message, which also contains an SDP description.
Contents
Get data identifier handle
The app fetches a data identifier handle for the structured data that contains the offer.
POST /data-id/structured-data
safeDataId.getStructuredDataHandle(ACCESS_TOKEN, address, 500)
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).
const address = btoa(`${APP_ID}-${item}`)
Get structured data handle
The app fetches a structured data handle using the data identifier handle of the offer.
GET /structured-data/handle/:dataIdHandle
safeStructuredData.getHandle(ACCESS_TOKEN, dataHandleId)
Drop data identifier handle
The app drops the data identifier handle of the offer.
DELETE /data-id/:handleId
safeDataId.dropHandle(ACCESS_TOKEN, dataHandleId)
Fetch the structured data
The app fetches the content of the structured data using the structured data handle.
GET /structured-data/:handleId/:version?
safeStructuredData.readData(ACCESS_TOKEN, handleId)
Drop the structured data handle
The app drops the structured data handle of the offer.
DELETE /structured-data/handle/:handleId
safeStructuredData.dropHandle(ACCESS_TOKEN, handleId)
Last updated
Was this helpful?