SoraEventKind
public struct SoraEventKind : RawRepresentable, Hashable, Sendable
購読 API が配送するイベントの種別です。
enum ではなく RawRepresentable な struct にしています。SDK が将来イベント種別を追加した
ときに、利用者が書いた網羅 switch が compile error にならないようにするためです (enum に
case を追加すると、網羅 switch を書いている利用者の既存コードが build できなくなります)。
種別の判定は event.kind == .disconnected か、default を伴う switch で行います。
-
種別の識別子です。
Declaration
Swift
public let rawValue: String -
識別子から種別を生成します。
Declaration
Swift
public init(rawValue: String)Parameters
rawValue種別の識別子
-
接続が確立した
Declaration
Swift
public static let connected: SoraEventKind -
接続が失敗した
Declaration
Swift
public static let connectFailed: SoraEventKind -
接続が切断された
Declaration
Swift
public static let disconnected: SoraEventKind
-
ストリームが追加された
Declaration
Swift
public static let streamAdded: SoraEventKind -
ストリームが除去された
Declaration
Swift
public static let streamRemoved: SoraEventKind -
映像の有効フラグが変更された
Declaration
Swift
public static let videoEnabledChanged: SoraEventKind -
音声の有効フラグが変更された
Declaration
Swift
public static let audioEnabledChanged: SoraEventKind
-
シグナリングの JSON 文字列を受信した
Declaration
Swift
public static let signalingReceivedJSON: SoraEventKind -
DataChannel が開いた
Declaration
Swift
public static let dataChannelOpened: SoraEventKind -
メッセージング用 DataChannel がすべて開いた
Declaration
Swift
public static let dataChannelAvailable: SoraEventKind -
DataChannel のメッセージを受信した
Declaration
Swift
public static let dataChannelMessage: SoraEventKind
View on GitHub
Install in Dash