SOSSessionBaseViewController
@interface SOSSessionBaseViewController
: UIViewController <SOSSessionViewController>
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.
-
Action performed when pausing or unpausing an SOS Session.
This method will automatically call
-setSOSPaused:
. The value will be derived from the negation of-isSOSPaused
. If you wish to handle the muted state in a different way, you can ignore this action and use-setSOSPaused:
directly instead.Warning
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)handlePause:(nonnull id)sender;
Swift
@IBAction func handlePause(_ sender: Any)
Parameters
sender
The object which triggered the action.
-
Action performed when muting or unmuting the audio for an SOS Session.
This method will automatically call
-setSOSMuted:
. The value will be derived from the negation of-isSOSMuted
. If you wish to handle the muted state in a different way, you can ignore this action and use-setSOSMuted:
directly instead.Warning
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)handleMute:(nonnull id)sender;
Swift
@IBAction func handleMute(_ sender: Any)
Parameters
sender
The object which triggered the action.
-
Action performed when confirming an end session.
Warning
Executing this action will immediately trigger the end session cleanup. The responsibility of handling user confirmation remains as an implementation detail for the view controller.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)handleEndSession:(nonnull id)sender;
Swift
@IBAction func handleEndSession(_ sender: Any)
Parameters
sender
The object which triggered the action.
-
Call this (required) method when informing the SOS backend that you wish to mute outgoing audio. This method will instruct the backend to continue/discontinue transmitting audio from the device.
Warning
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)setSOSMuted:(BOOL)isMuted;
Swift
func setSOSMuted(_ isMuted: Bool)
Parameters
isMuted
Whether the outgoing audio stream has been muted.
-
Call this (required) method to get the current muted state of the SOS Session.
Warning
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
- (BOOL)isSOSMuted;
Swift
func isSOSMuted() -> Bool
Return Value
The current muted state of the SOS Session.
-
Call this (required) method when informing the SOS backend that you wish to pause the session. This method will instruct the backend to continue/discontinue all audio and video traffic from the device.
Warning
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)setSOSPaused:(BOOL)isPaused;
Swift
func setSOSPaused(_ isPaused: Bool)
Parameters
isPaused
Whether the outgoing audio/video traffic has been paused.
-
Call this (required) method to get the current local paused state of the SOS Session.
Warning
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
- (BOOL)isSOSPaused;
Swift
func isSOSPaused() -> Bool
Return Value
The current paused state of the SOS Session.
-
This value is set on the service cloud integration. It should not change during the lifetime of a session. You can use this method to determine if you wish to display a recording status in your UI.
Warning
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
- (BOOL)isRecording;
Swift
func isRecording() -> Bool
Return Value
Whether the session is being recorded.
-
Call this (required) method to get the agent name.
Warning
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
- (nonnull NSString *)agentName;
Swift
func agentName() -> String
Return Value
The agent name.