SOSScreenSharingBaseViewController

@interface SOSScreenSharingBaseViewController
    : SOSSessionBaseViewController <SOSUIAgentStreamReceivable,
                                    SOSUILineDrawingReceivable>

The SOSScreenSharingBaseViewController serves as the base controller which manages interactions between the UI and SOS backend for the screen sharing phase of SOS.

If you wish to replace the screen sharing UI, your class must implement this base class.

All method overrides require a call back to super for SOS to function properly.

  • This will trigger a transition to the camera view, and mark the SOS Session as being in the camera phase. At this point the screen sharing phase is ending, and the view controller will attempt to clean up.

    Warning

    Please ensure that your view controller cleans up entirely. Any reference cycles will result in additional instances of this view controller in memory when returning to the screen sharing phase.

    This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

    Declaration

    Objective-C

    - (void)handleCameraTransition:(nonnull id)sender;

    Swift

    @IBAction func handleCameraTransition(_ sender: Any)

    Parameters

    sender

    The object which triggered the action.

  • Required method to call if you wish to wish to have the agent stream container on the service cloud widget move as a response to changes in your UI. The center point you provide will be used to update the agent container position in the service cloud widget.

    Warning

    Each time you call this method it will result in a status update on the session. For that reason it is recommended that you do not call this method during a drag gesture, but rather update the position once the position has been determined.

    This method is used to communicate between the UI API and the SOS backend. If you wish to override this method you can do so safely; however you must call this method on super. Failure to do so will result in undefined and likely broken behavior from SOS.

    Declaration

    Objective-C

    - (void)setAgentStreamCenter:(CGPoint)center;

    Swift

    func setAgentStreamCenter(_ center: CGPoint)

    Parameters

    center

    The new center point of the agent container in the service cloud widget.

  • Required method to call if you wish to have a UI indicator that informs the user of changes to the screen sharing state. This method will be called when the screenSharing state changes.

    Declaration

    Objective-C

    - (void)screenSharingStateDidChange:(BOOL)sharing;

    Swift

    func screenSharingStateDidChange(_ sharing: Bool)

    Parameters

    sharing

    The current sharing state of the session.