SLROverlayDelegate
@objc
public protocol SLROverlayDelegate : AnyObject
StreamLayer SDK calls these methods on the host-app delegate to ensure pleasant UX for the users
-
Invoked to initiate audio-ducking. Expected behaviour is to reduce output volume of the video player to enable comfortable voice call environment
Declaration
Swift
@objc func requestAudioDucking()
-
Invoked to signal that audio ducking is not required. Expected behaviour is to restore volume levels to where they were at the time of ducking request
Declaration
Swift
@objc func disableAudioDucking()
-
Requests host-app to configure shared audio session for a specific activity. We support voice calls & audio notifications Each time before audio session is used this method would be called to notify host application about the need to setup appropriate audio session When an existing audio session is already active - it must be a noop
Declaration
Swift
@objc func prepareAudioSession(for type: SLRAudioSessionType)
Parameters
type
requested session type
-
When StreamLayer is done playing audio or recording voice this method would be invoked to provide a hint for the app to change current audio session settings
Declaration
Swift
@objc func disableAudioSession(for type: SLRAudioSessionType)
Parameters
type
requested session type
-
This method must return custom text for a share message that is used to invite other people to use the app
Declaration
Swift
@objc func shareInviteMessage() -> String
-
Used when pinging your friends from who is watching quick access menu
Declaration
Swift
@objc func waveMessage() -> String
-
Called when user opens StreamLayer Overlay
Declaration
Swift
@objc func overlayOpened()
-
Called when StreamLayer Overlay was closed by the user or programmatically
Declaration
Swift
@objc func overlayClosed()
-
User requested to switch video stream through StreamLayer SDK interface You are required to react to it by changing video feed
Declaration
Swift
@objc func switchStream(to streamId: String)
-
Pause the stream video
Declaration
Swift
@objc func pauseVideo()
-
Play the stream video
Declaration
Swift
@objc func playVideo()