Structures
The following structures are available globally.
-
See moreCameraVideoCapturerの設定を表すオブジェクトです。Declaration
Swift
public struct CameraSettings : CustomStringConvertible, Sendable
-
転送フィルターのルールの設定です。
See moreDeclaration
Swift
public struct ForwardingFilterRule : Encodable, Sendable -
転送フィルターに関する設定です。
See moreDeclaration
Swift
public struct ForwardingFilterextension ForwardingFilter: Encodable -
RPC エラー応答の詳細。
See moreDeclaration
Swift
public struct RPCErrorDetail : Sendable -
RPC 成功応答。
See moreDeclaration
Swift
public struct RPCResponse<Result> -
RPCResponseと同じ挙動を持つ、Swift 6 言語モードの検査に対応した RPC 成功応答。jsonrpc/id/resultの意味、notification でnilが返ること、失敗時にSoraErrorが投げられることはRPCResponseと共通です。ResultがSendableな型で あれば、応答全体を actor 境界やTaskの@Sendableclosure を越えて受け渡せます (MediaChannel.sendableRPC(method:params:isNotificationRequest:timeout:)が返す型です)。ResultへDecodableを要求しないのは、decode がSendableRPCMethodProtocol.Resultの 制約 (RPCMethodProtocolのResult: Decodable) で成立し、この型自身は値の保持だけを 担うためです。ResultがSendableでない場合はSendableへ準拠できません。既存の
See moreRPCResponseの宣言と準拠は互換 API として変更していません。Declaration
Swift
public struct SendableRPCResponse<Result> : Sendable where Result : Sendable -
RequestSimulcastRid のパラメータ。
See moreDeclaration
Swift
public struct RequestSimulcastRidParams : Codable, Sendable -
RequestSpotlightRid のパラメータ。
See moreDeclaration
Swift
public struct RequestSpotlightRidParams : Codable, Sendable -
ResetSpotlightRid のパラメータ。
See moreDeclaration
Swift
public struct ResetSpotlightRidParams : Encodable, Sendable -
PutSignalingNotifyMetadata のパラメータ。
See moreMetadataがSendableの場合はSendableへも準拠します。actor / Task 境界へ渡す場合は メソッド型にSendablePutSignalingNotifyMetadataを使ってください (既存のPutSignalingNotifyMetadataはMetadataにSendableを要求しないため、SendableRPCMethodProtocolの要件を満たすメソッド型にMetadataを固定できません)。Declaration
Swift
public struct PutSignalingNotifyMetadataParams<Metadata> : Encodable where Metadata : Encodableextension PutSignalingNotifyMetadataParams: Sendable where Metadata: Sendable -
PutSignalingNotifyMetadataItem のパラメータ。
See moreValueがSendableの場合はSendableへも準拠します。actor / Task 境界へ渡す場合は メソッド型にSendablePutSignalingNotifyMetadataItemを使ってください (既存のPutSignalingNotifyMetadataItemはValueにSendableを要求しないため、SendableRPCMethodProtocolの要件を満たすメソッド型にValueを固定できません)。Declaration
Swift
public struct PutSignalingNotifyMetadataItemParams<Value> : Encodable where Value : Encodableextension PutSignalingNotifyMetadataItemParams: Sendable where Value: Sendable -
RequestSimulcastRid の正常終了時の result。
See moreDeclaration
Swift
public struct RequestSimulcastRidResult : Decodable, Sendable -
RequestSpotlightRid の正常終了時の result。
See moreDeclaration
Swift
public struct RequestSpotlightRidResult : Decodable, Sendable -
ResetSpotlightRid の正常終了時の result。
See moreDeclaration
Swift
public struct ResetSpotlightRidResult : Decodable, Sendable -
画面キャプチャの設定です。
See moreDeclaration
Swift
public struct ScreenCaptureSettings -
シグナリングに含まれる、同チャネルに接続中のクライアントに関するメタデータ (任意のデータ) を表します。
See moreDeclaration
Swift
public struct SignalingNotifyMetadata -
“connect” シグナリングメッセージを表します。 このメッセージはシグナリング接続の確立後、最初に送信されます。
See moreDeclaration
Swift
public struct SignalingConnect -
“offer” シグナリングメッセージを表します。 このメッセージは SDK が “connect” を送信した後に、サーバーから送信されます。
See moreDeclaration
Swift
public struct SignalingOffer -
“answer” シグナリングメッセージを表します。
See moreDeclaration
Swift
public struct SignalingAnswer : Sendable -
“candidate” シグナリングメッセージを表します。
See moreDeclaration
Swift
public struct SignalingCandidate -
“update” シグナリングメッセージを表します。 Sora 2022.1.0 で廃止されたため、現在は利用していません。
See moreDeclaration
Swift
public struct SignalingUpdate : Sendable -
“re-offer” メッセージ
See moreDeclaration
Swift
public struct SignalingReOffer : Sendable -
“re-answer” メッセージ
See moreDeclaration
Swift
public struct SignalingReAnswer : Sendable -
“push” シグナリングメッセージを表します。 このメッセージは Sora のプッシュ API を使用して送信されたデータです。
See moreDeclaration
Swift
public struct SignalingPush -
“switched” シグナリングメッセージを表します。
See moreDeclaration
Swift
public struct SignalingSwitched : Sendableextension SignalingSwitched: Decodable -
“redirect” シグナリングメッセージを表します。
See moreDeclaration
Swift
public struct SignalingRedirect : Sendable -
type: “close” シグナリングメッセージを表す Sora から受信するメッセージなのでエンコーダーは実装していない
See moreDeclaration
Swift
public struct SignalingClose : Sendable -
“notify” シグナリングメッセージを表します。
See moreDeclaration
Swift
public struct SignalingNotify -
“ping” シグナリングメッセージを表します。 このメッセージはサーバーから送信されます。 “ping” 受信後は一定時間内に “pong” を返さなければ、 サーバーとの接続が解除されます。
Declaration
Swift
public struct SignalingPing : Sendable -
“pong” シグナリングメッセージを表します。 このメッセージはサーバーから “ping” シグナリングメッセージを受信すると サーバーに送信されます。 “ping” 受信後、一定時間内にこのメッセージを返さなければ、 サーバーとの接続が解除されます。
Declaration
Swift
public struct SignalingPong : Sendable -
“disconnect” シグナリングメッセージを表します。
See moreDeclaration
Swift
public struct SignalingDisconnect : Sendable -
購読 API が配送するイベントの種別です。
See moreenumではなくRawRepresentableな struct にしています。SDK が将来イベント種別を追加した ときに、利用者が書いた網羅switchが compile error にならないようにするためです (enumに case を追加すると、網羅switchを書いている利用者の既存コードが build できなくなります)。 種別の判定はevent.kind == .disconnectedか、defaultを伴うswitchで行います。Declaration
Swift
public struct SoraEventKind : RawRepresentable, Hashable, Sendable -
Errorを actor / Task 境界へ渡せるようにした snapshot です。Errorの実体はSendableであることを保証できないため、購読 API はエラーをこの値へ写して 配送します。元のErrorは保持しません。
See moredomainとcodeはErrorからNSErrorへのブリッジで得ます。domainはエラー型名、codeはenumの case の宣言順に依存するため、バージョン間で安定した識別子にはなりません。messageはlocalizedDescriptionのため locale に依存します。Declaration
Swift
public struct SoraEventError : Sendable, Equatable -
Declaration
Swift
public struct SoraAudioPortSnapshot : Sendable, Equatable -
Declaration
Swift
public struct SoraAudioRouteSnapshot : Sendable, Equatable -
音声入出力ルートの変更イベントの payload です。
See moreDeclaration
Swift
public struct SoraAudioRouteEvent : Sendable, Equatable -
購読 API が配送するイベントです。
種別 (
kind) ごとに、該当する property だけが設定されます。connected/connectFailed/disconnectedはSoraの購読とMediaChannelの購読の両方で配送されるため、 配送元によって payload が異なります。種別 配送元 設定される payload .connectedSora/MediaChannelconnectionId、transportEpoch.connectFailedSora(設定エラー)error.connectFailedSora/MediaChannelconnectionId、transportEpoch、error.disconnectedSoraconnectionId、transportEpoch、error(エラーを伴う切断のみ).disconnectedMediaChannelconnectionId、transportEpoch、closeEvent.mediaChannelAddedSoratransportEpoch(connectionIdは接続前のため常にnil).mediaChannelRemovedSoraconnectionId、transportEpoch.audioRouteChangedSoraaudioRoute.streamAdded/.streamRemovedMediaChannelconnectionId、transportEpoch、streamId.videoEnabledChanged/.audioEnabledChangedMediaChannelconnectionId、transportEpoch、streamId、isEnabled.signalingReceivedJSONMediaChannelconnectionId(offer の処理前はnil)、transportEpoch、signalingJSON.dataChannelOpenedMediaChannelconnectionId、transportEpoch、dataChannelLabel.dataChannelAvailableMediaChannelconnectionId、transportEpoch.dataChannelMessageMediaChannelconnectionId、transportEpoch、dataChannelLabel、dataChannelMessage接続 ID は offer を処理した時点で確定するため、offer の処理前に終端した接続のイベント (
.connectFailed/.disconnected/.mediaChannelRemoved) はconnectionIdがnilに なります。.transportEpochは接続に紐づかないイベント (.audioRouteChangedと、設定エラーの.connectFailed) でnilになります。payload には mutable な
See moreMediaChannel/MediaStream/ raw WebRTC object を含めません。 すべて値として確定するため、配送後も購読者が保持できます (元の object の寿命に依存しません)。Declaration
Swift
public struct SoraEvent : Sendable
-
WebRTC の統計情報を actor / Task 境界へ渡せるようにした、immutable で deep Sendable な snapshot です。
See moreStatisticsと property の名前と構成を揃えていますが、値はJSONValueで保持するため Objective-C の object graph (NSObject/NSDictionary/NSArray/Any) を含みません。Statistics.jsonObjectに相当する property は持ちません (valuesのJSONValueがEncodableの ため、必要に応じて利用者が直列化します)。Statisticsの instance を写したものではなく、RTCPeerConnection.statisticsの完了 block でRTCStatisticsReportから直接変換します (Statisticsを経由しません)。MediaChannel.getStatsSnapshot(handler:)が handler へ渡し、MediaChannel.getStatsSnapshot()が 返します。値を組み立てる public な init は持ちません (SDK が生成した値を読むための型です)。Declaration
Swift
public struct StatisticsSnapshot : Sendable -
単一の WebRTC 統計エントリーを actor / Task 境界へ渡せるようにした、immutable で deep Sendable な snapshot です。
See moreStatisticsEntryと property の名前を揃え、valuesだけを[String: JSONValue]に変えています。Declaration
Swift
public struct StatisticsEntrySnapshot : Sendable -
メディア制約を表します。
See moreDeclaration
Swift
public struct MediaConstraints : Sendable -
WebRTC に関する設定です。
See moreDeclaration
Swift
public struct WebRTCConfiguration
View on GitHub
Install in Dash
Structures Reference