PlanetKitManager
public class PlanetKitManager : NSObject
PlanetKit main API
-
The shared instance of the PlanetKitManager.
Declaration
Swift
@objc public static let shared: PlanetKitManager
-
Determines if the device can support video hardware.
Declaration
Swift
@objc public var canSupportVideoHardware: PlanetKitVideoHardwareStatus { get }
Return Value
A
PlanetKitVideoHardwareStatus
value indicating the device’s video hardware support. -
Determines if the device can support video hardware codec.
Declaration
Swift
@objc public var canSupportVideoHardwareCodec: Bool { get }
Return Value
A Boolean value indicating if the device supports video hardware codec.
-
Initializes PlanetKit with custom settings by
PlanetKitInitialSettingBuilder
.Remark
Theinitialize(initialSettings:)
must be called once before using the PlanetKit API. If you callinitialize(initialSettings:)
again, it is ignored because PlanetKit is already initialized. If PlanetKit is already initialized, any subsequent call ofinitialize(initialSettings:)
is ignored even if the method is called with new settings.Declaration
Swift
@objc public func initialize(initialSettings: [String : Any])
-
Updates partial settings with custom settings by
PlanetKitInitialSettingBuilder
.Supported settings
Declaration
Swift
@objc public func update(initialSettings settings: [String : Any])
-
Gets the framework version.
Declaration
Swift
@objc public var version: String { get }
-
Gets detailed version information like userAgent.
Remark
It will be valid afterPlanetKitManager.initialize()
is called. Format: https://tools.ietf.org/html/rfc7231#section-5.5.3Declaration
Swift
@objc public var userAgent: String { get }
-
The base path of the
PlanetKitManager
.Remark
The base path is the default path where logs and configuration files are stored. It will be valid afterPlanetKitManager.initialize(initialSettings:)
is called.Declaration
Swift
@objc public var basePath: String { get }
-
Makes a new one-to-one call.
Declaration
Swift
@objc public func makeCall(param: PlanetKitCallParam) -> PlanetKitCallMakeResult
Parameters
param
Provide call related parameters by using
PlanetKitCallParam
.Return Value
PlanetKitCallMakeResult
with a newPlanetKitCall
instance if successful, or with a fail reason otherwise. -
Makes a new one-to-one call with custom settings.
Declaration
Swift
@objc public func makeCall(param: PlanetKitCallParam, settings: [String : Any]?) -> PlanetKitCallMakeResult
Parameters
param
Provide call related parameters by using
PlanetKitCallParam
.settings
Configure the local user’s own settings using
PlanetKitMakeCallSettingBuilder
.Return Value
PlanetKitCallMakeResult
with a newPlanetKitCall
instance if successful, or with a fail reason otherwise. -
Verifies an incoming call from the application server.
Remark
This function parsesPlanetKitCCParam
and verifies whether the incoming call is currently valid or not.Declaration
Swift
@objc public func verifyCall(myUserId: PlanetKitUserId, ccParam: PlanetKitCCParam, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResult
Parameters
myUserId
The local user’s user ID
ccParam
ccParam of Push message received from APNs or long polling response
delegate
Initial callback delegate
Return Value
PlanetKitCallVerifyResult
with a newPlanetKitCall
instance if successful, or with a fail reason otherwise. -
Verifies an incoming call from the application server with custom settings.
Remark
This function parsesPlanetKitCCParam
and verifies whether the incoming call is currently valid or not.Declaration
Swift
@objc public func verifyCall(myUserId: PlanetKitUserId, ccParam: PlanetKitCCParam, settings: [String : Any]?, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResult
Parameters
myUserId
The local user’s user ID
ccParam
ccParam of Push message
settings
Configure the local user’s own settings using
PlanetKitVerifyCallSettingBuilder
.delegate
Initial callback delegate
Return Value
PlanetKitCallVerifyResult
with a newPlanetKitCall
instance if successful, or with a fail reason otherwise.
-
Joins a conference.
- If a conference that matches the given information does not exist, a new conference is created and the local user joins the conference.
If a conference that matches the given information exists, the local user joins the existing conference.
Declaration
Swift
@objc public func joinConference(param: PlanetKitConferenceParam, settings: [String : Any]?) -> PlanetKitConferenceJoinResult
Parameters
param
Provide conference related parameters by using
PlanetKitConferenceParam
.settings
Configure the local user’s own settings using
PlanetKitJoinConferenceSettingBuilder
.Return Value
PlanetKitConferenceJoinResult
with a newPlanetKitConference
instance if successful, or with a fail reason otherwise. -
Gets the current conference.
Declaration
Swift
@objc public var conference: PlanetKitConference? { get }