Migrating from PlanetKit 4.4 to 5.5
This guide provides detailed steps and considerations for migrating from PlanetKit 4.4 to PlanetKit 5.5.
Requirements
Swift Package Manager
If you are using Swift Package Manager (SPM), add the following repository URL to your Xcode project's package dependencies.
For more information on how to add a package dependency, see Apple Developer documentation.
CocoaPods
If you want to keep using CocoaPods, change the existing PlanetKit-iOS or PlanetKit-macOS Pod to PlanetKit-SDK-Apple.
The following Podfile is an example.
## PlanetKit 5.5 or higher
target 'MyApp' do
pod 'PlanetKit-SDK-Apple', '~> 5.5', :source => 'https://github.com/line/planet-kit-cocoapods-specs.git'
end
Migration
Breaking change Improve camera control
PlanetKit has been enhanced to turn on the camera only when sending data to Planet Cloud.
API changes
Changed
-
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 func setMyVideoReceiver(_ videoReceiver: PlanetKitVideoOutputDelegate)func resetMyVideoReceiver()var myVideoStream: PlanetKitVideoStream { get } -
Rename
PlanetKitVideoCaptureDevicetoPlanetKitVideoCaptureDeviceInfo1-to-1 callGroup call -
PlanetKitCameraManagerclass 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitCall.startPreview()func startPreview(delegate: PlanetKitVideoOutputDelegate)PlanetKitCall.stopPreview()func stopPreview(delegate: PlanetKitVideoOutputDelegate)PlanetKitMakeCallSettingBuilder.withCustomCameraKey(camera:)PlanetKitVerifyCallSettingBuilder.withCustomCameraKey(camera:)PlanetKitJoinConferenceSettingBuilder.withCustomCameraKey(camera:)func setCustomCamera(_ camera: PlanetKitCustomCamera)PlanetKitCamera.isStartedvar isStarted: Bool { get }PlanetKitCamera.currentDevicevar currentDeviceInfo: PlanetKitVideoCaptureDeviceInfo? { get }PlanetKitCamera.cameraPresetvar preset: PlanetKitCameraPreset? { get }PlanetKitCamera.cameraPositionvar position: PlanetKitCameraPosition { get }PlanetKitCamera.cameraFrameRatevar frameRate: PlanetKitFrameRate? { get }PlanetKitCamera.change(device:)func change(deviceInfo: PlanetKitVideoCaptureDeviceInfo)PlanetKitCamera.switchPosition()func switchPosition()PlanetKitCamera.addInterruptReceiver(_:)func addInterruptReceiver(_ interruptReceiver: PlanetKitCameraInterruptDelegatePlanetKitCamera.removeInterruptReceiver(_:)func removeInterruptReceiver(_ interruptReceiver: PlanetKitCameraInterruptDelegate)PlanetKitCamera.isCameraAvailablestatic var isCameraAvailable: Bool { get }PlanetKitCamera.devicesvar deviceInfos: [PlanetKitVideoCaptureDeviceInfo] { get }PlanetKitCamera.addDeviceChangeDelegate(_:)func addDeviceChangeDelegate(_ delegate: PlanetKitCameraDeviceChangeDelegate)PlanetKitCamera.removeDeviceChangeDelegate(_:)func removeDeviceChangeDelegate(_ delegate: PlanetKitCameraDeviceChangeDelegate)PlanetKitCamera.didStartNotificationvar delegate: PlanetKitCameraDelegate? { get set }PlanetKitCamera.didStopNotificationvar delegate: PlanetKitCameraDelegate? { get set }
Added
PlanetKitCallclass 1-to-1 callvar myVideoStream: PlanetKitVideoStream! { get }var myScreenShareStream: PlanetKitVideoStream! { get }
PlanetKitConferenceclass Group callvar myVideoStream: PlanetKitVideoStream! { get }var myScreenShareStream: PlanetKitVideoStream! { get }
PlanetKitCameraManagerclass 1-to-1 callGroup callfunc startPreview(delegate: PlanetKitVideoOutputDelegate)func stopPreview(delegate: PlanetKitVideoOutputDelegate)var previewModifier: PlanetKitVideoModifierDelegate? { get set }func setCustomCamera(_ customCamera: PlanetKitCustomCamera)func resetToDefaultCamera()var currentDeviceInfo: PlanetKitVideoCaptureDeviceInfo? { get }var isStarted: Bool { get }var preset: PlanetKitCameraPreset? { get }var position: PlanetKitCameraPosition { get }var frameRate: PlanetKitFrameRate? { get }func change(deviceInfo: PlanetKitVideoCaptureDeviceInfo)func switchPosition()func addInterruptReceiver(_ interruptReceiver: PlanetKitCameraInterruptDelegate)func removeInterruptReceiver(_ interruptReceiver: PlanetKitCameraInterruptDelegate)var virtualBackground: PlanetKitVirtualBackground? { get set }var deviceInfos: [PlanetKitVideoCaptureDeviceInfo] { get }static var isCameraAvailable: Bool { get }static var shared: PlanetKitCameraManager { get }weak var delegate: PlanetKitCameraDelegate? { get set }func addDeviceChangeDelegate(_ delegate: PlanetKitCameraDeviceChangeDelegate)func removeDeviceChangeDelegate(_ delegate: PlanetKitCameraDeviceChangeDelegate)
PlanetKitCameraDelegateprotocol 1-to-1 callGroup callfunc didStart()func didStop(_ error: NSError?)
PlanetKitCustomCameraclass 1-to-1 callGroup callfunc sendVideo(videoBuffer: PlanetKitVideoBuffer)func isVideoSendAvailable() -> Bool
PlanetKitCallclass 1-to-1 callvar peerVideoStream: PlanetKitVideoStream
Removed
PlanetKitCameraclass 1-to-1 callGroup callPlanetKitCameraControllableprotocol 1-to-1 callGroup callPlanetKitCallclass 1-to-1 callvar camera: PlanetKitCameraControllable? { get }func startPreview()func stopPreview()
PlanetKitConferenceclass Group callvar camera: PlanetKitCameraControllable? { get }func startPreview()func stopPreview()
PlanetKitInitialSettingBuilderclass 1-to-1 callGroup callfunc withDisableKitCameraKey(disable: Bool) -> PlanetKitInitialSettingBuilder
PlanetKitMakeCallSettingBuilderclass 1-to-1 callfunc withCustomCameraKey(camera: PlanetKitCameraControllable) -> PlanetKitMakeCallSettingBuilderfunc withCustomCameraStreamKey(videoStream: PlanetKitVideoStream) -> PlanetKitMakeCallSettingBuilder
PlanetKitVerifyCallSettingBuilderclass 1-to-1 callfunc withCustomCameraKey(camera: PlanetKitCameraControllable) -> PlanetKitVerifyCallSettingBuilderfunc withCustomCameraStreamKey(videoStream: PlanetKitVideoStream) -> PlanetKitVerifyCallSettingBuilder
PlanetKitJoinConferenceSettingBuilderclass Group callfunc withCustomCameraKey(camera: PlanetKitCameraControllable) -> PlanetKitJoinConferenceSettingBuilderfunc withCustomCameraStreamKey(videoStream: PlanetKitVideoStream) -> PlanetKitJoinConferenceSettingBuilder
Code examples
Start camera preview
-
Example of an earlier version
class PreviewVideoViewController: UIViewController {
....
var myVideoView: PlanetKitMTKView!
private func setupView() {
PlanetKitCamera.shared.setModifier(self)
PlanetKitCamera.shared.addReceiver(myVideoView)
PlanetKitCamera.shared.open()
PlanetKitCamera.shared.start()
}
}
extension VideoViewController: PlanetKitVideoModifierDelegate {
func videoOutput(_ videoBuffer: PlanetKitVideoBuffer) {
....
}
} -
New version example
class PreviewVideoViewController: UIViewController {
....
var myVideoView: PlanetKitMTKView!
private func setupView() {
PlanetKitCameraManager.shared.previewModifier = self
PlanetKitCameraManager.shared.startPreview(delegate: myVideoView)
}
}
extension VideoViewController: PlanetKitVideoModifierDelegate {
func videoOutput(_ videoBuffer: PlanetKitVideoBuffer) {
....
}
}
Switch to another camera device
-
Example of an earlier version
class CameraDeviceViewController: UIViewController {
....
private var devices: [PlanetKitVideoCaptureDevice] = []
private var deviceNames: [String] = []
private func refreshDevices() {
devices = PlanetKitCamera.shared.devices
deviceNames.removeAll()
for device in devices {
deviceNames.append(device.name)
}
}
private func change(device: PlanetKitVideoCaptureDevice) {
PlanetKitCamera.shared.change(device: device)
}
} -
New version example
class CameraDeviceViewController: UIViewController {
....
private var deviceInfos: [PlanetKitVideoCaptureDeviceInfo] = []
private var deviceNames: [String] = []
private func refreshDevices() {
let currentDeviceInfo = PlanetKitCameraManager.shared.currentDeviceInfo
deviceInfos = PlanetKitCameraManager.shared.deviceInfos
var selectedIndex = -1
deviceNames.removeAll()
for (index, deviceInfo) in deviceInfos.enumerated() {
deviceNames.append(deviceInfo.name)
if currentDeviceInfo?.uniqueID == deviceInfo.uniqueID {
selectedIndex = index
}
}
}
private func change(deviceInfo: PlanetKitVideoCaptureDeviceInfo) {
PlanetKitCameraManager.shared.change(deviceInfo: deviceInfo)
}
}
Add a receiver for the local user's video view
-
Example of an earlier version
class VideoViewController: UIViewController {
....
var call: PlanetKitCall!
var myVideoView: PlanetKitMTKView!
private func setMyVideo() {
call.setMyVideoReceiver(myVideoView)
}
} -
New version example
class VideoViewController: UIViewController {
....
var call: PlanetKitCall!
var myVideoView: PlanetKitMTKView!
private func setMyVideo() {
call.myVideoStream.addReceiver(myVideoView)
}
}
Use a custom camera for the video source
import PlanetKit
class CustomCamera: PlanetKitCustomCamera {
static var shared = CustomCamera()
// Implement the abstract method to handle FPS limit updates
override func processFpsLimitUpdate(enabled: Bool, fps: Int32) {
// Handle the FPS limit update
// If `enabled` is true, adjust your frame generation logic to according to the `fps`
}
// Method to simulate video buffer processing
func processVideoBuffer(buffer: CMSampleBuffer) {
guard let targetBuffer = PlanetKitVideoBuffer.getPreferredSampleBuffer(buffer) else {
return
}
let timestamp = CMSampleBufferGetPresentationTimeStamp(targetBuffer)
// Check if video buffer can be sent. If false, drop the buffer.
guard isVideoSendAvailable(timestamp: timestamp) else { return }
let videoBuffer = PlanetKitVideoBuffer(sampleBuffer: targetBuffer,
timestamp: timestamp,
rotation: .rotation0,
position: .unknown,
sender: nil,
source: .camera)
sendVideo(videoBuffer: videoBuffer)
}
}
// Start using the custom camera.
PlanetKitCameraManager.shared.setCustomCamera(CustomCamera.shared)
// Reset to the default device.
PlanetKitCameraManager.shared.resetToDefaultCamera()
Breaking change Remove the reason parameter from disableVideo() of PlanetKitConference
- The
reasonparameter in thedisableVideofunction ofPlanetKitConferencehas been removed because it serves no purpose. - Unused enum values in
PlanetKitMediaDisableReasonhave been removed.
API changes
Changed
-
PlanetKitConferenceclass Group callPrevious PlanetKit 5.5 func disableVideo(reason: PlanetKitMediaDisableReason, stopCamera: Bool = true, completion: @escaping (Bool)->Void)func disableVideo(stopCamera: Bool = true, completion: @escaping (Bool)->Void)
Removed
PlanetKitMediaDisableReasonenum 1-to-1 callGroup callcase noMediaSrccase noRecvMedia
Breaking change Rename audio input/output
In audio system, the input/output* names were considered confusing, so they have been changed to mic/spk*.
API changes
Changed
-
PlanetKitAudioDeviceTypeenum 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioDirection.input.micPlanetKitAudioDirection.output.spk -
PlanetKitAudioDeviceChangeDelegateenum 1-to-1 callGroup callPrevious PlanetKit 5.5 func didAudioDeviceChange(device: PlanetKitAudioDevice?, direction: PlanetKitAudioDirection)didAudioDeviceChange(device: PlanetKitAudioDevice?, type: PlanetKitAudioDeviceType)func didAudioDefaultSystemDeviceChange(device: PlanetKitAudioDevice, direction: PlanetKitAudioDirection)didAudioDefaultSystemDeviceChange(device: PlanetKitAudioDevice, type: PlanetKitAudioDeviceType) -
PlanetKitAudioVolumeDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 func didChangeVolume(_ direction: PlanetKitAudioDirection, volume: Float)func didChangeVolume(_ type: PlanetKitAudioDeviceType, volume: Float) -
PlanetKitAudioMicControllableprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 var inputDevice: PlanetKitAudioDevice? { get }var micDevice: PlanetKitAudioDevice? { get } -
PlanetKitAudioSpkControllableprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 var outputDevice: PlanetKitAudioDevice? { get }var spkDevice: PlanetKitAudioDevice? { get } -
PlanetKitAudioclass 1-to-1 callGroup callPrevious PlanetKit 5.5 var inputDevice: PlanetKitAudioDevice? { get }var micDevice: PlanetKitAudioDevice? { get }var outputDevice: PlanetKitAudioDevice? { get }var spkDevice: PlanetKitAudioDevice? { get }let inputVolume: Floatlet micVolume: Floatlet outputVolume: Floatlet spkVolume: Floatfunc setVolume(_ volume: Float, for direction: PlanetKitAudioDirection)func setVolume(_ volume: Float, for type: PlanetKitAudioDeviceType)func addVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for direction: PlanetKitAudioDirection)func addVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for type: PlanetKitAudioDeviceType)func removeVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for direction: PlanetKitAudioDirection)func removeVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for type: PlanetKitAudioDeviceType)func setPreferredDefaultDevice(direction: PlanetKitAudioDirection)func setPreferredDefaultDevice(type: PlanetKitAudioDeviceType)
Breaking change Add audio description
Replaced audio volume level with audio description.
The audio description is information that comes with audio frame data when it is received and is updated periodically.
API changes
Changed
-
PlanetKitSubgroupManagerclass Group callPrevious PlanetKit 5.5 func setPeerVolume(_ volumeLevel: Int8, peerId: PlanetKitUserId, subgroupName: String?, allSubgroupsPeerSubscribed: Bool, completion: @escaping (Bool)->Void)func setPeerVolumeLevelSetting(_ volumeLevel: Int8, peerId: PlanetKitUserId, subgroupName: String?, allSubgroupsPeerSubscribed: Bool, completion: @escaping (Bool)->Void) -
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 func setMicVolumeReceiver(_ volumeReceiver: PlanetKitAudioMicVolumeDelegate, interval: TimeInterval)func setMyAudioDescriptionReceiver(_ receiver: PlanetKitMyAudioDescriptionDelegate)func resetMicVolumeReceiver()func resetMyAudioDescriptionReceiver()func setSpkVolumeReceiver(_ volumeReceiver: PlanetKitAudioSpkVolumeDelegate, interval: TimeInterval)func setPeerAudioDescriptionReceiver(_ receiver: PlanetKitPeerAudioDescriptionDelegate)func resetSpkVolumeReceiver()func resetPeerAudioDescriptionReceiver()var isSendVideoHwCodecEnabled { get }var isVideoHwCodecEnabled { get } -
PlanetKitConferenceclass Group callPrevious PlanetKit 5.5 func setMicVolumeReceiver(_ volumeReceiver: PlanetKitAudioMicVolumeDelegate, interval: TimeInterval)func setMyAudioDescriptionReceiver(_ receiver: PlanetKitMyAudioDescriptionDelegate)func resetMicVolumeReceiver()func resetMyAudioDescriptionReceiver()func setSpkVolumeReceiver(_ volumeReceiver: PlanetKitAudioSpkVolumeDelegate, interval: TimeInterval)func setPeerAudioDescriptionReceiver(_ receiver: PlanetKitPeerAudioDescriptionDelegate)func resetSpkVolumeReceiver()func resetPeerAudioDescriptionReceiver()var isSendVideoHwCodecEnabled { get }var isVideoHwCodecEnabled { get } -
PlanetKitMyAudioDescriptionDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioMicVolumeDelegate.didRefreshMicVolumeLevel(_:)func myAudioDescriptionDidUpdate(_ description: PlanetKitMyAudioDescription) -
PlanetKitAudioDeviceVolumeDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioMicVolumeDelegate.didRefreshMicVolumeLevel(_:)func volumeDidUpdate(_ deviceType: PlanetKitAudioDeviceType, volume: Float) -
PlanetKitPeerAudioDescriptionclass 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioSpkVolumeMeter.userId, PlanetKitAudioSpkVolumeMeter.serviceIdlet peerId: PlanetKitUserIdPlanetKitAudioSpkVolumeMeter.averageLevellet averageVolumeLevel: Int8PlanetKitConferenceDelegate.subgroupPeerAudioDidChange(_:peer:audioSubgroupName:oldName:)let sentSubgroupName: String?PlanetKitConferenceDelegate.subgroupPeerAudioDidChange(_:peer:audioTaggedSubgroupName:oldName:)let taggedSubgroupName: String? -
PlanetKitPeerAudioDescriptionDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioSpkVolumeDelegate.didRefreshSpkVolumeMeter(_ :level:)func peerAudioDescriptionsDidUpdate(_ descriptions: [PlanetKitPeerAudioDescription], averageVolumeLevel: Int8)
Added
PlanetKitMakeCallSettingBuilderclass 1-to-1 callfunc withEnableAudioDescriptionKey(enable: Bool) -> PlanetKitMakeCallSettingBuilderfunc withAudioDescriptionUpdateIntervalKey(interval: TimeInterval) -> PlanetKitMakeCallSettingBuilder
PlanetKitVerifyCallSettingBuilderclass 1-to-1 callfunc withEnableAudioDescriptionKey(enable: Bool) -> PlanetKitVerifyCallSettingBuilderfunc withAudioDescriptionUpdateIntervalKey(interval: TimeInterval) -> PlanetKitVerifyCallSettingBuilder
PlanetKitJoinConferenceSettingBuilderclass Group callfunc withEnableAudioDescriptionKey(enable: Bool) -> PlanetKitJoinConferenceSettingBuilderfunc withAudioDescriptionUpdateIntervalKey(interval: TimeInterval) -> PlanetKitJoinConferenceSettingBuilder
Removed
PlanetKitConferenceDelegateprotocol Group callfunc subgroupPeerVideoDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, videoSubgroupName: String?, oldName: String?)func subgroupPeerVideoDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, videoTaggedSubgroupName: String?, oldName: String?)func subgroupPeerAudioDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, audioSubgroupName: String?, oldName: String?)func subgroupPeerAudioDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, audioTaggedSubgroupName: String?, oldName: String?)
PlanetKitCallclass 1-to-1 calllet micVolumeLevel: Int8let spkVolumeLevel: Int8
PlanetKitConferenceclass Group calllet micVolumeLevel: Int8let spkVolumeLevel: Int8
Code examples
override func viewDidLoad() {
super.viewDidLoad()
....
conference.setPeerAudioDescriptionReceiver(self)
conference.setMyAudioDescriptionReceiver(self)
}
extension VideoConferenceViewController: PlanetKitPeerAudioDescriptionDelegate {
func peerAudioDescriptionsDidUpdate(_ descriptions: [PlanetKitPeerAudioDescription], averageVolumeLevel: Int8) {
DispatchQueue.main.async {
self.resetAllPeerVolumes()
for description in descriptions {
// TODO: Update audio volumes or media route
}
}
}
}
extension VideoConferenceViewController: PlanetKitMyAudioDescriptionDelegate {
func myAudioDescriptionDidUpdate(_ description: PlanetKitMyAudioDescription) {
DispatchQueue.main.async {
// TODO: Update my volume using description.averageVolumeLevel
}
}
}
Breaking change Modify APIs of delegates, modifiers, and receivers related to audio and video
- Changed delegates, modifiers, and receivers to assignable member variables and removed corresponding setters functions.
API changes
Changed
-
PlanetKitAudioMicControllableprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 func setMicPrivateDelegate(_ micDelegate: PlanetKitAudioMicCaptureDelegate?)var micPrivateDelegate: PlanetKitAudioMicCaptureDelegate?func setMicModifier(_ micModifier: PlanetKitAudioMicCaptureDelegate?)var micModifier: PlanetKitAudioMicCaptureDelegate?func setMicVolumeReceiver(_ volumeReceiver: PlanetKitAudioDeviceVolumeDelegate, interval: TimeInterval)func resetMicVolumeReceiver()var micVolumeReceiver: PlanetKitAudioDeviceVolumeDelegate?var micVolumeInterval: TimeInterval -
PlanetKitAudioSpkControllableprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 func setSpkPrivateDelegate(_ micDelegate: PlanetKitAudioSpkPlayDelegate?)var spkPrivateDelegate: PlanetKitAudioSpkPlayDelegate?func setSpkModifier(_ micModifier: PlanetKitAudioSpkPlayDelegate?)var spkModifier: PlanetKitAudioSpkPlayDelegate?func setSpkVolumeReceiver(_ volumeReceiver: PlanetKitAudioDeviceVolumeDelegate, interval: TimeInterval)func resetSpkVolumeReceiver()var spkVolumeReceiver: PlanetKitAudioDeviceVolumeDelegate?var spkVolumeInterval: TimeInterval -
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 func setSpkModifier(_ spkModifier: PlanetKitAudioSpkPlayDelegate)func resetSpkModifier()var spkModifier: PlanetKitAudioSpkPlayDelegate?func setSpkReceiver(_ spkReceiver: PlanetKitAudioSpkPlayDelegate)func resetSpkReceiver()var spkReceiver: PlanetKitAudioSpkPlayDelegate?func setMicModifier(_ micModifier: PlanetKitAudioMicCaptureDelegate)func resetMicModifier()var micModifier: PlanetKitAudioMicCaptureDelegate?func setMicReceiver(_ micReceiver: PlanetKitAudioMicCaptureDelegate)func resetMicReceiver()var micReceiver: PlanetKitAudioMicCaptureDelegate?func setPeerAudioDescriptionReceiver(_ receiver: PlanetKitPeerAudioDescriptionDelegate)func resetPeerAudioDescriptionReceiver()var peerAudioDescriptionReceiver: PlanetKitPeerAudioDescriptionDelegate?func setMyAudioDescriptionReceiver(_ receiver: PlanetKitMyAudioDescriptionDelegate)func resetMyAudioDescriptionReceiver()var myAudioDescriptionReceiver: PlanetKitMyAudioDescriptionDelegate?func setMyVideoModifier(_ videoModifier: PlanetKitVideoModifierDelegate)func resetMyVideoModifier()var myVideoModifier: PlanetKitVideoModifierDelegate?func setMyVideoReceiver(_ videoReceiver: PlanetKitVideoOutputDelegate)func resetMyVideoReceiver()var myVideoStream: PlanetKitVideoStream { get }var initData: String? { get }var peerStartMessage: PlanetKitCallStartMessage? { get }func acceptCall(mediaType: PlanetKitMediaType, usePreparation: Bool, initData: String?)func acceptCall(startMessage: PlanetKitCallStartMessage?, useResponderPreparation: Bool, recordOnCloud: Bool = false, initialMyVideoState: PlanetKitInitialMyVideoState = .resume) -
PlanetKitConferenceclass Group callPrevious PlanetKit 5.5 func setSpkModifier(_ spkModifier: PlanetKitAudioSpkPlayDelegate)func resetSpkModifier()var spkModifier: PlanetKitAudioSpkPlayDelegate?func setSpkReceiver(_ spkReceiver: PlanetKitAudioSpkPlayDelegate)func resetSpkReceiver()var spkReceiver: PlanetKitAudioSpkPlayDelegate?func setMicModifier(_ micModifier: PlanetKitAudioMicCaptureDelegate)func resetMicModifier()var micModifier: PlanetKitAudioMicCaptureDelegate?func setMicReceiver(_ micReceiver: PlanetKitAudioMicCaptureDelegate)func resetMicReceiver()var micReceiver: PlanetKitAudioMicCaptureDelegate?func setPeerAudioDescriptionReceiver(_ receiver: PlanetKitPeerAudioDescriptionDelegate)func resetPeerAudioDescriptionReceiver()var peerAudioDescriptionReceiver: PlanetKitPeerAudioDescriptionDelegate?func setMyAudioDescriptionReceiver(_ receiver: PlanetKitMyAudioDescriptionDelegate)func resetMyAudioDescriptionReceiver()var myAudioDescriptionReceiver: PlanetKitMyAudioDescriptionDelegate?func setMyVideoModifier(_ videoModifier: PlanetKitVideoModifierDelegate)func resetMyVideoModifier()var myVideoModifier: PlanetKitVideoModifierDelegate?func setMyVideoReceiver(_ videoReceiver: PlanetKitVideoOutputDelegate)func resetMyVideoReceiver()var myVideoStream: PlanetKitVideoStream { get }
Code examples
The following is a code example for setting PlanetKitMyAudioDescriptionDelegate for the local user's audio.
// Previous
extension MyAudioDescriptionView: PlanetKitMyAudioDescriptionDelegate {
func setDelegate(call: PlanetKitCall) {
call.setMyAudioDescriptionReceiver(self)
}
func removeDelegate(call: PlanetKitCall) {
call.resetMyAudioDescriptionReceiver()
}
}
// PlanetKit 5.5
extension MyAudioDescriptionView: PlanetKitMyAudioDescriptionDelegate {
func setDelegate(call: PlanetKitCall) {
call.myAudioDescriptionReceiver = self
}
func removeDelegate(call: PlanetKitCall) {
call.myAudioDescriptionReceiver = nil
}
}
Breaking change Remove mic, spk from PlanetKitCall and PlanetKitConference
- Removed member variables
mic,spkfromPlanetKitCallandPlanetKitConference. Please useaudioManagerto access the session'sPlanetKitAudioMicControllableandPlanetKitAudioSpkControllable.
API changes
Changed
-
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 var audio: PlanetKitAudioManager?var audioManager: PlanetKitAudioManager -
PlanetKitConferenceclass Group callPrevious PlanetKit 5.5 var audio: PlanetKitAudioManager?var audioManager: PlanetKitAudioManager
Removed
-
PlanetKitCallclass 1-to-1 callvar mic: PlanetKitAudioMicControllablevar spk: PlanetKitAudioSpkControllable
-
PlanetKitConferenceclass Group callvar mic: PlanetKitAudioMicControllablevar spk: PlanetKitAudioSpkControllable
Breaking change Remove PlanetKitAudioSessionHandler
PlanetKitAudioSessionHandler has been removed and PlanetKitAudioSessionSettings for audio open and close settings have been added to PlanetKitAudio.
API changes
Added
PlanetKitAudioSessionSettingsclass 1-to-1 callGroup callPlanetKitAudioclass 1-to-1 callGroup callvar openSettings: PlanetKitAudioSessionSettings? { get set }var closeSettings: PlanetKitAudioSessionSettings? { get set }
Removed
PlanetKitAudioSessionHandlerprotocol 1-to-1 callGroup callPlanetKitAudioSessionContextclass 1-to-1 callGroup call
Code examples
The following is a code example for setting AVAudioSession.Category to playAndRecord on audio open and soloAmbient on audio close.
-
Previous implementation
class AudioSessionHandler: PlanetKitAudioSessionHandler {
func audioSessionWillOpen(_ audio: PlanetKitAudio, context: PlanetKitAudioSessionContext) -> Bool {
context.category = .playAndRecord
return true
}
func audioSessionWillClose(_ audio: PlanetKitAudio, context: PlanetKitAudioSessionContext) -> Bool {
context.category = .soloAmbient
return true
}
}
PlanetKitAudio.shared.audioSessionHandler = AudioSessionHandler() -
New implementation
let openSettings = PlanetKitAudioSessionSettings()
openSettings.category = .playAndRecord
PlanetKitAudio.shared.openSettings = openSettings
let closeSettings = PlanetKitAudioSessionSettings()
closeSettings.category = .soloAmbient
closeSettings.mode = .default
closeSettings.options = []
closeSettings.audioPort = .none
PlanetKitAudio.shared.closeSettings = closeSettings
Breaking change Make APIs of PlanetKitAudio more intuitive
- Made member variables of
PlanetKitAudioassignable and removed corresponding setter functions.
API changes
Changed
-
PlanetKitAudioclass 1-to-1 callGroup callPrevious PlanetKit 5.5 var spk: PlanetKitAudioSpkControllable? { get }var spk: PlanetKitAudioSpkControllable? { get set }var mic: PlanetKitAudioMicControllable? { get }var mic: PlanetKitAudioMicControllable? { get set }
Added
PlanetKitAudioclass 1-to-1 callGroup callvar defaultIOBufDuration: Float64var defaultMicSampleRate: Float64var defaultSpkSampleRate: Float64
Removed
PlanetKitAudioclass 1-to-1 callGroup callfunc change(mic: PlanetKitAudioMicControllable?)func change(spk: PlanetKitAudioSpkControllable?)func setAudioSessionHandler(_ handler: PlanetKitAudioSessionHandler?)func setDefaultSampleRate(mic: Float64)func setDefaultSampleRate(spk: Float64)
Breaking change Improve connected parameter and verified parameter
- Added more information about connecting 1-to-1 calls and group calls and verifying 1-to-1 calls.
- Related APIs have been changed.
API changes
Changed
-
PlanetKitCallDelegateprotocol 1-to-1 callPrevious PlanetKit 5.5 func callDidConnect(_ call: PlanetKitCall)func callDidConnect(_ call: PlanetKitCall, connected: PlanetKitCallConnectedParam)func callDidVerify(_ call: PlanetKitCall, initData: PlanetKitInitData?)func callDidVerify(_ call: PlanetKitCall, peerInitData: PlanetKitInitData?, peerUseResponderPreparation: Bool) -
PlanetKitCallKitParamclass 1-to-1 callPrevious PlanetKit 5.5 init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool)init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool, supportsHolding: Bool, useResponderPreparation: Bool = false, startMessage: PlanetKitCallStartMessage? = nil) -
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 var isSendVideoHwCodecEnabled { get }var isVideoHwCodecEnabled { get } -
PlanetKitConferenceclass Group callPrevious PlanetKit 5.5 var isSendVideoHwCodecEnabled { get }var isVideoHwCodecEnabled { get }
Added
PlanetKitCallConnectedParamclass 1-to-1 callPlanetKitCallKitParamclass 1-to-1 calllet useResponderPreparation: Boollet startMessage: PlanetKitCallStartMessage?
Breaking change Add PlanetKitCallStartMessage to replace initData
PlanetKitCallStartMessagehas been added to replaceinitDataparameter used inPlanetKitCallAPI.- You must create
PlanetKitCallStartMessagebefore setting it in thePlanetKitCallParam.
API changes
Changed
-
PlanetKitCallDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 func callDidVerify(_ call: PlanetKitCall, initData: String?)func didVerify(_ call: PlanetKitCall, peerStartMessage: PlanetKitCallStartMessage?, peerUseResponderPreparation: Bool) -
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 var initData: String? { get }var peerStartMessage: PlanetKitCallStartMessage? { get }func acceptCall(mediaType: PlanetKitMediaType, usePreparation: Bool, initData: String?)func acceptCall(startMessage: PlanetKitCallStartMessage?, useResponderPreparation: Bool, recordOnCloud: Bool = false, initialMyVideoState: PlanetKitInitialMyVideoState = .resume) -
PlanetKitCallParamclass 1-to-1 callPrevious PlanetKit 5.5 var initData: String? { get set }var startMessage: PlanetKitCallStartMessage? { get set }init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool, supportsHolding: Bool, useResponderPreparation: Bool = false, initData: PlanetKitInitData? = nil)init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool, supportsHolding: Bool, useResponderPreparation: Bool = false, startMessage: PlanetKitCallStartMessage? = nil)
Added
PlanetKitCallStartMessageclass 1-to-1 call
Breaking change Update PlanetKitDisconnectReason
PlanetKitDisconnectReasonhas been updated andPlanetKitDisconnectSourceandPlanetKitDisconnectedParamhave been added to provide more information about the disconnect event of 1-to-1 calls and group calls.
API changes
Changed
-
PlanetKitDisconnectReasonenum 1-to-1 callGroup callPrevious PlanetKit 5.5 case serviceAPIKeyErrorcase serviceAccessTokenError -
PlanetKitCallDelegateprotocol 1-to-1 callPrevious PlanetKit 5.5 func callDidDisconnect(_ call: PlanetKitCall, reason: PlanetKitDisconnectReason, userCode: String?)func didDisconnect(_ call: PlanetKitCall, disconnected: PlanetKitDisconnectedParam) -
PlanetKitConferenceDelegateprotocol Group callPrevious PlanetKit 5.5 func conferenceDidLeave(_ conference: PlanetKitConference, reason: PlanetKitDisconnectReason, userCode: String?)func didDisconnect(_ conference: PlanetKitConference, disconnected: PlanetKitDisconnectedParam)
Added
PlanetKitDisconnectSourceenum 1-to-1 callGroup callPlanetKitDisconnectedParamenum 1-to-1 callGroup callPlanetKitDisconnectReasonenum 1-to-1 callGroup callcase internalError = 1109case userError = 1110case internalKitError = 1111case micNoSource = 1112case unavailableNetwork = 1308case appDestroy = 1309case systemSleep = 1310case systemLogOff = 1311
Removed
PlanetKitDisconnectReasonenum 1-to-1 callGroup callcase micNoSrcByLocal = 1101case micNoSrcByRemote = 1102case internalErrorByLocal = 1103case internalErrorByRemote = 1104case userErrorByLocal = 1105case userErrorByRemote = 1106case internalKitErrorByLocal = 1107case internalKitErrorByRemote = 1108case unavailableNetworkInCall = 1307
PlanetKitCallclass 1-to-1 calllet disconnectByRemote: Bool
Breaking change Change the logging level and settings
The log level has been redesigned, and it has been modified to allow specifying the log size.
Log output is disabled by default at the silent log level.
If you want to provide minimal logs in a deployment build, please set the log level and log size.
API changes
Changed
-
PlanetKitInitialSettingBuilderclass 1-to-1 callGroup callPrevious PlanetKit 5.5 func withEnableKitLogKey(level: PlanetKitLogLevel, module: PlanetKitLogModule) -> PlanetKitInitialSettingBuilderfunc withEnableKitLogKey(level: PlanetKitLogLevel, enable: Bool, logSize: PlanetKitLogSizeLimit) -> PlanetKitInitialSettingBuilder
Added
PlanetKitLogLevelenum 1-to-1 callGroup callcase detailed = 5case simple = 4case silent = 0
PlanetKitLogSizeLimitenum 1-to-1 callGroup callcase small = 0case medium = 1case large = 2case unlimited = 3
Removed
PlanetKitLogLevelenum 1-to-1 callGroup callcase info = 5case error = 2case critical = 1case none = 0
PlanetKitInitialSettingBuilderclass 1-to-1 callGroup callfunc withEnableKitDebugKey(debugSetting:)
Code examples
-
Previous implementation
// Minimized logging for release
var builder = PlanetKitInitialSettingBuilder()
.withEnableKitLogKey(level: .error, enable: true)
// Full logging for debugging
var builder = PlanetKitInitialSettingBuilder()
.withEnableKitLogKey(level: .info, enable: true) -
New implementation
// Minimized logging for release
var builder = PlanetKitInitialSettingBuilder()
.withEnableKitLogKey(level: .simple, enable: true, logSize: .small)
// Full logging for debugging
var builder = PlanetKitInitialSettingBuilder()
.withEnableKitLogKey(level: .detailed, enable: true, logSize: .unlimited)
Breaking change Add view mirroring and rotation at the video render view
PlanetKitMTKView.mirroredType and PlanetKitMTKView.rotation have been added to support video mirroring and video rotation when rendering video with PlanetKitMTKView.
API changes
Changed
-
PlanetKitVideoBufferclass 1-to-1 callGroup callPrevious PlanetKit 5.5 init(sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, mirrored: Bool, sender: PlanetKitUserId?, source: PlanetKitVideoSource)init(sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, position: PlanetKitCameraPosition, sender: PlanetKitUserId?, source: PlanetKitVideoSource)init(pixelBuffer: CVPixelBuffer?, sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, mirrored: Bool, sender: PlanetKitUserId?, source: PlanetKitVideoSource)init(pixelBuffer: CVPixelBuffer?, sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, position: PlanetKitCameraPosition, sender: PlanetKitUserId?, source: PlanetKitVideoSource)
Added
PlanetKitMirroredTypeenum 1-to-1 callGroup callPlanetKitMTKViewclass 1-to-1 callGroup callvar mirroredType: PlanetKitMirroredType { get set }var rotation: PlanetKitVideoRotation { get set }
PlanetKitVideoBufferclass 1-to-1 callGroup callvar position: PlanetKitCameraPosition { get set }
Removed
PlanetKitVideoCaptureDeviceclass 1-to-1 callGroup callvar preferredMirrored: NSNumber? { get set }
PlanetKitCameraclass 1-to-1 callGroup callstatic func getVideoRotation(orientation:mirrored:)
PlanetKitVideoBufferclass 1-to-1 callGroup callvar mirrored : Bool { get set }
Code examples
For the front camera, the mirrored status can be turned off as follows.
-
Previous implementation
let device = conference.camera?.currentDevice
device?.preferredMirrored = false
conference.camera?.change(device: device) -
New implementation
override func viewDidLoad() {
super.viewDidLoad()
let mtkView = PlanetKitMTKView(frame: view.bounds, device: nil)
mtkView.mirroredType = .unmirrored
.....
}
Breaking change Change the API for data sessions
- The
unsupportedreason inPlanetKitDataSessionFailReason, which was used when the session was closed due to the peer callingunsupportInboundDataSession(), has been removed. - The
didClosecallback has been added to bothPlanetKitInboundDataSessionDelegateandPlanetKitOutboundDataSessionDelegateto notify when a data session is closed. - Closure of a data session due to
unsupportedcan also be detected through thedidCloseevent.
API changes
Changed
-
PlanetKitInboundDataSessionDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.4 func inboundDataSessionDidReceive(_ session: PlanetKitInboundDataSession, peerId: PlanetKitUserId, data: Data, timestamp: UInt64, offset: UInt64)func didReceive(_ session: PlanetKitInboundDataSession, peerId: PlanetKitUserId, data: Data, timestamp: UInt64, offset: UInt64) -
PlanetKitOutboundDataSessionDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.4 func outboundDataSessionDidTooLongQueuedData(_ session: PlanetKitOutboundDataSession, enabled: Bool)func didTooLongQueuedData(_ session: PlanetKitOutboundDataSession, enabled: Bool)
Added
-
PlanetKitDataSessionClosedReasonenum 1-to-1 callGroup call -
PlanetKitInboundDataSessionDelegateprotocol 1-to-1 callGroup callfunc didClose(_ session: PlanetKitInboundDataSession, reason: PlanetKitDataSessionClosedReason)
-
PlanetKitOutboundDataSessionDelegateprotocol 1-to-1 callGroup callfunc didClose(_ session: PlanetKitOutboundDataSession, reason: PlanetKitDataSessionClosedReason)
Removed
PlanetKitDataSessionFailReasonenum 1-to-1 callGroup callcase unsupported
Code examples
-
Example of an earlier version
call.makeOutboundDataSession(streamId: stream, type: .reliableMsg, delegate: delegate) { dataSession, failReason in
if failReason == .unsupported {
// Earlier versions handle errors here
}
....
} -
New version example
extension PhotoSender: PlanetKitOutboundDataSessionDelegate {
func didClose(_ session: PlanetKitOutboundDataSession, reason: PlanetKitDataSessionClosedReason) {
if reason == .unsupported {
// Handle unsupported case here
}
}
....
}
Breaking change Revise data session with PlanetKitDataSessionFailReason
- Data session failure information has been added.
- Related APIs have been changed.
API changes
Changed
-
PlanetKitSendDataSessionclass →PlanetKitOutboundDataSessionclass 1-to-1 callGroup callPrevious PlanetKit 5.5 typealias Completion = (_ dataSession: PlanetKitSendDataSession?, _ success: Bool, _ description: String?)->Voidtypealias Completion = (_ dataSession: PlanetKitOutboundDataSession?, _ failReason: PlanetKitDataSessionFailReason)->Void -
PlanetKitRecvDataSessionclass →PlanetKitInboundDataSessionclass 1-to-1 callGroup callPrevious PlanetKit 5.5 typealias Completion = (_ dataSession: PlanetKitRecvDataSession?, _ success: Bool, _ description: String?)->Voidtypealias Completion = (_ dataSession: PlanetKitInboundDataSession?, _ failReason: PlanetKitDataSessionFailReason)->Void
Added
PlanetKitDataSessionFailReasonenum 1-to-1 callGroup callcase none = 0case internal = 1case unsupported = 2case notIncoming = 3case alreadyExist = 4case invalidId = 5case invalidType = 6
PlanetKitDataSessionControllableprotocol 1-to-1 callGroup callfunc getOutboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitOutboundDataSession?func getInboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitInboundDataSession?
Removed
PlanetKitSendDataSessionDelegateprotocol 1-to-1 callGroup callfunc sendDataSessionDidUnsupport(_ session: PlanetKitSendDataSession)
PlanetKitRecvDataSessionDelegateprotocol 1-to-1 callGroup callfunc recvDataSessionDidTooLongQueuedData(_ session: PlanetKitRecvDataSession, enabled: Bool)func recvDataSessionDidUnsupport(_ session: PlanetKitRecvDataSession)
Spec change Change the hold feature
The hold function will pause receiving peer's video or audio all the time.
API changes
Changed
-
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 func holdCall(reason: String?, pauseRecv: Bool, completion: @escaping (Bool)->Void)func holdCall(reason: String?, completion: @escaping (Bool)->Void) -
PlanetKitConferencePeerclass Group callPrevious PlanetKit 5.5 PlanetKitConferencePeerInfo.holdvar holdStatus: PlanetKitHoldStatus -
PlanetKitHoldStatusclass Group callPrevious PlanetKit 5.5 PlanetKitHold.isHeldlet isOnHold: BoolPlanetKitHold.holdReasonlet holdReason: String?
Removed
PlanetKitConferencePeerHoldclass Group calllet peerPausedRecv: Bool
Spec change Hold feature now stops screen share from being sent
If you call hold while screen sharing, the screen share stops and callback event occurs.
API changes
Added
PlanetKitCallDelegateprotocol 1-to-1 callfunc myScreenShareDidStopByHold(_ conference: PlanetKitConference)
PlanetKitConferenceDelegateprotocol Group callfunc myScreenShareDidStopByHold(_ conference: PlanetKitConference)
Removed
PlanetKitCallclass 1-to-1 callvar hold: Bool { get }
PlanetKitConferenceclass Group callvar hold: Bool { get }func isPeerScreenShared(peerId: PlanetKitUserId) -> Bool
PlanetKitSubgroupclass Group callfunc isPeerScreenShared(peerId: PlanetKitUserId) -> Bool
Spec change Remove the high-priority audio transmission
- The high-priority audio transmission feature has been deprecated.
API changes
Removed
PlanetKitConferenceclass Group calllet isHighPriorityAudio: Boolfunc setHighPriorityAudioSend(_ isHighPriority: Bool, completion: @escaping (Bool)->Void)
Spec change Add the verified state to PlanetKitCallState
- The call state between the call verified event and the call connected/disconnected event is changed to the
verifiedstate from thewaitAnswerstate. - In addition, the
answeredstate has been removed.
API changes
Added
PlanetKitCallStateenum 1-to-1 callcase verified
Removed
PlanetKitCallStateenum 1-to-1 callcase answered
Spec change Remove the room attribute
You can create subgroups without the room attribute settings since PlanetKit 5.2.
API changes
Removed
PlanetKitConferenceclass Group calllet roomType: PlanetKitConferenceRoomType
PlanetKitConferenceParamclass Group callvar roomType: PlanetKitConferenceRoomType { get set }
PlanetKitConferenceRoomTypeenum Group callPlanetKitDisconnectReasonenum - 1-on-1 call, Group callcase wrongRoomAttribute = 1403
Spec change Add device rotation at the video capture device
You can use rotation to send the rotated camera image to the other participants.
API changes
Added
PlanetKitVideoCaptureDeviceInfoclass 1-to-1 callGroup callvar rotation: PlanetKitVideoRotation { get set }
Removed
PlanetKitRenderingPolicyenum 1-to-1 callGroup callcase singlecase tripleBuffering
PlanetKitCameraclass 1-to-1 callGroup callstatic func getVideoRotation(orientation: PlanetKitUIOrientation, mirror: Bool) -> PlanetKitVideoRotation
Code examples
The following is a code example for applying a 90-degree clockwise rotation to the camera video.
guard let deviceInfo = PlanetKitCameraManager.shared.currentDeviceInfo else {
return
}
deviceInfo.rotation = .rotation90
PlanetKitCameraManager.shared.change(deviceInfo: deviceInfo)
Spec change Change the specification of sendShortData()
- Multicast option of the short data transmission feature in group calls has been deprecated. Supported options are unicast and broadcast.
- In previous PlanetKit versions, the sum of the type size and short data size must not exceed 900 bytes.
- Since PlanetKit 5.2, the size of the type must not exceed 100 bytes and the size of short data must not exceed 800 bytes.
API changes
Changed
-
PlanetKitConferenceclass 1-to-1 callGroup callPrevious PlanetKit 5.5 func sendShortData(targets: [PlanetKitUserId]?, type: String, data: Data, completion: @escaping (Bool)->Void)func sendShortData(peerId: PlanetKitUserId, type: String, data: Data, completion: @escaping (Bool)->Void)
Spec change Add limitation to the display name
- The
displayNameproperty inPlanetKitConferenceParamis now limited to 128 bytes, including null termination. - Any trailing part of the string that exceeds the maximum size is discarded.
Spec change Change the range of data session stream ID
- The previous specification for range of data session stream ID was from 100 to 1000, but the upper limit has been changed to 999.
Spec change Change the specification regarding the size limit of app server data
- The size limit for app server data (formerly
stid) has been increased from 256 bytes to 4096 bytes.
Enhancement Use PlanetKitPeerControl instead of calling requestPeerVideo() and stopPeerVideo()
PlanetKitPeerControlhas been added to support peer event/method isolation which allows applications to design a view/view model for a peer with less dependency onPlanetKitConferenceandPlanetKitConferenceDelegate.- Create
PlanetKitPeerControlinstance for a peer viaPlanetKitConference.createPeerControl()and the instance's methods and events will specifically targeted for the peer. - Once
PlanetKitPeerControlandPlanetKitPeerControlDelegatebecome available for a peer, you can update and control the peer's view/view model usingPlanetKitPeerControlandPlanetKitPeerControlDelegate. This significantly reduces the needs to parse the peer's event fromPlanetKitConferenceDelegateand provide extra parameters for peer methods inPlanetKitConference.
API changes
Added
PlanetKitPeerControlDelegateprotocol Group callPlanetKitPeerControlclass Group callPlanetKitConferenceclass Group callfunc createPeerControl(peer: PlanetKitConferencePeer) -> PlanetKitPeerControl?
Code examples
-
Create your peer view or view model with a
PlanetKitPeerControlproperty and necessary view properties.class YourPeerView {
var mtkView: PlanetKitMTKView?
var peerControl: PlanetKitPeerControl?
} -
Extend your class to adopt and conform to
PlanetKitPeerControlDelegateprotocol.extension YourPeerView: PlanetKitPeerControlDelegate {
// implement delegate functions as needed
} -
Create
PlanetKitPeerControl.extension YourPeerView {
func createPeerControl(peer: PlanetKitConferencePeer) -> Bool {
guard let peerControl = PlanetKitManager.shared.conference?.createPeerControl(peer: peer) else {
NSLog("peer control create failed.")
return false
}
self.peerControl = peerControl
return true
}
} -
Register
PlanetKitPeerControl.extension YourPeerView {
func registerPeerControl() {
peerControl?.register(delegate: self) { success in
NSLog("registerPeerControl result: \(success).")
}
}
} -
Handle events from
PlanetKitPeerControlDelegateto play peer video.extension YourPeerView: PlanetKitPeerControlDelegate {
func didUpdateVideo(_ peerControl: PlanetKitPeerControl, subgroup: PlanetKitSubgroup, status: PlanetKitVideoStatus) {
if status.isEnabled {
// When the peer's video status is enabled, start rendering the peer's video.
self.peerControl?.startVideo(maxResolution: .recommended, delegate: self.mtkView!, subgroupName: self.peerControl?.peer.currentVideoSubgroupName) { success in
NSLog("videoDidUpdate video start \(String(describing: self.peerControl?.peer.id)) success: \(success)")
}
}
else {
// Otherwise, stop rendering the peer's video.
self.peerControl?.stopVideo() { success in
NSLog("videoDidUpdate video stop \(String(describing: self.peerControl?.peer.id))")
}
}
}
} -
Unregister
PlanetKitPeerControl.extension YourPeerView {
func unregisterPeerControl() {
peerControl?.unregister() { success in
}
}
}
Enhancement Add PlanetKitMyMediaStatus
Added PlanetKitMyMediaStatus to get the local user's media status and observe the local user's media status change using PlanetKitMyMediaStatusDelegate.
API changes
Added
PlanetKitMyMediaStatusDelegateprotocol Group callPlanetKitMyMediaStatusclass Group callPlanetKitCallclass 1-to-1 callvar myMediaStatus: PlanetKitMyMediaStatus { get }
PlanetKitConferenceclass Group callvar myMediaStatus: PlanetKitMyMediaStatus { get }
Removed
PlanetKitConferenceclass Group callvar myVideoStatus: PlanetKitVideoStatus { get }var isMyAudioMuted: Bool { get }
Code examples
-
Use
PlanetKitMyMediaStatusto implement the local user's UI view.class MyView: UIView {
@IBOutlet private weak var status: UILabel!
func setupView(conference: PlanetKitConference) {
conference.myMediaStatus.addHandler(self) { success in }
}
func clearView(conference: PlanetKitConference) {
conference.myMediaStatus.removeHandler(self) { success in }
}
}
extension MyView: PlanetKitMyMediaStatusDelegate {
func didMuteMic(_ myMediaStatus: PlanetKitMyMediaStatus) {
DispatchQueue.main.async {
status.text = "muted"
}
}
}
Enhancement Use PlanetKitCCParam when calling verifyCall()
You can now parse the CCParam received by the push message to obtain the desired data.
API changes
Changed
-
PlanetKitManagerclass 1-to-1 callPrevious PlanetKit 5.5 func verifyCall(myUserId: PlanetKitUserId, pushMessage: String, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResultfunc verifyCall(myUserId: PlanetKitUserId, ccParam: PlanetKitCCParam, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResultfunc verifyCall(myUserId: PlanetKitUserId, pushMessage: String, settings: [String: Any]?, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResultfunc verifyCall(myUserId: PlanetKitUserId, ccParam: PlanetKitCCParam, settings: [String: Any]?, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResult
Added
PlanetKitCCParamclass 1-to-1 call
Code examples
guard let param = message?["cc_param"] as? String else { return }
guard let ccParam = PlanetKitCCParam(ccParam: param) else { return }
....
let result = PlanetKitManager.shared.verifyCall(myUserId: myUserId, ccParam: ccParam, settings: settings, delegate: manageable)
Enhancement Add PlanetKitInitialMyVideoState
PlanetKitInitialMyVideoState is an enum added to determine the state of the local user's video when a video call is started or activated.
- This change allows you to set the initial video state to either resumed or paused.
- The default value for a property or parameter of type
PlanetKitInitialMyVideoStateisPlanetKitInitialMyVideoState.resume.
API changes
Changed
-
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 func acceptCall(mediaType: PlanetKitMediaType, usePreparation: Bool, initData: String?)func acceptCall(startMessage: PlanetKitCallStartMessage?, useResponderPreparation: Bool, recordOnCloud: Bool = false, initialMyVideoState: PlanetKitInitialMyVideoState = .resume)func enableVideo(completion: @escaping (Bool)->Void)func enableVideo(initialMyVideoState: PlanetKitInitialMyVideoState = .resume, completion: @escaping (Bool)->Void)func disableVideo(reason: PlanetKitMediaDisableReason, stopCamera: Bool = true, completion: @escaping (Bool)->Void)func disableVideo(reason: PlanetKitMediaDisableReason, completion: @escaping (Bool)->Void) -
PlanetKitConferenceclass Group callPrevious PlanetKit 5.5 func enableVideo(completion: @escaping (Bool)->Void)func enableVideo(initialMyVideoState: PlanetKitInitialMyVideoState = .resume, completion: @escaping (Bool)->Void)func disableVideo(stopCamera: Bool = true, completion: @escaping (Bool)->Void)func disableVideo(completion: @escaping (Bool)->Void)
Added
PlanetKitInitialMyVideoStateenum 1-to-1 callcase resumecase pause
PlanetKitCallParamclass 1-to-1 callvar initialMyVideoState: PlanetKitInitialMyVideoState { get set }
PlanetKitConferenceParamclass Group callvar initialMyVideoState: PlanetKitInitialMyVideoState { get set }
API change list
Changed
-
PlanetKitConferencePeerclass Group callPrevious PlanetKit 5.5 PlanetKitConferencePeerInfo.isDataSessionSupportedlet isDataSessionSupported: BoolPlanetKitConferencePeerInfo.isMutedlet isMuted: BoolPlanetKitConferencePeerInfo.holdlet holdStatus: PlanetKitHoldStatusPlanetKitConferencePeerInfo.subgroupNameslet subgroupNames: [String]?PlanetKitConferencePeerInfo.activeVideoSubgroupNamelet currentVideoSubgroupName: String?PlanetKitConferencePeerInfo.activeScreenShareSubgroupNamelet currentScreenShareSubgroupName: String?PlanetKitConferencePeerInfo.userEquipmentTypelet userEquipmentType: PlanetKitUserEquipmentTypePlanetKitConferencePeerInfo.displayNamelet displayName: String?PlanetKitConferencePeerInfo.sipLocalIPlet sipLocalIP: String?PlanetKitConferencePeerInfo.sipDeviceInfolet sipDeviceInfo: String?PlanetKitConferencePeerState.videoStatusfunc videoStatus(subgroupName: String?) throws -> PlanetKitVideoStatusPlanetKitConferencePeerState.screenShareStatefunc screenShareStatus(subgroupName: String?) throws -> PlanetKitScreenShareStatusPlanetKitConferencePeerState.peerVolumefunc volumeLevelSetting(subgroupName: String?) throws -> PlanetKitVolumeLevelPlanetKitConferencePeerInfo.holdvar holdStatus: PlanetKitHoldStatus -
PlanetKitConferenceDelegateprotocol Group callPrevious PlanetKit 5.5 func conferenceDidJoin(_ conference: PlanetKitConference)func didConnect(_ conference: PlanetKitConference)func conferenceDidLeave(_ conference: PlanetKitConference, reason: PlanetKitDisconnectReason, userCode: String?)func didDisconnect(_ conference: PlanetKitConference, disconnected: PlanetKitDisconnectedParam)func peerVideoDidUpdate(_ conference: PlanetKitConference, updated: PlanetKitConferenceVideoUpdateParam)func peersVideoDidUpdate(_ conference: PlanetKitConference, updated: PlanetKitConferenceVideoUpdateParam)func peersMicDidMute(_ conference: PlanetKitConference, peerInfos: [PlanetKitConferencePeerInfo])func peersMicDidMute(_ conference: PlanetKitConference, peerInfos: [PlanetKitConferencePeerInfo])func peersMicDidMute(_ conference: PlanetKitConference, peers: [PlanetKitConferencePeer])func peersMicDidUnmute(_ conference: PlanetKitConference, peerInfos: [PlanetKitConferencePeerInfo])func peersMicDidUnmute(_ conference: PlanetKitConference, peers: [PlanetKitConferencePeer])func peerDidRequestMyMute(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, mute: Bool)func myMuteRequestedByPeer(_ conference: PlanetKitConference, peer: PlanetKitConferencePeer, mute: Bool)func peersDidUnhold(_ conference: PlanetKitConference, peerInfos: [PlanetKitConferencePeerInfo])func peersDidUnhold(_ conference: PlanetKitConference, peers: [PlanetKitConferencePeer])func peersDidUnsetSharedContents(_ conference: PlanetKitConference, peerInfos: [PlanetKitConferencePeerInfo])func peersDidUnsetSharedContents(_ conference: PlanetKitConference, peers: [PlanetKitConferencePeer])func peerDidSetExclusivelySharedContents(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, data: Data, elapsed seconds: TimeInterval)func peerDidSetExclusivelySharedContents(_ conference: PlanetKitConference, peer: PlanetKitConferencePeer, data: Data, elapsed seconds: TimeInterval)func peerDidUnsetExclusivelySharedContents(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo)func peerDidUnsetExclusivelySharedContents(_ conference: PlanetKitConference, peer: PlanetKitConferencePeer)func conferenceDidReceiveAppControlMessage(_ conference: PlanetKitConference, message: Data)func didReceiveAppControlMessage(_ conference: PlanetKitConference, message: Data)func didDetectCamNoSrc(_ conference: PlanetKitConference)func didDetectMyVideoNoSource(_ conference: PlanetKitConference)func shortDataDidReceive(_ conference: PlanetKitConference, senderId: PlanetKitUserId, dataType: String, data: Data)func didReceiveShortData(_ conference: PlanetKitConference, senderId: PlanetKitUserId, dataType: String, data: Data)func conferenceDataSessionIncoming(_ conference: PlanetKitConference, streamId: PlanetKitDataSessionStreamId, subgroup: PlanetKitSubgroup?, type: PlanetKitDataSessionType)func dataSessionIncoming(_ conference: PlanetKitConference, streamId: PlanetKitDataSessionStreamId, subgroup: PlanetKitSubgroup?, type: PlanetKitDataSessionType)func conferenceDidStartMyBroadcast(_ conference: PlanetKitConference)func didStartMyBroadcast(_ conference: PlanetKitConference)func conferenceDidFinishMyBroadcast(_ conference: PlanetKitConference)func didFinishMyBroadcast(_ conference: PlanetKitConference)func conferenceDidErrorMyBroadcast(_ conference: PlanetKitConference, error: PlanetKitScreenShare.BroadcastError)func didErrorMyBroadcast(_ conference: PlanetKitConference, error: PlanetKitScreenShare.BroadcastError)func publicSubgroupPeerDidUpdate(_ conference: PlanetKitConference, updated: PlanetKitConferenceSubgroupUpdateParam)func peersDidUpdatePublicSubgroup(_ conference: PlanetKitConference, updated: PlanetKitConferenceSubgroupUpdateParam)func conferenceException(_ conference: PlanetKitConference, exceptions: [PlanetKitConferenceExceptionMessage])func exception(_ conference: PlanetKitConference, exceptions: [PlanetKitConferenceExceptionMessage])func badNetworkDidDetect(_ conference: PlanetKitConference, willDisconnected seconds: TimeInterval)func networkDidUnavailable(_ conference: PlanetKitConference, willDisconnected seconds: TimeInterval)func badNetworkDidResolve(_ conference: PlanetKitConference)func networkDidReavailable(_ conference: PlanetKitConference) -
PlanetKitConferenceSubgroupUpdatedPeerclass Group callPrevious PlanetKit 5.5 let peerInfo: PlanetKitConferencePeerInfolet peer: PlanetKitConferencePeerlet subscribedGroupNames: [String]let subscribedSubgroupNames: [String]let unsubscribedGroupNames: [String]let unsubscribedSubgroupNames: [String] -
PlanetKitConferencePeerHoldclass Group callPrevious PlanetKit 5.5 let peerInfo: PlanetKitConferencePeerInfolet peer: PlanetKitConferencePeer -
PlanetKitConferencePeerVideoPauseclass Group callPrevious PlanetKit 5.5 let peerInfo: PlanetKitConferencePeerInfolet peer: PlanetKitConferencePeer -
PlanetKitConferenceSetSharedContentclass Group callPrevious PlanetKit 5.5 let peerInfo: PlanetKitConferencePeerInfolet peer: PlanetKitConferencePeer -
PlanetKitManagerclass 1-to-1 callPrevious PlanetKit 5.5 func verifyCall(myUserId: PlanetKitUserId, pushMessage: String, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResultfunc verifyCall(myUserId: PlanetKitUserId, ccParam: PlanetKitCCParam, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResultfunc verifyCall(myUserId: PlanetKitUserId, pushMessage: String, settings: [String: Any]?, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResultfunc verifyCall(myUserId: PlanetKitUserId, ccParam: PlanetKitCCParam, settings: [String: Any]?, delegate: PlanetKitCallDelegate?) -> PlanetKitCallVerifyResult -
PlanetKitHoldStatusclass Group callPrevious PlanetKit 5.5 PlanetKitHold.isHeldlet isOnHold: BoolPlanetKitHold.holdReasonlet holdReason: String? -
PlanetKitScreenclass 1-to-1 callGroup callPrevious PlanetKit 5.5 func setOverlay(windowLevel: CGWindowLevel, processIdentifier: Int32)func setOverlay(windowIDs: Set<CGWindowID>) -
PlanetKitAudioDeviceTypeenum 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioDirection.inputcase micPlanetKitAudioDirection.outputcase spk -
PlanetKitAudioDeviceChangeDelegateenum 1-to-1 callGroup callPrevious PlanetKit 5.5 func didAudioDeviceChange(device: PlanetKitAudioDevice?, direction: PlanetKitAudioDirection)func didAudioDeviceChange(device: PlanetKitAudioDevice?, type: PlanetKitAudioDeviceType)func didAudioDefaultSystemDeviceChange(device: PlanetKitAudioDevice, type: PlanetKitAudioDeviceType)func didAudioDefaultSystemDeviceChange(device: PlanetKitAudioDevice?, type: PlanetKitAudioDeviceType) -
PlanetKitAudioVolumeDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 func didChangeVolume(_ direction: PlanetKitAudioDirection, volume: Float)func didChangeVolume(_ type: PlanetKitAudioDeviceType, volume: Float) -
PlanetKitAudioMicControllableprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 var inputDevice: PlanetKitAudioDevice? { get }var micDevice: PlanetKitAudioDevice? { get }func setMicPrivateDelegate(_ micDelegate: PlanetKitAudioMicCaptureDelegate?)weak var micPrivateDelegate: PlanetKitAudioMicCaptureDelegate? { get }func setMicModifier(_ micModifier: PlanetKitAudioMicCaptureDelegate?)weak var micModifier: PlanetKitAudioMicCaptureDelegate? { get }func setMicVolumeReceiver(_ volumeReceiver: PlanetKitAudioDeviceVolumeDelegate, interval: TimeInterval)func resetMicVolumeReceiver()weak var micVolumeReceiver: PlanetKitAudioDeviceVolumeDelegate? { get set }var micVolumeInterval: TimeInterval -
PlanetKitAudioSpkControllableprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 var outputDevice: PlanetKitAudioDevice? { get }var spkDevice: PlanetKitAudioDevice? { get }func setSpkPrivateDelegate(_ micDelegate: PlanetKitAudioSpkPlayDelegate?)weak var spkPrivateDelegate: PlanetKitAudioSpkPlayDelegate? { get set }func setSpkModifier(_ micModifier: PlanetKitAudioSpkPlayDelegate?)weak var spkModifier: PlanetKitAudioSpkPlayDelegate? { get set }func setSpkVolumeReceiver(_ volumeReceiver: PlanetKitAudioDeviceVolumeDelegate, interval: TimeInterval)func resetSpkVolumeReceiver()weak var spkVolumeReceiver: PlanetKitAudioDeviceVolumeDelegate? { get set }var spkVolumeInterval: TimeInterval -
PlanetKitAudioclass 1-to-1 callGroup callPrevious PlanetKit 5.5 var inputDevice: PlanetKitAudioDevice? { get }var micDevice: PlanetKitAudioDevice? { get }var outputDevice: PlanetKitAudioDevice? { get }var spkDevice: PlanetKitAudioDevice? { get }let inputVolume: Floatlet micVolume: Floatlet outputVolume: Floatlet spkVolume: Floatfunc setVolume(_ volume: Float, for direction: PlanetKitAudioDirection)func setVolume(_ volume: Float, for type: PlanetKitAudioDeviceType)func addVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for direction: PlanetKitAudioDirection)func addVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for type: PlanetKitAudioDeviceType)func removeVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for direction: PlanetKitAudioDirection)func removeVolumeDelegate(_ delegate: PlanetKitAudioVolumeDelegate, for type: PlanetKitAudioDeviceType)func setPreferredDefaultDevice(direction: PlanetKitAudioDirection)func setPreferredDefaultDevice(type: PlanetKitAudioDeviceType)var spk: PlanetKitAudioSpkControllable? { get }var spk: PlanetKitAudioSpkControllable? { get set }var mic: PlanetKitAudioMicControllable? { get }var mic: PlanetKitAudioMicControllable? { get set } -
PlanetKitSubgroupManagerclass Group callPrevious PlanetKit 5.5 func setPeerVolume(_ volumeLevel: Int8, peerId: PlanetKitUserId, subgroupName: String?, allSubgroupsPeerSubscribed: Bool, completion: @escaping (Bool)->Void)func setPeerVolumeLevelSetting(_ volumeLevel: Int8, peerId: PlanetKitUserId, subgroupName: String?, allSubgroupsPeerSubscribed: Bool, completion: @escaping (Bool)->Void) -
PlanetKitCallclass 1-to-1 callPrevious PlanetKit 5.5 func acceptCall(mediaType: PlanetKitMediaType, usePreparation: Bool, initData: String?)func acceptCall(startMessage: PlanetKitCallStartMessage?, useResponderPreparation: Bool, recordOnCloud: Bool = false, initialMyVideoState: PlanetKitInitialMyVideoState = .resume)func holdCall(reason: String?, pauseRecv: Bool, completion: @escaping (Bool)->Void)func hold(reason: String?, completion: @escaping (Bool)->Void)func unholdCall(completion: @escaping (Bool)->Void)func unhold(completion: @escaping (Bool)->Void)func endCall(normalUserCode: String)func endCall(normalUserReleaseCode: String)func endCall(errorUserCode: String)func endCall(errorUserReleaseCode: String)func setSpkModifier(_ spkModifier: PlanetKitAudioSpkPlayDelegate)func resetSpkModifier()weak var spkModifier: PlanetKitAudioSpkPlayDelegate? { get set }func setSpkReceiver(_ spkReceiver: PlanetKitAudioSpkPlayDelegate)func resetSpkReceiver()weak var spkReceiver: PlanetKitAudioSpkPlayDelegate? { get set }func setMicModifier(_ micModifier: PlanetKitAudioMicCaptureDelegate)func resetMicModifier()weak var micModifier: PlanetKitAudioMicCaptureDelegate? { get set }func setMicReceiver(_ micReceiver: PlanetKitAudioMicCaptureDelegate)func resetMicReceiver()weak var micReceiver: PlanetKitAudioMicCaptureDelegate? { get set }func setSpkVolumeReceiver(_ volumeReceiver: PlanetKitAudioSpkVolumeDelegate, interval: TimeInterval)func resetSpkVolumeReceiver()weak var peerAudioDescriptionReceiver: PlanetKitPeerAudioDescriptionDelegate? { get set }func setMicVolumeReceiver(_ volumeReceiver: PlanetKitAudioMicVolumeDelegate, interval: TimeInterval)func resetMicVolumeReceiver()weak var myAudioDescriptionReceiver: PlanetKitMyAudioDescriptionDelegate? { get set }func setMyVideoModifier(_ videoModifier: PlanetKitVideoModifierDelegate)func resetMyVideoModifier()weak var myVideoModifier: PlanetKitVideoModifierDelegate? { get set }func setMyVideoReceiver(_ videoReceiver: PlanetKitVideoOutputDelegate)func resetMyVideoReceiver()weak var myVideoStream: PlanetKitVideoStream { get } { get set }let audio: PlanetKitAudioManager?let audioManager: PlanetKitAudioManagervar delegate: PlanetKitCallDelegate? { get set }weak var delegate: PlanetKitCallDelegate? { get } -
PlanetKitConferenceclass Group callPrevious PlanetKit 5.5 func setSpkModifier(_ spkModifier: PlanetKitAudioSpkPlayDelegate)func resetSpkModifier()weak var spkModifier: PlanetKitAudioSpkPlayDelegate? { get set }func setSpkReceiver(_ spkReceiver: PlanetKitAudioSpkPlayDelegate)func resetSpkReceiver()weak var spkReceiver: PlanetKitAudioSpkPlayDelegate? { get set }func setMicModifier(_ micModifier: PlanetKitAudioMicCaptureDelegate)func resetMicModifier()weak var micModifier: PlanetKitAudioMicCaptureDelegate? { get set }func setMicReceiver(_ micReceiver: PlanetKitAudioMicCaptureDelegate)func resetMicReceiver()weak var micReceiver: PlanetKitAudioMicCaptureDelegate? { get set }func setSpkVolumeReceiver(_ volumeReceiver: PlanetKitAudioSpkVolumeDelegate, interval: TimeInterval)func resetSpkVolumeReceiver()weak var peerAudioDescriptionReceiver: PlanetKitPeerAudioDescriptionDelegate? { get set }func setMicVolumeReceiver(_ volumeReceiver: PlanetKitAudioMicVolumeDelegate, interval: TimeInterval)func resetMicVolumeReceiver()weak var myAudioDescriptionReceiver: PlanetKitMyAudioDescriptionDelegate? { get set }func setMyVideoModifier(_ videoModifier: PlanetKitVideoModifierDelegate)func resetMyVideoModifier()weak var myVideoModifier: PlanetKitVideoModifierDelegate? { get set }func setMyVideoReceiver(_ videoReceiver: PlanetKitVideoOutputDelegate)func resetMyVideoReceiver()weak var myVideoStream: PlanetKitVideoStream { get } { get set }let audio: PlanetKitAudioManager?let audioManager: PlanetKitAudioManagervar delegate: PlanetKitConferenceDelegate? { get set }weak var delegate: PlanetKitConferenceDelegate? { get }func sendShortData(targets: [PlanetKitUserId]?, type: String, data: Data, completion: @escaping (Bool)->Void)func sendShortData(peerId: PlanetKitUserId, type: String, data: Data, completion: @escaping (Bool)->Void)func enableVideo(completion: @escaping (Bool)->Void)func enableVideo(initialMyVideoState: PlanetKitInitialMyVideoState = .resume, completion: @escaping (Bool)->Void)func disableVideo(reason: PlanetKitMediaDisableReason, stopCamera: Bool = true, completion: @escaping (Bool)->Void)func disableVideo(stopCamera: Bool = true, completion: @escaping (Bool)->Void) -
PlanetKitMyAudioDescriptionDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioMicVolumeDelegate.didRefreshMicVolumeLevel(_:)func myAudioDescriptionDidUpdate(_ description: PlanetKitMyAudioDescription) -
PlanetKitAudioDeviceVolumeDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioMicVolumeDelegate.didRefreshMicVolumeLevel(_:)func volumeDidUpdate(_ deviceType: PlanetKitAudioDeviceType, volume: Float) -
PlanetKitPeerAudioDescriptionclass 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioSpkVolumeMeter.userId, PlanetKitAudioSpkVolumeMeter.serviceIdlet peerId: PlanetKitUserIdPlanetKitAudioSpkVolumeMeter.averageLevellet averageVolumeLevel: Int8PlanetKitConferenceDelegate.subgroupPeerAudioDidChange(_:peer:audioSubgroupName:oldName:)let sentSubgroupName: String?PlanetKitConferenceDelegate.subgroupPeerAudioDidChange(_:peer:audioTaggedSubgroupName:oldName:)let taggedSubgroupName: String? -
PlanetKitPeerAudioDescriptionDelegateprotocol 1-to-1 callGroup callPrevious PlanetKit 5.5 PlanetKitAudioSpkVolumeDelegate.didRefreshSpkVolumeMeter(_ :level:)func peerAudioDescriptionsDidUpdate(_ descriptions: [PlanetKitPeerAudioDescription], averageVolumeLevel: Int8) -
PlanetKitInitialSettingBuilderclass 1-to-1 callGroup callPrevious PlanetKit 5.5 func withEnableKitLogKey(level: PlanetKitLogLevel, module: PlanetKitLogModule) -> PlanetKitInitialSettingBuilderfunc withEnableKitLogKey(level: PlanetKitLogLevel, enable: Bool) -> PlanetKitInitialSettingBuilderfunc withSetKitLogPathKey(path: String) throws -> PlanetKitInitialSettingBuilderfunc withSetKitBasePathKey(path: String) throws -> PlanetKitInitialSettingBuilder -
PlanetKitMakeCallSettingBuilderclass 1-to-1 callPrevious PlanetKit 5.5 func withEnableScreenSharingKey((broadcastPort: UInt16, broadcastRxToken: String, broadcastTxToken: String) -> PlanetKitMakeCallSettingBuilderfunc withEnableScreenShareKey(broadcastPort : UInt16, broadcastPeerToken: String, broadcastMyToken: String) -> PlanetKitMakeCallSettingBuilder -
PlanetKitVerifyCallSettingBuilderclass 1-to-1 callPrevious PlanetKit 5.5 func withEnableScreenSharingKey(broadcastPort: UInt16, broadcastRxToken: String, broadcastTxToken: String) -> PlanetKitVerifyCallSettingBuilderfunc withEnableScreenShareKey(broadcastPort : UInt16, broadcastPeerToken: String, broadcastMyToken: String) -> PlanetKitVerifyCallSettingBuilder -
PlanetKitJoinConferenceSettingBuilderclass Group callPrevious PlanetKit 5.5 func withEnableScreenSharingKey(broadcastPort: UInt16, broadcastRxToken: String, broadcastTxToken: String) -> PlanetKitJoinConferenceSettingBuilderfunc withEnableScreenShareKey(broadcastPort: UInt16, broadcastPeerToken: String, broadcastMyToken: String) -> PlanetKitJoinConferenceSettingBuilder -
PlanetKitCallKitParamclass 1-to-1 callPrevious PlanetKit 5.5 init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool)init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool, supportsHolding: Bool, useResponderPreparation: Bool = false, startMessage: PlanetKitCallStartMessage? = nil) -
PlanetKitCallDirectionenum 1-to-1 callPrevious PlanetKit 5.5 case incommingcase incoming -
PlanetKitCallDelegateprotocol 1-to-1 callPrevious PlanetKit 5.5 func callDidWaitConnect(_ call: PlanetKitCall)func didWaitConnect(_ call: PlanetKitCall)func callDidConnect(_ call: PlanetKitCall)func didConnect(_ call: PlanetKitCall, connected: PlanetKitCallConnectedParam)func callDidDisconnect(_ call: PlanetKitCall, reason: PlanetKitDisconnectReason, userCode: String?)func didDisconnect(_ call: PlanetKitCall, disconnected: PlanetKitDisconnectedParam)func callDidVerify(_ call: PlanetKitCall, initData: String?)func didVerify(_ call: PlanetKitCall, peerStartMessage: PlanetKitCallStartMessage?, peerUseResponderPreparation: Bool)func callDidPreparationFinish(_ call: PlanetKitCall)func didFinishPreparation(_ call: PlanetKitCall)func networkDidUnavailble(_ call: PlanetKitCall, isPeer: Bool, willDisconnected seconds: TimeInterval)func networkDidUnavailable(_ call: PlanetKitCall, isPeer: Bool, willDisconnected seconds: TimeInterval)func networkDidReavilable(_ call: PlanetKitCall, isPeer: Bool)func networkDidReavailable(_ call: PlanetKitCall, isPeer: Bool)func peerVideoDidEnable(_ call: PlanetKitCall)func videoEnabledByPeer(_ call: PlanetKitCall)func peerVideoDidDisable(_ call: PlanetKitCall, reason: PlanetKitMediaDisableReason)func videoDisabledByPeer(_ call: PlanetKitCall, reason: PlanetKitMediaDisableReason)func didDetectCamNoSrc(_ call: PlanetKitCall)func didDetectMyVideoNoSource(_ call: PlanetKitCall)func shortDataDidReceive(_ call: PlanetKitCall, dataType: String, data: Data)func didReceiveShortData(_ call: PlanetKitCall, dataType: String, data: Data)func peerDidRequestMyMute(_ call: PlanetKitCall, mute: Bool)func myMuteRequestedByPeer(_ call: PlanetKitCall, mute: Bool)func callDataSessionIncoming(_ call: PlanetKitCall, streamId: PlanetKitDataSessionStreamId, type: PlanetKitDataSessionType)func dataSessionIncoming(_ call: PlanetKitCall, streamId: PlanetKitDataSessionStreamId, type: PlanetKitDataSessionType)func callDidStartMyBroadcast(_ call: PlanetKitCall)func didStartMyBroadcast(_ call: PlanetKitCall)func callDidFinishMyBroadcast(_ call: PlanetKitCall)func didFinishMyBroadcast(_ call: PlanetKitCall)func callDidErrorMyBroadcast(_ call: PlanetKitCall, error: PlanetKitScreenShare.BroadcastError)func didErrorMyBroadcast(_ call: PlanetKitCall, error: PlanetKitScreenShare.BroadcastError) -
PlanetKitStartFailReasonenum 1-to-1 callGroup callPrevious PlanetKit 5.5 case kitInternalInitializaionError = 2999case kitInternalInitializationError = 2999 -
PlanetKitScreenShare.BroadcastErrorenum 1-to-1 callGroup callPrevious PlanetKit 5.5 case kitInternalInitializaionErrorcase kitInternalInitializationError -
PlanetKitAudioclass 1-to-1 callGroup callPrevious PlanetKit 5.5 var isBluethoothInput: Bool { get }var isBluetoothInput: Bool { get } -
PlanetKitScreenShare.BroadcastErrorenum 1-to-1 callGroup callPrevious PlanetKit 5.5 case unknowcase unknown -
PlanetKitConfenreceVideoUpdatedPeerclass →PlanetKitConferenceVideoUpdatedPeerclass Group call -
PlanetKitCallParamclass 1-to-1 callPrevious PlanetKit 5.5 var stid: String? { get set }var appServerData: String? { get set }var initData: String? { get set }var startMessage: PlanetKitCallStartMessage? { get set }init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool, supportsHolding: Bool, useResponderPreparation: Bool = false, initData: PlanetKitInitData? = nil)init(appName: String?, callerName: String, isVideo: Bool, ringtoneSound: URL?, icon: String?, addCallToList: Bool, supportsHolding: Bool, useResponderPreparation: Bool = false, startMessage: PlanetKitCallStartMessage? = nil) -
PlanetKitConferenceParamclass Group callPrevious PlanetKit 5.5 var stid: String? { get set }var appServerData: String? { get set } -
PlanetKitSendDataSessionclass →PlanetKitOutboundDataSessionclass 1-to-1 callGroup callPrevious PlanetKit 5.5 typealias Completion = (_ dataSession: PlanetKitSendDataSession?, _ success: Bool, _ description: String?)->Voidtypealias Completion = (_ dataSession: PlanetKitOutboundDataSession?, _ failReason: PlanetKitDataSessionFailReason)->Void -
PlanetKitRecvDataSessionclass →PlanetKitInboundDataSessionclass 1-to-1 callGroup callPrevious PlanetKit 5.5 typealias Completion = (_ dataSession: PlanetKitRecvDataSession?, _ success: Bool, _ description: String?)->Voidtypealias Completion = (_ dataSession: PlanetKitInboundDataSession?, _ failReason: PlanetKitDataSessionFailReason)->Void -
PlanetKitDisconnectReasonenum 1-to-1 callGroup callPrevious PlanetKit 5.5 case serviceAPIKeyError = 1501case serviceAccessTokenError = 1501 -
PlanetKitVideoBufferclass 1-to-1 callGroup callPrevious PlanetKit 5.5 init(sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, mirrored: Bool, sender: PlanetKitUserId?, source: PlanetKitVideoSource)init(sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, position: PlanetKitCameraPosition, sender: PlanetKitUserId?, source: PlanetKitVideoSource)init(pixelBuffer: CVPixelBuffer?, sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, mirrored: Bool, sender: PlanetKitUserId?, source: PlanetKitVideoSource)init(pixelBuffer: CVPixelBuffer?, sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, position: PlanetKitCameraPosition, sender: PlanetKitUserId?, source: PlanetKitVideoSource) -
PlanetKitCameraFrameRateclass →PlanetKitFrameRateclass 1-to-1 callGroup call
Added
PlanetKitPeerControlDelegateprotocol Group callPlanetKitPeerControlclass Group callPlanetKitVolumeLevelclass Group callPlanetKitScreenShareStatusclass Group callPlanetKitVideoPauseReasonenum 1-to-1 callGroup callcase unknown
PlanetKitNSErrorCodeenum Group callPlanetKitCCParamclass 1-to-1 callPlanetKitManagerclass Group callvar conference: PlanetKitConference? { get }
PlanetKitScreenCaptureWindowclass 1-to-1 callGroup callvar bundleId: String? { get }var hasMultipleWindows: Bool
PlanetKitAudioSpkControllableprotocol 1-to-1 callGroup callfunc setMode(_ mode: AVAudioSession.Mode)
PlanetKitCallKitParamclass 1-to-1 calllet supportsHolding: Bool
PlanetKitStartFailReasonenum 1-to-1 callGroup callcase tooLongAppServerData = 11
PlanetKitAudioSessionSettingsclass 1-to-1 callGroup callPlanetKitAudioclass 1-to-1 callGroup callvar defaultIOBufDuration: Float64var defaultMicSampleRate: Float64var defaultSpkSampleRate: Float64var openSettings: PlanetKitAudioSessionSettings? { get set }var closeSettings: PlanetKitAudioSessionSettings? { get set }
PlanetKitDataSessionFailReasonenum 1-to-1 callGroup callcase none = 0case internal = 1case notIncoming = 3case alreadyExist = 4case invalidId = 5case invalidType = 6
PlanetKitDataSessionControllableprotocol 1-to-1 callGroup callfunc getOutboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitOutboundDataSession?func getInboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitInboundDataSession?
PlanetKitConferencePeerclass Group calllet sharedContents: PlanetKitSharedContents?
PlanetKitSharedContentsclass 1-to-1 callGroup calllet data: Datalet elapsedSeconds: TimeInterval
PlanetKitCallConnectedParamclass 1-to-1 callPlanetKitCallKitParamclass 1-to-1 calllet useResponderPreparation: Boollet startMessage: PlanetKitCallStartMessage?let recordOnCloud: Bool
PlanetKitCallStartMessageclass 1-to-1 callPlanetKitMyAudioDescriptionclass 1-to-1 callGroup calllet destinationSubgroupName: String?let taggedSubgroupName: String?
PlanetKitDisconnectSourceenum 1-to-1 callGroup callPlanetKitDisconnectedParamenum 1-to-1 callGroup callPlanetKitDisconnectReasonenum 1-to-1 callGroup callcase internalError = 1109case userError = 1110case internalKitError = 1111case micNoSource = 1112case maxCallTimeExceeded = 1208case unavailableNetwork = 1308case appDestroy = 1309case systemSleep = 1310case systemLogOff = 1311case mtuExceeded = 1312case appServerDataError = 1313case desktopScreenLocked = 1314case serviceTooManyRequests = 1512
PlanetKitScreenInterruptDelegateprotocol 1-to-1 callGroup callfunc scrDidInterruptBoundsChange(_ device: PlanetKitScreenCaptureDevice, window: PlanetKitScreenCaptureWindow)
PlanetKitCallStateenum 1-to-1 callcase verified
PlanetKitMTKViewclass 1-to-1 callGroup callvar mirroredType: PlanetKitMirroredType { get set }var rotation: PlanetKitVideoRotation { get set }
PlanetKitVideoCaptureDeviceInfoclass 1-to-1 callGroup callvar rotation: PlanetKitVideoRotation { get set }
PlanetKitVideoBufferclass 1-to-1 callGroup callvar position: PlanetKitCameraPosition { get set }
PlanetKitRecordOnCloudDeactivateReasonenum 1-to-1 callcase internal = 0case activationFailed = 1
PlanetKitRecordOnCloudUpdatedParamclass 1-to-1 calllet activated: Boollet deactivated: PlanetKitRecordOnCloudDeactivateReason
PlanetKitCallParamclass 1-to-1 callvar recordOnCloud: Bool { get set }var initialMyVideoState: PlanetKitInitialMyVideoState { get set }
PlanetKitConferenceParamclass Group callvar initialMyVideoState: PlanetKitInitialMyVideoState { get set }
PlanetKitCallDelegateprotocol 1-to-1 callfunc recordOnCloudDidUpdate(_ call: PlanetKitCall, updated: PlanetKitRecordOnCloudUpdatedParam)func myScreenShareDidStopByHold(_ conference: PlanetKitConference)
PlanetKitCallclass 1-to-1 callvar isPeerAudioMuted: Bool { get }var isRecordOnCloudActivated: Bool { get }func setMyScreenShareVideoShareMode(enable: Bool) -> Boolvar isMyScreenShareVideoShareModeEnabled: Bool { get }var myMediaStatus: PlanetKitMyMediaStatus { get }var isHookMyAudioEnabled: Bool { get }func enableHookMyAudio(delegate: PlanetKitCallHookedAudioDelegate, completion: @escaping (Bool)->Void)func disableHookMyAudio(completion: @escaping (Bool)->Void)func putHookedMyAudioBack(audio: PlanetKitHookedAudio) -> Boolvar myVideoStream: PlanetKitVideoStream! { get }var myScreenShareStream: PlanetKitVideoStream! { get }
PlanetKitLogLevelenum 1-to-1 callGroup callcase detailed = 5case simple = 4case silent = 0
PlanetKitLogSizeLimitenum 1-to-1 callGroup callcase small = 0case medium = 1case large = 2case unlimited = 3
PlanetKitMyMediaStatusDelegateprotocol Group callPlanetKitMyMediaStatusclass Group callPlanetKitConferenceDelegateprotocol Group callfunc myScreenShareDidStopByHold(_ conference: PlanetKitConference)
PlanetKitConferenceclass Group callfunc createPeerControl(peer: PlanetKitConferencePeer) -> PlanetKitPeerControl?var myMediaStatus: PlanetKitMyMediaStatus { get }func setMyScreenShareVideoShareMode(enable: Bool) -> Boolvar isMyScreenShareVideoShareModeEnabled: Bool { get }var myVideoStream: PlanetKitVideoStream! { get }var myScreenShareStream: PlanetKitVideoStream! { get }
PlanetKitConferenceConnectedParamclass Group calllet isVideoHwCodecEnabled: Boollet isVideoShareModeSupported: Bool
PlanetKitVirtualBackgroundTypeenum 1-to-1 callGroup callPlanetKitVirtualBackgroundclass 1-to-1 callGroup callPlanetKitAudioDeviceclass 1-to-1 callGroup callvar isCapturable: Bool { get }var isPlayable: Bool { get }
PlanetKitMakeCallSettingBuilderclass 1-to-1 callfunc withEnableAudioDescriptionKey(enable: Bool) -> PlanetKitMakeCallSettingBuilderfunc withAudioDescriptionUpdateIntervalKey(interval: TimeInterval) -> PlanetKitMakeCallSettingBuilderfunc withPlayEndToneRegardlessOfCallStateKey(enable: Bool) throws -> PlanetKitMakeCallSettingBuilder
PlanetKitVerifyCallSettingBuilderclass 1-to-1 callfunc withEnableAudioDescriptionKey(enable: Bool) -> PlanetKitVerifyCallSettingBuilderfunc withAudioDescriptionUpdateIntervalKey(interval: TimeInterval) -> PlanetKitVerifyCallSettingBuilderfunc withPlayEndToneRegardlessOfCallStateKey(enable: Bool) throws -> PlanetKitVerifyCallSettingBuilder
PlanetKitJoinConferenceSettingBuilderclass Group callfunc withEnableAudioDescriptionKey(enable: Bool) -> PlanetKitJoinConferenceSettingBuilderfunc withAudioDescriptionUpdateIntervalKey(interval: TimeInterval) -> PlanetKitJoinConferenceSettingBuilderfunc withPlayEndToneRegardlessOfConferenceStateKey(enable: Bool) throws -> PlanetKitJoinConferenceSettingBuilder
PlanetKitInitialMyVideoStateenum 1-to-1 callcase resumecase pause
PlanetKitHookedAudioclass 1-to-1 callvar sampleRate: UInt32 { get }var channel: UInt32 { get }var sampleType: PlanetKitAudioSampleType { get }var sampleCount: UInt32 { get }var seq: Int64 { get }var data: Data { get set }
PlanetKitCallHookedAudioDelegateprotocol 1-to-1 callfunc didHook(_ call: PlanetKitCall, audio: PlanetKitHookedAudio)
PlanetKitVideoStreamclass 1-to-1 callGroup callinit()
PlanetKitVideoStreamDelegateprotocol 1-to-1 callGroup callPlanetKitScreenControllableprotocol 1-to-1 callGroup callweak var delegate: PlanetKitVideoOutputDelegate? { get set }
PlanetKitFpsLimitUpdateDelegateprotocol 1-to-1 callGroup call
Removed
PlanetKitConferencePeerInfoclass Group callPlanetKitConferencePeerStateclass Group callPlanetKitSubgroupclass Group callvar peerInfos: [PlanetKitConferencePeerInfo] { get }
PlanetKitLogStorageclass 1-to-1 callGroup callPlanetKitLogStorageTypeenum 1-to-1 callGroup callPlanetKitManagerclass 1-to-1 callGroup callfunc makeLogStorage(type: PlanetKitLogStorageType, maxSize: Int) throws -> PlanetKitLogStorage
PlanetKitInitialSettingBuilderclass 1-to-1 callGroup callfunc withEnableKitDebugKey(debugSetting: Dictionary<String, String>) -> PlanetKitInitialSettingBuilder
PlanetKitConferencePeerHoldclass Group calllet peerPausedRecv: Bool
PlanetKitConferenceDelegateprotocol Group callfunc subgroupPeerVideoDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, videoSubgroupName: String?, oldName: String?)func subgroupPeerVideoDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, videoTaggedSubgroupName: String?, oldName: String?)func subgroupPeerAudioDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, audioSubgroupName: String?, oldName: String?)func subgroupPeerAudioDidChange(_ conference: PlanetKitConference, peerInfo: PlanetKitConferencePeerInfo, audioTaggedSubgroupName: String?, oldName: String?)
PlanetKitSubgroupManagerclass Group callvar myVideoTaggedSubgroupName: String? { get }func tagMainRoomVideoSend(taggedSubgroupName: String?, completion: @escaping (Bool) -> Void)
PlanetKitCallclass 1-to-1 calllet micVolumeLevel: Int8let spkVolumeLevel: Int8var mic: PlanetKitAudioMicControllablevar spk: PlanetKitAudioSpkControllablelet disconnectByRemote: Boolfunc setMyViewDelegate(_ videoOutDelegate: PlanetKitVideoOutputDelegate)func resetMyViewDelegate()func setPeerViewDelegate(_ videoOutDelegate: PlanetKitVideoOutputDelegate)func resetPeerViewDelegate()let myScreenShareSendCapability: PlanetKitVideoCapabilityvar isMyVideoInterrupted: Boolfunc declineCall()var isMyVideoInterrupted: Boolvar hold: Bool { get }
PlanetKitConferenceclass Group calllet micVolumeLevel: Int8let spkVolumeLevel: Int8var mic: PlanetKitAudioMicControllablevar spk: PlanetKitAudioSpkControllablelet isHighPriorityAudio: Boolfunc setHighPriorityAudioSend(_ isHighPriority: Bool, completion: @escaping (Bool)->Void)let roomType: PlanetKitConferenceRoomTypevar myVideoStatus: PlanetKitVideoStatus { get }var isMyAudioMuted: Bool { get }let myScreenShareSendCapability: PlanetKitVideoCapabilityvar isMyVideoInterrupted: Boolfunc getActiveVideoPeer(peerId: PlanetKitUserId) -> PlanetKitConferencePeer?func getActiveScreenSharePeer(peerId: PlanetKitUserId) -> PlanetKitConferencePeer?var isMyVideoInterrupted: Boolvar hold: Bool { get }func isPeerScreenShared(peerId: PlanetKitUserId) -> Bool
PlanetKitAudioclass 1-to-1 callGroup callfunc change(mic: PlanetKitAudioMicControllable?)func change(spk: PlanetKitAudioSpkControllable?)func setAudioSessionHandler(_ handler: PlanetKitAudioSessionHandler?)func setDefaultSampleRate(mic: Float64)func setDefaultSampleRate(spk: Float64)
PlanetKitConferenceDelegateprotocol Group callpeersVideoDidPause(_ conference: PlanetKitConference, videoPauses: [PlanetKitConferencePeerVideoPause])peersVideoDidResume(_ conference: PlanetKitConference, peers: [PlanetKitConferencePeer])
PlanetKitSendDataSessionDelegateprotocol 1-to-1 callGroup callfunc sendDataSessionDidUnsupport(_ session: PlanetKitSendDataSession)
PlanetKitRecvDataSessionDelegateprotocol 1-to-1 callGroup callfunc recvDataSessionDidTooLongQueuedData(_ session: PlanetKitRecvDataSession, enabled: Bool)func recvDataSessionDidUnsupport(_ session: PlanetKitRecvDataSession)
PlanetKitDisconnectReasonenum 1-to-1 callGroup callcase micNoSrcByLocal = 1101case micNoSrcByRemote = 1102case internalErrorByLocal = 1103case internalErrorByRemote = 1104case userErrorByLocal = 1105case userErrorByRemote = 1106case internalKitErrorByLocal = 1107case internalKitErrorByRemote = 1108case unavailableNetworkInCall = 1307case wrongRoomAttribute = 1403
PlanetKitCallStateenum 1-to-1 callcase answered
PlanetKitConferenceParamclass Group callvar roomType: PlanetKitConferenceRoomType { get set }
PlanetKitConferenceRoomTypeenum Group callPlanetKitVideoCaptureDeviceclass 1-to-1 callGroup callvar preferredMirrored: NSNumber? { get set }
PlanetKitCameraclass 1-to-1 callGroup callstatic func getVideoRotation(orientation:mirrored:)
PlanetKitVideoBufferclass 1-to-1 callGroup callvar mirrored : Bool { get set }
PlanetKitLogLevelenum 1-to-1 callGroup callcase info = 5case error = 2case critical = 1case none = 0
PlanetKitAudioSessionHandlerprotocol 1-to-1 callGroup callPlanetKitAudioSessionContextclass 1-to-1 callGroup callPlanetKitVideoCapabilityclass 1-to-1 callGroup callstatic var callScreenShareSendDefault: PlanetKitVideoCapabilitystatic var conferenceScreenShareSendDefault: PlanetKitVideoCapability
PlanetKitMakeCallSettingBuilderclass 1-to-1 callfunc withMyScreenShareSendCapabilityKey(capability: PlanetKitVideoCapability) -> PlanetKitMakeCallSettingBuilder
PlanetKitVerifyCallSettingBuilderclass 1-to-1 callfunc withMyScreenShareSendCapabilityKey(capability: PlanetKitVideoCapability) -> PlanetKitVerifyCallSettingBuilder
PlanetKitJoinConferenceSettingBuilderclass Group callfunc withMyScreenShareSendCapabilityKey(capability: PlanetKitVideoCapability) -> PlanetKitJoinConferenceSettingBuilderfunc withDisconnectBadNetwork(enable: Bool) -> PlanetKitJoinConferenceSettingBuilder
PlanetKitMediaDisableReasonenum 1-to-1 callGroup callcase noMediaSrccase noRecvMedia
PlanetKitSubgroupclass Group callfunc isPeerScreenShared(peerId: PlanetKitUserId) -> Bool
PlanetKitScreenControllableprotocol 1-to-1 callGroup callfunc addReceiver(_ videoOutDelegate: PlanetKitVideoOutputDelegate)func removeReceiver(_ videoOutDelegate: PlanetKitVideoOutputDelegate)func setModifier(_ videoModifier: PlanetKitVideoModifierDelegate?)