Enumerations

The following enumerations are available globally.

  • 音声コーデックを表します。

    See more

    Declaration

    Swift

    public enum AudioCodec : Sendable
    extension AudioCodec: CustomStringConvertible
  • 音声モード。 AVAudioSession の音声モードと音声カテゴリを変更します。 詳細な設定を行いたい場合は AVAudioSession を使用して下さい。

    音声カテゴリのオプションは次の値が指定されます:

    • allowBluetooth
    • allowBluetoothA2DP
    • allowAirPlay
    See more

    Declaration

    Swift

    public enum AudioMode : Sendable
  • 音声出力先

    See more

    Declaration

    Swift

    public enum AudioOutput : Sendable

CA 証明書解析

  • 転送フィルターのルールのフィールドの設定です。

    See more

    Declaration

    Swift

    public enum ForwardingFilterRuleField : String, Encodable, Sendable
  • 転送フィルターのルールの演算子の設定です。

    See more

    Declaration

    Swift

    public enum ForwardingFilterRuleOperator : String, Encodable, Sendable
  • 転送フィルターのアクションの設定です。

    See more

    Declaration

    Swift

    public enum ForwardingFilterAction : String, Encodable, Sendable
  • MediaChannel, SignalingChannel, WebSocketChannel の接続状態を表します。

    See more

    Declaration

    Swift

    public enum ConnectionState : Sendable
  • ICE 通信ポリシーを表します。

    See more

    Declaration

    Swift

    public enum ICETransportPolicy : Sendable
  • JSON の値を表す値型です。

    接続設定の snapshot と RPC のエラー詳細が、Encodable の値や JSONSerialization が返した 値をそのまま保持しないようにするために使います。Sendable な値だけで構成されるため、 actor / Task 境界を越えて受け渡せます。

    数値の復元は変換の経路で変わります。init(from:) は Decimal を Double より先に判定する ため JSON の数値トークンの精度を保ちます。JSONSerialization を通る経路 (RPCErrorDetail.data など) は NSNumber を経由するため、小数は Double の値が Decimal として入ります (実測では 0.1 が .decimal(0.10000000000000001) になります)。 Decimal が表現できる範囲を超える指数の値 (1e300 など) だけが .double になります。

    Equatable は case 込みで比較するため、.decimal(1) と .double(1.0) は等しくありません。 encode(to:) した値を init(from:) で戻すと .double(1.0) は .decimal(1) になるため、 encode と decode は対称ではありません。NaN (.decimal(Decimal.nan) / .double(.nan)) は 自分自身とも等しくなりません。

    See more

    Declaration

    Swift

    public enum JSONValue : Sendable, Equatable
    extension JSONValue: Encodable
    extension JSONValue: Decodable
  • ログレベルです。 上から下に向かってログの重要度が下がり、詳細度が上がります。 off はログを出力しません。

    1. fatal
    2. error
    3. warn
    4. info
    5. debug
    6. trace
    7. off
    See more

    Declaration

    Swift

    public enum LogLevel : Sendable
  • SoraCloseEvent は、Sora の接続が切断された際のイベント情報を表します。

    接続が正常に切断された場合は、.ok(code, reason) ケースが使用され、 異常な切断やエラー発生時は、.error(Error) ケースが使用されます。

    See more

    Declaration

    Swift

    public enum SoraCloseEvent : Sendable
  • ストリームの音声のボリュームの定数のリストです。

    See more

    Declaration

    Swift

    public enum MediaStreamAudioVolume
  • WebRTC フレームワークの情報を表します。

    See more

    Declaration

    Swift

    public enum WebRTCInfo
  • サイマルキャストの rid をリクエストする RPC メソッド

    視聴するサイマルキャスト映像の解像度を指定する RPC メソッドです。

    See more

    Declaration

    Swift

    public enum RequestSimulcastRid : RPCMethodProtocol
    extension RequestSimulcastRid: SendableRPCMethodProtocol
  • スポットライト rid をリクエストする RPC メソッド

    スポットライト機能で注目する接続を指定する RPC メソッドです。

    See more

    Declaration

    Swift

    public enum RequestSpotlightRid : RPCMethodProtocol
    extension RequestSpotlightRid: SendableRPCMethodProtocol
  • スポットライト rid をリセットする RPC メソッド

    スポットライト機能の設定をリセットする RPC メソッドです。

    See more

    Declaration

    Swift

    public enum ResetSpotlightRid : RPCMethodProtocol
    extension ResetSpotlightRid: SendableRPCMethodProtocol
  • シグナリング通知メタデータを設定する RPC メソッド

    シグナリング通知全体にメタデータを設定する RPC メソッドです。 ジェネリック型パラメータで任意の型のメタデータを指定できます。

    使用例

    struct MyMetadata: Codable {
      let userId: String
      let sessionId: String
    }
    
    do {
      let metadata = MyMetadata(userId: "user123", sessionId: "sess456")
      let result = try await mediaChannel.rpc(
        method: PutSignalingNotifyMetadata<MyMetadata>.self,
        params: PutSignalingNotifyMetadataParams(metadata: metadata)
      )
      if let metadata = result?.result {
        print("Set metadata: \(metadata)")
      }
    } catch {
      print("Failed to set metadata: \(error)")
    }
    
    See more

    Declaration

    Swift

    public enum PutSignalingNotifyMetadata<Metadata> : RPCMethodProtocol where Metadata : Decodable, Metadata : Encodable
  • シグナリング通知メタデータのアイテムを設定する RPC メソッド

    シグナリング通知メタデータの特定キーに値を設定する RPC メソッドです。 ジェネリック型パラメータで値の型とレスポンスの型を指定できます。

    使用例

    struct NotifyResponse: Decodable {
      let key: String
      let value: String
    }
    
    do {
      let result = try await mediaChannel.rpc(
        method: PutSignalingNotifyMetadataItem<NotifyResponse, String>.self,
        params: PutSignalingNotifyMetadataItemParams(
          key: "status",
          value: "ready"
        )
      )
      if let response = result?.result {
        print("Set metadata item - key: \(response.key), value: \(response.value)")
      }
    } catch {
      print("Failed to set metadata item: \(error)")
    }
    
    See more

    Declaration

    Swift

    public enum PutSignalingNotifyMetadataItem<Metadata: Decodable, Value: Encodable>:
      RPCMethodProtocol
  • シグナリング通知メタデータを設定する Sendable な RPC メソッド

    Metadata が Sendable な場合に MediaChannel.sendableRPC から呼び出せます。 既存 PutSignalingNotifyMetadata との使い分けは上のコメントを参照してください。

    使用例

    struct MyMetadata: Codable, Sendable {
      let userId: String
      let sessionId: String
    }
    
    do {
      let response = try await mediaChannel.sendableRPC(
        method: SendablePutSignalingNotifyMetadata<MyMetadata>.self,
        params: PutSignalingNotifyMetadataParams(metadata: metadata)
      )
      if let result = response?.result {
        print("Set metadata: \(result)")
      }
    } catch {
      print("Failed to set metadata: \(error)")
    }
    
    See more

    Declaration

    Swift

    public enum SendablePutSignalingNotifyMetadata<Metadata: Codable & Sendable>:
      SendableRPCMethodProtocol
  • シグナリング通知メタデータのアイテムを設定する Sendable な RPC メソッド

    Metadata / Value が Sendable な場合に MediaChannel.sendableRPC から呼び出せます。 既存 PutSignalingNotifyMetadataItem との使い分けは上のコメントを参照してください。

    使用例

    struct NotifyResponse: Decodable, Sendable {
      let key: String
      let value: String
    }
    
    do {
      let response = try await mediaChannel.sendableRPC(
        method: SendablePutSignalingNotifyMetadataItem<NotifyResponse, String>.self,
        params: PutSignalingNotifyMetadataItemParams(key: "status", value: "ready")
      )
      if let result = response?.result {
        print("Set metadata item - key: \(result.key), value: \(result.value)")
      }
    } catch {
      print("Failed to set metadata item: \(error)")
    }
    
    See more

    Declaration

    Swift

    public enum SendablePutSignalingNotifyMetadataItem<
      Metadata: Decodable & Sendable, Value: Encodable & Sendable
    >: SendableRPCMethodProtocol
  • 接続するクライアントのロールを表します。

    See more

    Declaration

    Swift

    public enum Role : Sendable
    extension Role: CustomStringConvertible
  • シグナリングの種別です。

    See more

    Declaration

    Swift

    public enum Signaling
  • サイマルキャストでの映像の種類を表します。

    See more

    Declaration

    Swift

    public enum SimulcastRid : Sendable
  • サイマルキャストで視聴する映像の種類を表します。

    See more

    Declaration

    Swift

    public enum SimulcastRequestRid : Sendable
  • スポットライトの映像の種類を表します 。

    See more

    Declaration

    Swift

    public enum SpotlightRid : Sendable
  • ストリームの方向を表します。 シグナリングメッセージで使われます。

    See more

    Declaration

    Swift

    public enum SignalingRole : String, Sendable
  • libwebrtc の内部で利用されているキューを表します。

    See more

    Declaration

    Swift

    public enum SoraDispatcher
  • SDK に関するエラーを表します。

    See more

    Declaration

    Swift

    public enum SoraError : Error
  • TLS のセキュリティポリシーを表します。

    See more

    Declaration

    Swift

    @available(*, deprecated, message: "2027 年中に廃止予定です。Configuration.insecure を使用してください")
    public enum TLSSecurityPolicy : Sendable
  • Rid

    サイマルキャストの rid を表す汎用型

    See more

    Declaration

    Swift

    public enum Rid : Equatable, Sendable
  • 映像コーデックを表します。

    See more

    Declaration

    Swift

    public enum VideoCodec : Sendable
    extension VideoCodec: CustomStringConvertible
  • 映像フレームの種別です。 現在の実装では次の映像フレームに対応しています。

    • ネイティブの映像フレーム (RTCVideoFrame)
    • CMSampleBuffer (映像のみ、音声は非対応。 RTCVideoFrame に変換されます)
    See more

    Declaration

    Swift

    public enum VideoFrame
  • VideoView における、映像ソースの停止時の処理を表します。

    See more

    Declaration

    Swift

    public enum VideoViewConnectionMode : Sendable
  • SDP でのマルチストリームの記述方式です。

    See more

    Declaration

    Swift

    public enum SDPSemantics : Sendable
  • (リソースの逼迫により) 送信する映像の品質が維持できない場合の挙動です。

    See more

    Declaration

    Swift

    public enum DegradationPreference : Sendable
  • WebSocket のステータスコードを表します。

    See more

    Declaration

    Swift

    public enum WebSocketStatusCode : Sendable
  • WebSocket の通信で送受信されるメッセージを表します。

    See more

    Declaration

    Swift

    public enum WebSocketMessage : Sendable