-
Notifications
You must be signed in to change notification settings - Fork 10
シグナリング offer メッセージの定義を更新する #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,8 @@ private func serializeData(_ data: Any?) -> [SignalingNotifyMetadata]? { | |
|
|
||
| let result = array.map { (dict: [String: Any]) -> SignalingNotifyMetadata in | ||
| var signalingNotifyMetadata = SignalingNotifyMetadata() | ||
| if let clinetId = dict["client_id"] as? String { | ||
| signalingNotifyMetadata.clientId = clinetId | ||
| if let clientId = dict["client_id"] as? String { | ||
| signalingNotifyMetadata.clientId = clientId | ||
| } | ||
| if let bundleId = dict["bundle_id"] as? String { | ||
| signalingNotifyMetadata.bundleId = bundleId | ||
|
|
@@ -25,8 +25,8 @@ private func serializeData(_ data: Any?) -> [SignalingNotifyMetadata]? { | |
| signalingNotifyMetadata.authnMetadata = authnMetadata | ||
| } | ||
|
|
||
| if let authzMetada = dict["authz_metadata"] { | ||
| signalingNotifyMetadata.authzMetadata = authzMetada | ||
| if let authzMetadata = dict["authz_metadata"] { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo 修正 |
||
| signalingNotifyMetadata.authzMetadata = authzMetadata | ||
| } | ||
|
|
||
| if let metadata = dict["metadata"] { | ||
|
|
@@ -406,6 +406,9 @@ public struct SignalingOffer { | |
| } | ||
| } | ||
|
|
||
| /// チャネルID | ||
| public let channelId: String? | ||
|
|
||
| /// クライアント ID | ||
| public let clientId: String | ||
|
|
||
|
|
@@ -415,9 +418,15 @@ public struct SignalingOffer { | |
| /// 接続 ID | ||
| public let connectionId: String | ||
|
|
||
| /// セッションID | ||
| public let sessionId: String? | ||
|
|
||
| /// SDP メッセージ | ||
| public let sdp: String | ||
|
|
||
| /// version | ||
| public let version: String? | ||
|
|
||
| /// クライアントが更新すべき設定 | ||
| public let configuration: Configuration? | ||
|
|
||
|
|
@@ -435,6 +444,30 @@ public struct SignalingOffer { | |
|
|
||
| /// サイマルキャスト有効 / 無効フラグ | ||
| public let simulcast: Bool? | ||
|
|
||
| /// サイマルキャストマルチコーデック | ||
| public let simulcastMulticodec: Bool? | ||
|
|
||
| /// スポットライト | ||
| public let spotlight: Bool? | ||
|
|
||
| /// audio | ||
| public let audio: Bool? | ||
|
|
||
| /// audio codec type | ||
| public let audioCodecType: String? | ||
|
|
||
| /// audio bit rate | ||
| public let audioBitRate: Int? | ||
|
|
||
| /// video | ||
| public let video: Bool? | ||
|
|
||
| /// video codec type | ||
| public let videoCodecType: String? | ||
|
|
||
| /// video bit rate | ||
| public let videoBitRate: Int? | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -969,14 +1002,29 @@ extension SignalingOffer: Codable { | |
| case encodings | ||
| case mid | ||
| case simulcast | ||
| case version | ||
| case simulcast_multicodec | ||
| case spotlight | ||
| case channel_id | ||
| case session_id | ||
| case audio | ||
| case audio_codec_type | ||
| case audio_bit_rate | ||
| case video | ||
| case video_codec_type | ||
| case video_bit_rate | ||
| } | ||
|
|
||
| public init(from decoder: Decoder) throws { | ||
| // metadata, dataChannels は updateMetadata() で処理されるので、ここでは処理しない | ||
| let container = try decoder.container(keyedBy: CodingKeys.self) | ||
| channelId = try container.decodeIfPresent(String.self, forKey: .channel_id) | ||
| clientId = try container.decode(String.self, forKey: .client_id) | ||
| bundleId = try container.decodeIfPresent(String.self, forKey: .bundle_id) | ||
| connectionId = try container.decode(String.self, forKey: .connection_id) | ||
| sessionId = try container.decodeIfPresent(String.self, forKey: .session_id) | ||
| sdp = try container.decode(String.self, forKey: .sdp) | ||
| version = try container.decodeIfPresent(String.self, forKey: .version) | ||
| configuration = | ||
| try container.decodeIfPresent(Configuration.self, | ||
| forKey: .config) | ||
|
|
@@ -985,6 +1033,14 @@ extension SignalingOffer: Codable { | |
| forKey: .encodings) | ||
| mid = try container.decodeIfPresent([String: String].self, forKey: .mid) | ||
| simulcast = try container.decodeIfPresent(Bool.self, forKey: .simulcast) | ||
| simulcastMulticodec = try container.decodeIfPresent(Bool.self, forKey: .simulcast_multicodec) | ||
| spotlight = try container.decodeIfPresent(Bool.self, forKey: .spotlight) | ||
| audio = try container.decodeIfPresent(Bool.self, forKey: .audio) | ||
| audioCodecType = try container.decodeIfPresent(String.self, forKey: .audio_codec_type) | ||
| audioBitRate = try container.decodeIfPresent(Int.self, forKey: .audio_bit_rate) | ||
| video = try container.decodeIfPresent(Bool.self, forKey: .video) | ||
| videoCodecType = try container.decodeIfPresent(String.self, forKey: .video_codec_type) | ||
| videoBitRate = try container.decodeIfPresent(Int.self, forKey: .video_bit_rate) | ||
| } | ||
|
|
||
| public func encode(to encoder: Encoder) throws { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo 修正