We are moving to a new platform to serve you better! Stay tuned and watch out for our email on your inbox! [close]
Start a new topic

v0.6.3+ : Workflow for shareScreen(), stopScreen(), sendStream() and refreshConnection() for MCU based environment

Current Workflow

 As of SkylinkJS 0.6.3, the current workflow to handle restarts in a MCU environment for shareScreen(), stopScreen(), sendStream(), refreshConnection() will involve peers leaving and re-joining the room.


Steps in P2P (normal) environment:

  1. [Either: shareScreen() / stopScreen() / sendStream() / refreshConnection() ] method is invoked.
  2. (If there is a new stream) "incomingStream" event is triggered for self.
  3. "peerRestart" event is triggered for all connected Peers.

Steps in MCU environment:

  1. [Either: shareScreen() / stopScreen() / sendStream() / refreshConnection() ] method is invoked.
  2. "peerRestart" event is triggered for all connected Peers.
  3.  "serverPeerRestart" event is triggered for MCU Peer.
  4. SDK invokes leaveRoom().
  5. "peerLeft" event is triggered for self and all connected Peers.
  6. "serverPeerLeft" event is triggered for MCU Peer.
  7. "streamEnded" events is triggered for all connected Peers that has stream.
  8. SDK invokes joinRoom() to the previously connected Room name.
  9. "peerJoined" event is triggered for self.
  10. (If user has stream) "incomingStream" event is triggered for self.
  11. "serverPeerJoined" event is triggered for MCU Peer.
  12. "peerJoined" event is triggered for Peers in the Room.
  13. "incomingStream" event is triggered for Peers that has stream.

Why is the Workflow different from the P2P (normal) scenario?
SkylinkJS introduced the restart functionality in SkylinkJS 0.5.9 and the screensharing functionality in version 0.6.0 that uses the restart functionality. The MCU, however, does not support restarting of connections, and by extension did not support screensharing. A workaround was made for SkylinkJS 0.6.3 where the MCU could support screensharing by leaving and re-joining the room.

The restart functionality of the MCU is still under implementation. This workflow will be updated to match the P2P restart workflow in the upcoming releases. Please subscribe to this topic and to the SkylinkJS release logs to receive updates regarding the resolution of this issue.

2 people have this problem
Login or Signup to post a comment