PlanetKitCallDelegate
@objc
public protocol PlanetKitCallDelegate
The delegate protocol for the PlanetKit call events.
-
Called if the local user makes a call and needs to wait until the peer accepts the call.
Declaration
Swift
func didWaitConnect(_ call: PlanetKitCall)
-
Called when the callee accepted this call.
Declaration
Swift
func didConnect(_ call: PlanetKitCall, connected: PlanetKitCallConnectedParam)
-
Called when the call is disconnected.
Declaration
Swift
func didDisconnect(_ call: PlanetKitCall, disconnected: PlanetKitDisconnectedParam)
-
Called when
PlanetKitManger.verifyCall(myUserId:ccParam:delegate:completion:)
is successful.Declaration
Swift
func didVerify(_ call: PlanetKitCall, peerStartMessage: PlanetKitCallStartMessage?, peerUseResponderPreparation: Bool)
Parameters
call
The
PlanetKitCall
object representing the call.peerStartMessage
An optional
PlanetKitCallStartMessage
object representing the start message from the peer.peerUseResponderPreparation
A Boolean value indicating whether the peer is using responder preparation.
-
Called when the peer finishes preparation.
Declaration
Swift
func didFinishPreparation(_ call: PlanetKitCall)
-
Called when the network is unavailable.
Declaration
Swift
@objc optional func networkDidUnavailable(_ call: PlanetKitCall, isPeer: Bool, willDisconnected seconds: TimeInterval)
Parameters
call
The call object.
isPeer
true
if the peer’s network is unavailable.false
if the local user’s network is unavailable.willDisconnected
The remaining time until the call is disconnected.
-
Called when the network is reavailable.
Declaration
Swift
@objc optional func networkDidReavailable(_ call: PlanetKitCall, isPeer: Bool)
Parameters
call
The call object.
isPeer
true
if the peer’s network was unavailable.false
if the local user’s network was unavailable.
-
Called when the peer video is paused.
Declaration
Swift
@objc optional func peerVideoDidPause(_ call: PlanetKitCall, reason: PlanetKitVideoPauseReason)
-
Called when the peer’s video has resumed.
Declaration
Swift
@objc optional func peerVideoDidResume(_ call: PlanetKitCall)
-
Called when video call has been enabled by the peer.
Declaration
Swift
@objc optional func videoEnabledByPeer(_ call: PlanetKitCall)
-
Called when video call has been disabled by the peer.
Declaration
Swift
@objc optional func videoDisabledByPeer(_ call: PlanetKitCall, reason: PlanetKitMediaDisableReason)
Parameters
call
The
PlanetKitCall
object.reason
The reason for disabling the video call, represented by
PlanetKitMediaDisableReason
. -
Called when the user’s video has no source detected.
Declaration
Swift
@objc optional func didDetectMyVideoNoSource(_ call: PlanetKitCall)
Parameters
call
The
PlanetKitCall
object.
-
Called when the short data is received.
Declaration
Swift
@objc optional func didReceiveShortData(_ call: PlanetKitCall, dataType: String, data: Data)
Parameters
call
The call object.
dataType
The type of the short data.
data
The short data.
-
Called when the peer’s microphone is muted.
Declaration
Swift
@objc optional func peerMicDidMute(_ call: PlanetKitCall)
-
Called when the peer’s microphone is unmuted.
Declaration
Swift
@objc optional func peerMicDidUnmute(_ call: PlanetKitCall)
-
Called when the peer requests to mute or unmute the local user’s microphone.
Declaration
Swift
@objc optional func myMuteRequestedByPeer(_ call: PlanetKitCall, mute: Bool)
-
Called when the peer holds the call.
Declaration
Swift
@objc optional func peerDidHold(_ call: PlanetKitCall, reason: String?)
-
Called when the peer unholds the call.
Declaration
Swift
@objc optional func peerDidUnhold(_ call: PlanetKitCall)
-
Called when the peer starts screen share.
Declaration
Swift
@objc optional func peerDidStartScreenShare(_ call: PlanetKitCall)
-
Called when the peer stops screen share.
Declaration
Swift
@objc optional func peerDidStopScreenShare(_ call: PlanetKitCall, reason: Int32)
Parameters
call
The call object.
reason
The reason why the peer stops screen share.
-
Called when the screen share has stopped due to a hold action.
Declaration
Swift
@objc optional func myScreenShareDidStopByHold(_ call: PlanetKitCall)
-
Called when the data session is incoming.
Declaration
Swift
@objc optional func dataSessionIncoming(_ call: PlanetKitCall, streamId: PlanetKitDataSessionStreamId, type: PlanetKitDataSessionType)
Parameters
call
The call object.
streamId
The stream ID of the data session.
type
The type of the data session.
-
Called when the
ReplayKit
session starts for screen share. -
Called when the
ReplayKit
session stops for screen share. -
Called when an error occurs on the
ReplayKit
session.
-
Called when the peer sets shared contents.
Declaration
Swift
@objc optional func peerDidSetSharedContents(_ call: PlanetKitCall, data: Data, elapsed seconds: TimeInterval)
Parameters
call
The call object.
data
The shared contents data.
elapsed
The elapsed time since the shared contents were set.
-
Called when the peer unsets shared contents.
Declaration
Swift
@objc optional func peerDidUnsetSharedContents(_ call: PlanetKitCall)
-
Called when the peer sets exclusively shared contents.
Declaration
Swift
@objc optional func peerDidSetExclusivelySharedContents(_ call: PlanetKitCall, data: Data, elapsed seconds: TimeInterval)
Parameters
call
The call object.
data
The exclusively shared contents data.
elapsed
The elapsed time since the exclusively shared contents were set.
-
Called when the peer unsets exclusively shared contents.
Declaration
Swift
@objc optional func peerDidUnsetExclusivelySharedContents(_ call: PlanetKitCall)
-
Called when the call starts recording on cloud.
Declaration
Swift
@objc optional func recordOnCloudDidUpdate(_ call: PlanetKitCall, updated: PlanetKitRecordOnCloudUpdatedParam)
Parameters
call
The
PlanetKitCall
object.updated
The
PlanetKitRecordOnCloudUpdatedParam
object containing the updated information.