PlanetKitSubgroup
public class PlanetKitSubgroup : NSObject
extension PlanetKitSubgroup: PlanetKitDataSessionControllable
A class representing a subgroup in the conference.
-
The subgroup name.
Remark
If it’s the subgroup of the main room,subgroupName
returnsnil
.Declaration
Swift
@objc public internal(set) var subgroupName: String? { get }
-
A Boolean value indicating whether the user is subscribed to this subgroup.
Declaration
Swift
@objc public internal(set) var isSubscribed: Bool { get }
-
List of all peers subscribed to this group, except the local user. Some peer information may have an invalid state, especially on the public subgroup.
Declaration
Swift
@objc public var peers: [PlanetKitConferencePeer] { get }
-
Gets the subgroup state if this subgroup is subscribed.
Remark
The public subgroup will returnstate
asnil
, if the local user is not subscribed to the subgroup.Declaration
Swift
@objc public internal(set) var state: PlanetKitSubgroupState? { get }
-
Gets the subgroup attribute if this subgroup is subscribed.
Remark
The public subgroup will returnstate
asnil
, if the local user is not subscribed to the subgroup.Declaration
Swift
@objc public internal(set) var attribute: PlanetKitSubgroupAttribute? { get }
-
Checks if the specified peer is subscribed.
Declaration
Swift
@objc public func isSubscribed(peerId: PlanetKitUserId) -> Bool
Parameters
peerId
The ID of the peer user to check.
Return Value
true
if the peer is subscribed,false
otherwise. -
Retrieves the peer with the specified ID.
Declaration
Swift
@objc public func getPeer(peerId: PlanetKitUserId) -> PlanetKitConferencePeer?
Parameters
peerId
The ID of the peer to retrieve.
Return Value
The
PlanetKitConferencePeer
object representing the peer, ornil
if the peer is not found.
-
Checks whether the subgroup supports data sessions.
Declaration
Swift
@objc public var isSupportedDataSession: Bool { get }
-
Makes a new outbound data session for the subgroup.
Declaration
Swift
public func makeOutboundDataSession(streamId: PlanetKitDataSessionStreamId, type: PlanetKitDataSessionType, delegate: PlanetKitOutboundDataSessionDelegate, completion: @escaping PlanetKitOutboundDataSession.Completion)
Parameters
streamId
The predefined ID for the app. The ID must be in the range [100, 999].
type
The type of the outbound data session.
delegate
The event callback for the outbound data session.
completion
If successful, the completion handler returns an outbound data session. Otherwise, the completion handler returns
nil
. -
Makes a new inbound data session for the subgroup.
Declaration
Swift
public func makeInboundDataSession(streamId: PlanetKitDataSessionStreamId, delegate: PlanetKitInboundDataSessionDelegate, completion: @escaping PlanetKitInboundDataSession.Completion)
Parameters
streamId
The predefined ID for the app. The ID must be in the range [100, 999].
delegate
The event callback for the inbound data session.
completion
If successful, the completion handler returns an inbound data session. Otherwise, the completion handler returns
nil
. -
Ignores receiving data for the given stream ID.
Remark
In a conference, whenPlanetKitConferenceDelegate.dataSessionIncoming(_:streamId:subgroup:type:)
occurs, the user must either callmakeInboundDataSession(streamId:delegate:completion:)
to receive the incoming data or call this function to ignore receiving the incoming data. To ignore receiving data for the incoming stream ID, callunsupportInboundDataSession(streamId:)
inPlanetKitConferenceDelegate.dataSessionIncoming(_:streamId:subgroup:type:)
.Declaration
Swift
public func unsupportInboundDataSession(streamId: PlanetKitDataSessionStreamId)
-
Gets the existing outbound data session with the stream ID.
Declaration
Swift
public func getOutboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitOutboundDataSession?
-
Gets the existing inbound data session with the stream ID.
Declaration
Swift
public func getInboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitInboundDataSession?