@@ -401,6 +401,9 @@ public struct SignalingOffer {
401401 }
402402 }
403403
404+ /// チャネルID
405+ public let channelId : String ?
406+
404407 /// クライアント ID
405408 public let clientId : String
406409
@@ -410,9 +413,15 @@ public struct SignalingOffer {
410413 /// 接続 ID
411414 public let connectionId : String
412415
416+ /// セッションID
417+ public let sessionId : String ?
418+
413419 /// SDP メッセージ
414420 public let sdp : String
415421
422+ /// version
423+ public let version : String ?
424+
416425 /// クライアントが更新すべき設定
417426 public let configuration : Configuration ?
418427
@@ -428,8 +437,35 @@ public struct SignalingOffer {
428437 /// mid
429438 public let mid : [ String : String ] ?
430439
440+ /// マルチストリーム
441+ public let multistream : Bool ?
442+
431443 /// サイマルキャスト有効 / 無効フラグ
432444 public let simulcast : Bool ?
445+
446+ /// サイマルキャストマルチコーデック
447+ public let simulcastMulticodec : Bool ?
448+
449+ /// スポットライト
450+ public let spotlight : Bool ?
451+
452+ /// audio
453+ public let audio : Bool ?
454+
455+ /// audio codec type
456+ public let audioCodecType : String ?
457+
458+ /// audio bit rate
459+ public let audioBitRate : Int ?
460+
461+ /// video
462+ public let video : Bool ?
463+
464+ /// video codec type
465+ public let videoCodecType : String ?
466+
467+ /// video bit rate
468+ public let videoBitRate : Int ?
433469}
434470
435471/**
@@ -962,22 +998,47 @@ extension SignalingOffer: Codable {
962998 case encodings
963999 case mid
9641000 case simulcast
1001+ case version
1002+ case multistream
1003+ case simulcast_multicodec
1004+ case spotlight
1005+ case channel_id
1006+ case session_id
1007+ case audio
1008+ case audio_codec_type
1009+ case audio_bit_rate
1010+ case video
1011+ case video_codec_type
1012+ case video_bit_rate
9651013 }
9661014
9671015 public init ( from decoder: Decoder ) throws {
1016+ // metadata, dataChannels は updateMetadata() で処理されるので、ここでは処理しない
9681017 let container = try decoder. container ( keyedBy: CodingKeys . self)
1018+ channelId = try container. decodeIfPresent ( String . self, forKey: . channel_id)
9691019 clientId = try container. decode ( String . self, forKey: . client_id)
9701020 bundleId = try container. decodeIfPresent ( String . self, forKey: . bundle_id)
9711021 connectionId = try container. decode ( String . self, forKey: . connection_id)
1022+ sessionId = try container. decodeIfPresent ( String . self, forKey: . session_id)
9721023 sdp = try container. decode ( String . self, forKey: . sdp)
1024+ version = try container. decodeIfPresent ( String . self, forKey: . version)
9731025 configuration =
9741026 try container. decodeIfPresent ( Configuration . self,
9751027 forKey: . config)
9761028 encodings =
9771029 try container. decodeIfPresent ( [ Encoding ] . self,
9781030 forKey: . encodings)
9791031 mid = try container. decodeIfPresent ( [ String : String ] . self, forKey: . mid)
1032+ multistream = try container. decodeIfPresent ( Bool . self, forKey: . multistream)
9801033 simulcast = try container. decodeIfPresent ( Bool . self, forKey: . simulcast)
1034+ simulcastMulticodec = try container. decodeIfPresent ( Bool . self, forKey: . simulcast_multicodec)
1035+ spotlight = try container. decodeIfPresent ( Bool . self, forKey: . spotlight)
1036+ audio = try container. decodeIfPresent ( Bool . self, forKey: . audio)
1037+ audioCodecType = try container. decodeIfPresent ( String . self, forKey: . audio_codec_type)
1038+ audioBitRate = try container. decodeIfPresent ( Int . self, forKey: . audio_bit_rate)
1039+ video = try container. decodeIfPresent ( Bool . self, forKey: . video)
1040+ videoCodecType = try container. decodeIfPresent ( String . self, forKey: . video_codec_type)
1041+ videoBitRate = try container. decodeIfPresent ( Int . self, forKey: . video_bit_rate)
9811042 }
9821043
9831044 public func encode( to encoder: Encoder ) throws {
0 commit comments