PlanetKitInitialSettingBuilder

public class PlanetKitInitialSettingBuilder : NSObject
  • Sets the video format to BGRA32 for the PlanetKit.

    Remark

    If true, the pixel format is set to kCVPixelFormatType_32BGRA. If false, the pixel format is set to kCVPixelFormatType_420YpCbCr8BiPlanarFullRange. The default value is false.

    Declaration

    Swift

    @objc
    public func withSetKitVideoFormatBGRA32Key(bgra32: Bool) -> PlanetKitInitialSettingBuilder

    Parameters

    bgra32

    A Boolean value indicating whether to use BGRA32 video format.

  • Remark

    This configuration takes precedence over withSetKitVideoFormatBGRA32Key(bgra32:) for PlanetKitCamera.format. It means if you set this configuration, it will affect PlanetKitCamera.format and ignore the config given by withSetKitVideoFormatBGRA32Key(bgra32:).

    Declaration

    Swift

    @objc
    public func withSetKitCameraFormatBGRA32Key(bgra32: Bool) -> PlanetKitInitialSettingBuilder
  • Sets the server URL for the PlanetKit. This setting must be configured during initialization.

    Remark

    It’s essential to set the server URL at the initialization phase to ensure that PlanetKit can communicate with the server correctly.

    Declaration

    Swift

    @objc
    public func withSetKitServerKey(serverUrl: String) -> PlanetKitInitialSettingBuilder

    Parameters

    serverUrl

    The server URL to be used by PlanetKit.

  • Sets the configuration of logging.

    Remark

    PlanetKit does not write a log file by default unless you call this function. If you want to record minimal logs in a release build, we recommend using the .vital log level and .small log size.

    Declaration

    Swift

    @objc
    public func withEnableKitLogKey(level: PlanetKitLogLevel, enable: Bool, logSize: PlanetKitLogSizeLimit) -> PlanetKitInitialSettingBuilder

    Parameters

    level

    Sets the log level.

    enable

    Sets whether to enable writing a log.

    logSize

    Sets the maximum log file size.

  • Sets the base path for log files and configuration files.

    Remark

    If not explicitly set, the default path is <AppLibraryDirectory>/PlanetKit.

    Declaration

    Swift

    @objc
    public func withSetKitBasePathKey(path: String) throws -> PlanetKitInitialSettingBuilder
  • Specifies the file path include file name for logging. This method allows you to explicitly set the path of the log file where PlanetKit will write its logs.

    Declaration

    Swift

    @objc
    public func withSetKitLogFilePathKey(filePath: String) -> PlanetKitInitialSettingBuilder
  • Disables automatic adaptation of the default audio route.

    Remark

    The default value is false. PlanetKit adjusts the default audio route when the audio device changes. If the current route is the built-in handset and the media is video, then it tries to change to speaker phone. If the current route is an external headset, then it tries to change to Bluetooth by HFP, LE, A2DP order or not. You can disable this option by setting it to true.

    Declaration

    Swift

    @objc
    public func withDisableDefaultAudioRouteKey(disable: Bool) -> PlanetKitInitialSettingBuilder
  • Enable to record file for audio during 1-to-1 call or conference.

    Remark

    Audio data are recorded at the location /yyMMdd_HHmmss_.wav.

    Declaration

    Swift

    @objc
    public func withRecordingAudioFileKey(mic: Bool, spk: Bool) -> PlanetKitInitialSettingBuilder

    Parameters

    mic

    A Boolean value indicating whether to record audio from the microphone. true to record microphone input; false otherwise.

    spk

    A Boolean value indicating whether to record audio from the speaker. true to record speaker output; false otherwise.

  • Enable to record file for video frame during 1-to-1 call or conference.

    Remark

    Video frames from the camera are recorded at the location /cam_yyMMdd_HHmmss_.wav. Video frames from the peer users are recorded at the location /p_yyMMdd_HHmmss_.wav.

    Declaration

    Swift

    @objc
    public func withRecordingVideoFrameFileKey(cam: Bool, peers: [PlanetKitUserId]) -> PlanetKitInitialSettingBuilder

    Parameters

    cam

    A Boolean value indicating whether to record video from the camera. true to record camera video; false otherwise.

    peers

    An array of PlanetKitUserId to record video from the peers.

  • Builds the settings.

    The return value is used as an argument for the PlanetKitManager.initialize(initialSettings:) call.

    Declaration

    Swift

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