Mountain View
Jabber SDK API Documentation

Tutorial: Screen Share

Screen Share

Title In this tutorial it will be covered:
  • Screen share states
  • How to start screen share
  • How to stop screen share

Screen Share States

Two TelephonyConversationStates show whether screen share is being received or sent. These states are changed on "onConversationUpdated" event.

Start Screen

Sharing a screen to remote participant on TelephonyConversation will trigger "onConversationUpdated" event. First it needs to be checked if conversation has canStartScreenShare capability, and if it does, then call TelephonyConversation.startScreenShare as it is shown in the snippet below:

        var conversation;

        // ...
        // Here we choose conversation on which we want to share screen.
        // ...

        if(conversation.capabilities.canStartScreenShare)
        {
            // Start screen share
            conversation.startScreenShare();
        }
    
In order to choose which screen will be shared please refer to MultimediaController.selectMonitor and MultimediaController.highlightMonitor API as well as Monitor Selection And Highlight (Screen Share) tutorial.

Stop Screen Share

To stop sharing a screen to remote participant on TelephonyConversation it needs to be checked if conversation has canStopScreenShare capability, and if it does, then call TelephonyConversation.stopScreenShare. After stopping screen sharing "onConversationUpdated" event is fired. It is shown in the snippet below how to achieve this.

         var conversation;

         // ...
         // Here we choose conversation on which we want to stop screen sharing.
         // ...

         if(conversation.capabilities.canStopScreenShare)
         {
             // Start screen share
             conversation.stopScreenShare();
         }
     

Next

Previous