Talkilla/SPA API: Difference between revisions

Line 67: Line 67:
Messages that handle calls, can go two ways from the Worker to the SPA and vice-versa.
Messages that handle calls, can go two ways from the Worker to the SPA and vice-versa.


To send a message to the worker (e.g. incoming call):
To send a message to Talkilla (e.g. incoming call):


  postMessage({topic: <topic>, data: <data>})
  postMessage({topic: <topic>, data: <data>})


Receiving a message from the worker (e.g. call outgoing), listen for message of structure:
Receiving a message from Talkilla (e.g. call offer), listen for message of structure:


  {topic: topic, data: <data>}
  {topic: topic, data: <data>}
canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,628

edits