PlanetKitPeerControl
public class PlanetKitPeerControl : NSObject
A class that represents the control for a peer in the PlanetKit conference.
Remark
This class is designed to enable real-time event reception for a specificPlanetKitConferencePeer
, as well as to control video, screen share, and other functionalities.
-
The peer associated with this control.
Declaration
Swift
@objc public let peer: PlanetKitConferencePeer
-
Starts the target peer’s screen share.
Declaration
Swift
@objc public func startScreenShare(delegate: PlanetKitVideoOutputDelegate, subgroupName: String? = nil, completion: @escaping (Bool) -> Void)
Parameters
delegate
The delegate object that will receive video output.
subgroupName
The name of the subgroup to which the screen share belongs. Default is
nil
.completion
A closure that will be called when the screen share starts. The closure takes a boolean parameter indicating whether the screen share started successfully.
-
Stops the target peer’s screen share.
Remark
It will fail if the peer’s screen share has already been stopped.Declaration
Swift
@objc public func stopScreenShare(completion: @escaping (Bool) -> Void)
-
Starts the target peer’s video.
Remark
Use the function with the resolution handler if the resulting resolution must be known. Please refer to the document and use this API appropriately. https://docs.lineplanet.me/iosmacos/extended-functions/peer-video-resolution-in-group-callDeclaration
Swift
@objc public func startVideo(maxResolution: PlanetKitVideoResolution, delegate: PlanetKitVideoOutputDelegate, subgroupName: String? = nil, completion: @escaping (Bool) -> Void)
-
Starts the target peer’s video.
Remark
Please refer to the document and use this API appropriately. https://docs.lineplanet.me/iosmacos/extended-functions/peer-video-resolution-in-group-callDeclaration
Swift
@objc public func startVideo(maxResolution: PlanetKitVideoResolution, delegate: PlanetKitVideoOutputDelegate, subgroupName: String? = nil, resolution: @escaping (_ success: Bool, _ req: PlanetKitVideoResolution, _ recv: PlanetKitVideoResolution, _ failReason: String) -> Void)
-
Stops the target peer’s video.
Remark
It will fail if the peer’s video has already been stopped.Declaration
Swift
@objc public func stopVideo(completion: @escaping (Bool) -> Void)
-
Registers a delegate to start receiving peer control events.
Remark
This must be paired withPlanetKitPeerControl.unregister(completion:)
.Declaration
Swift
@objc public func register(_ delegate: PlanetKitPeerControlDelegate, completion: @escaping (Bool) -> Void)
-
Unregisters the delegate to stop receiving peer control events.
Remark
This must be paired withPlanetKitPeerControl.register(_:completion:)
.Declaration
Swift
@objc public func unregister(completion: @escaping (Bool) -> Void)