PlanetKitMakeCallSettingBuilder

public class PlanetKitMakeCallSettingBuilder : NSObject
  • Controls whether the local user’s video starts immediately or not when the peer calls enableVideo(completion:). The default value is PlanetKitResponseOnEnableVideo.pause. See more on PlanetKitResponseOnEnableVideo and visit https://docs.lineplanet.me/iosmacos/extended-functions/enable-video-call-from-audio-call.

    Declaration

    Swift

    @objc
    public func withResponseOnEnableVideo(response: PlanetKitResponseOnEnableVideo) -> PlanetKitMakeCallSettingBuilder
  • Allows a call without a microphone.

    Remark

    The default value is false. When this value is false, if the system can’t access the microphone, it will cause PlanetKitDisconnectReason.micNoSource and end the call. If you want to keep the call without microphone access, you should set this to true.

    Declaration

    Swift

    @objc
    public func withAllowCallWithoutMicKey(allow: Bool) -> PlanetKitMakeCallSettingBuilder
  • Sets the ringback tone audio file for the call.

    Remark

    The ringback tone is played to the caller while the call is being connected.

    Declaration

    Swift

    @objc
    public func withSetRingbackToneKey(fileResourceUrl: URL) throws -> PlanetKitMakeCallSettingBuilder
  • Sets the end tone audio file for the call.

    Remark

    The end tone is played when the call ends, provided it was not terminated by the user.

    Declaration

    Swift

    @objc
    public func withSetEndToneKey(fileResourceUrl: URL) throws -> PlanetKitMakeCallSettingBuilder
  • Sets whether the end tone should be played regardless of the call state.

    Remark

    When set to true, this function allows the end tone to be played regardless of the call state. The default value is false.

    Declaration

    Swift

    @objc
    public func withPlayEndToneRegardlessOfCallStateKey(enable: Bool) throws -> PlanetKitMakeCallSettingBuilder
  • Sets the hold tone audio file for the call.

    Remark

    The hold tone is played during a call when it is on hold.

    Declaration

    Swift

    @objc
    public func withSetHoldToneKey(fileResourceUrl: URL) throws -> PlanetKitMakeCallSettingBuilder
  • Sets preferred maximum video encoding settings.

    Remark

    The capability will be set internally by default according to the device type. The default capability is PlanetKitVideoCapability.callSendDefault.

    Declaration

    Swift

    @objc
    public func withMyVideoSendCapabilityKey(capability: PlanetKitVideoCapability) -> PlanetKitMakeCallSettingBuilder
  • Sets preferred maximum video decoding settings.

    Remark

    The capability will be set internally by default according to the device type. The default capability is PlanetKitVideoCapability.callReceiveDefault.

    Declaration

    Swift

    @objc
    public func withMyVideoReceiveCapabilityKey(capability: PlanetKitVideoCapability) -> PlanetKitMakeCallSettingBuilder
  • Enables sending and receiving screen share video.

    Remark

    This setting is supported only for iOS. The default setting is ‘false’, so if you don’t want to use screen share, do not use this key. Set information for interworking with the broadcast extension of ReplayKit.

    Declaration

    Swift

    @objc
    public func withEnableScreenShareKey(broadcastPort: UInt16, broadcastPeerToken: String, broadcastMyToken: String) -> PlanetKitMakeCallSettingBuilder
  • Sets the maximum network link bandwidth for sending.

    Remark

    If the kbps value is 0 or not given, it will use the internal value by default.

    Declaration

    Swift

    @objc
    public func withMaxSendLinkBandwidthKey(kbps: UInt32) -> PlanetKitMakeCallSettingBuilder
  • Sets the maximum network link bandwidth for receiving.

    Remark

    If the kbps value is 0 or not given, it will use the internal value by default.

    Declaration

    Swift

    @objc
    public func withMaxRecvLinkBandwidthKey(kbps: UInt32) -> PlanetKitMakeCallSettingBuilder
  • Ignores VPIO service configuration.

    Declaration

    Swift

    @objc
    public func withIgnoreVpioServiceConfigKey(ignore: Bool) -> PlanetKitMakeCallSettingBuilder
  • Disables MLNS and enables WebRTC NS.

    Remark

    The MLNS (Multi Level Noise Suppressor, or Machine Learning based Noise Suppressor) will be activated by default, if the machine has sufficient CPU power. But, sometimes it produces unintended results and if you don’t want this, you can disable the MLNS feature by using this function. Currently, the MLNS is disabled by default in iOS.

    Declaration

    Swift

    @objc
    public func withDisableMLNSKey(disable: Bool) -> PlanetKitMakeCallSettingBuilder
  • Enables PlanetKit statistics.

    Remark

    Enable the PlanetKit statistics feature to use PlanetKitCall.statistics. Statistics will be updated at 200-millisecond intervals.

    Declaration

    Swift

    @objc
    public func withEnableStatisticsKey(enable: Bool) -> PlanetKitMakeCallSettingBuilder
  • Changes to a custom microphone controllable.

    Remark

    This is useful when a custom microphone controllable should be used for a call from the beginning.

    Declaration

    Swift

    @objc
    public func withCustomMicKey(mic: PlanetKitAudioMicControllable) -> PlanetKitMakeCallSettingBuilder
  • Changes to a custom speaker controllable.

    Remark

    This is useful when a custom speaker controllable should be used for a call from the beginning.

    Declaration

    Swift

    @objc
    public func withCustomSpkKey(spk: PlanetKitAudioSpkControllable) -> PlanetKitMakeCallSettingBuilder
  • Changes to a custom screen controllable.

    Remark

    This is useful when a custom screen controllable should be used for a call from the beginning.

    Declaration

    Swift

    @objc
    public func withCustomScreenKey(screen: PlanetKitScreenControllable) -> PlanetKitMakeCallSettingBuilder
  • Changes to a custom screen share stream.

    Remark

    This is useful when a custom screen share stream should be used to implement a video modifier before the call starts.

    Declaration

    Swift

    @objc
    public func withCustomScreenShareStreamKey(videoStream: PlanetKitVideoStream) -> PlanetKitMakeCallSettingBuilder
  • Sets CallKit settings.

    Remark

    Set PlanetKitCallKitSetting.type to .planetKit and set PlanetKitCallKitSetting.param to use PlanetKit’s internal CallKit. Set PlanetKitCallKitSetting.type to .user if the application uses its own implementation of CallKit. Make sure you call PlanetKitCall.notifyCallKitAudioActivation() on CXProviderDelegate.provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession). Otherwise, set PlanetKitCallKitSetting.type to .none. If withCallKitSettingsKey is not used, PlanetKitCallKitSetting.type will be .none by default. Please note that it is recommended that CallKit and PushKit are used together to handle VoIP push notifications. See more details at the link below. https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit

    Declaration

    Swift

    @objc
    public func withCallKitSettingsKey(setting: PlanetKitCallKitSetting) -> PlanetKitMakeCallSettingBuilder
  • Sets whether to enable the updated event of audio description.

    Remark

    The default value is enabled.

    Declaration

    Swift

    @objc
    public func withEnableAudioDescriptionKey(enable: Bool) -> PlanetKitMakeCallSettingBuilder
  • Changes the interval for volume level updates.

    Remark

    The default interval is 0.5 seconds. The minimum value is 0.2 seconds. If less, the interval is set to 0.2 seconds. This interval value affects PlanetKitCall.setPeerAudioDescriptionReceiver(_:) and PlanetKitCall.setMyAudioDescriptionReceiver(_:).

    Declaration

    Swift

    @objc
    public func withAudioDescriptionUpdateIntervalKey(interval: TimeInterval) -> PlanetKitMakeCallSettingBuilder
  • Builds the settings.

    The return value is used as an argument for the PlanetKitManager.makeCall(param:settings:) call.

    Declaration

    Swift

    @objc
    public func build() -> [String : Any]