Skip to content

Commit f91c5bb

Browse files
committed
rpcSimulcastRids を削除する
1 parent 5f59dee commit f91c5bb

File tree

7 files changed

+3
-98
lines changed

7 files changed

+3
-98
lines changed

CHANGES.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,8 @@
5252
- RPC メソッドを表す列挙型 `RPCMethod` を追加する
5353
- `SignalingOffer` に以下の項目を追加する
5454
- `rpcMethods: [String]?`
55-
- `simulcastRpcRids: [Rid]?` を追加する
5655
- `MediaChannel``rpc` メソッドを追加する
57-
- `MediaChannel` に以下の項目を追加する
58-
- `rpcMethods: [RPCMethod]`
59-
- `rpcSimulcastRids: [Rid]`
56+
- `MediaChannel``rpcMethods: [RPCMethod]` を追加する
6057
- RPC メソッドを定義するための `RPCMethodProtocol` プロトコルを追加する
6158
- `RPCMethodProtocol` に準拠した型を追加する
6259
- `RequestSimulcastRid`

Sora/MediaChannel.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,6 @@ public final class MediaChannel {
175175
peerChannel.rpcChannel?.allowedMethods.compactMap { RPCMethod(name: $0) } ?? []
176176
}
177177

178-
/// RPC で利用可能なサイマルキャスト rid の一覧
179-
///
180-
/// Sora サーバーから通知された、RPC で操作可能なサイマルキャスト rid が取得できます。
181-
///
182-
/// - Returns: 利用可能なサイマルキャスト rid の一覧。RPC が初期化されていない場合は空配列を返します
183-
public var rpcSimulcastRids: [Rid] {
184-
peerChannel.rpcChannel?.simulcastRpcRids ?? []
185-
}
186-
187178
// MARK: 接続チャネル
188179

189180
/// シグナリングチャネル

Sora/PeerChannel.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
126126
var switchedToDataChannel: Bool = false
127127
var signalingOfferMessageDataChannels: [[String: Any]] = []
128128
var rpcAllowedMethods: [String] = []
129-
var rpcSimulcastRids: [Rid] = []
130129
var rpcChannel: RPCChannel?
131130

132131
weak var mediaChannel: MediaChannel?
@@ -955,12 +954,6 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
955954
rpcAllowedMethods = []
956955
}
957956

958-
if let simulcastRpcRids = offer.simulcastRpcRids {
959-
rpcSimulcastRids = simulcastRpcRids
960-
} else {
961-
rpcSimulcastRids = []
962-
}
963-
964957
// offer.simulcast が設定されている場合、WrapperVideoEncoderFactory.shared.simulcastEnabled を上書きする
965958
if let simulcast = offer.simulcast {
966959
WrapperVideoEncoderFactory.shared.simulcastEnabled = simulcast
@@ -1405,8 +1398,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
14051398
if label == "rpc" {
14061399
rpcChannel = RPCChannel(
14071400
dataChannel: dc,
1408-
rpcMethods: rpcAllowedMethods,
1409-
simulcastRpcRids: rpcSimulcastRids)
1401+
rpcMethods: rpcAllowedMethods)
14101402
}
14111403
}
14121404
}

Sora/RPC.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,15 @@ public final class RPCChannel {
7171
let allowedMethods: [String]
7272
private let allowedMethodNames: Set<String>
7373

74-
/// Sora から払い出されたサイマルキャスト rid の一覧
75-
let simulcastRpcRids: [Rid]
76-
7774
init?(
78-
dataChannel: DataChannel, rpcMethods: [String], simulcastRpcRids: [Rid]
75+
dataChannel: DataChannel, rpcMethods: [String]
7976
) {
8077
guard !rpcMethods.isEmpty else {
8178
return nil
8279
}
8380
self.dataChannel = dataChannel
8481
self.allowedMethods = rpcMethods
8582
self.allowedMethodNames = Set(rpcMethods)
86-
self.simulcastRpcRids = simulcastRpcRids
8783
}
8884

8985
/// RPC が利用可能かを返す。

Sora/Signaling.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,6 @@ public struct SignalingOffer {
478478
/// RPC で利用可能なメソッド
479479
public var rpcMethods: [String]?
480480

481-
/// RPC 経由で切り替えられるサイマルキャストの rid
482-
public var simulcastRpcRids: [Rid]?
483-
484481
/// audio
485482
public let audio: Bool?
486483

@@ -1167,7 +1164,6 @@ extension SignalingOffer: Codable {
11671164
videoCodecType = try container.decodeIfPresent(String.self, forKey: .video_codec_type)
11681165
videoBitRate = try container.decodeIfPresent(Int.self, forKey: .video_bit_rate)
11691166
rpcMethods = try container.decodeIfPresent([String].self, forKey: .rpc_methods)
1170-
simulcastRpcRids = try container.decodeIfPresent([Rid].self, forKey: .simulcast_rpc_rids)
11711167
}
11721168

11731169
public func encode(to encoder: Encoder) throws {

Sora/Types.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// 映像の rid を表します。
2-
/// type: offer の simulcastRpcRids や RPC で利用される汎用 rid 型です。
32
public enum Rid: Equatable {
43
/// 映像を受信しない
54
case none

SoraTests/SignalingOfferTests.swift

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)