Skip to content

Commit e27eca4

Browse files
authored
Merge pull request #225 from shiguredo/feature/deprecated-multistream-option
multistreamEnabled を非推奨扱いにする
2 parents e4146d7 + acda327 commit e27eca4

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
## develop
1313

14+
- [UPDATE] multistreamEnabled を非推奨扱いにする
15+
- multistreamEnabled の設定が不要なイニシャライザを `Configuration` に追加する
16+
- ドキュメントコメントに非推奨扱いの旨を追加する
17+
- @zztkm
18+
1419
## 2025.1.1
1520

1621
**リリース日**: 2025-01-23

Sora/Configuration.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,16 @@ public struct Configuration {
8686
public var role: Role
8787

8888
/// マルチストリームの可否
89-
public var multistreamEnabled: Bool
89+
///
90+
/// レガシーストリーム機能は 2025 年 6 月リリースの Sora にて廃止します
91+
/// そのため、multistreamEnabled の使用は非推奨です
92+
public var multistreamEnabled: Bool?
9093

9194
/// :nodoc:
9295
var isMultistream: Bool {
9396
switch role {
9497
default:
95-
return multistreamEnabled
98+
return multistreamEnabled ?? true
9699
}
97100
}
98101

@@ -226,12 +229,12 @@ public struct Configuration {
226229
- parameter url: サーバーの URL
227230
- parameter channelId: チャネル ID
228231
- parameter role: ロール
229-
- parameter multistreamEnabled: マルチストリームの可否
232+
- parameter multistreamEnabled: マルチストリームの可否(デフォルトは指定なし)
230233
*/
231234
public init(url: URL,
232235
channelId: String,
233236
role: Role,
234-
multistreamEnabled: Bool)
237+
multistreamEnabled: Bool? = nil)
235238
{
236239
urlCandidates = [url]
237240
self.channelId = channelId
@@ -244,12 +247,12 @@ public struct Configuration {
244247
- parameter urlCandidates: シグナリングに利用する URL の候補
245248
- parameter channelId: チャネル ID
246249
- parameter role: ロール
247-
- parameter multistreamEnabled: マルチストリームの可否
250+
- parameter multistreamEnabled: マルチストリームの可否(デフォルトは指定なし)
248251
*/
249252
public init(urlCandidates: [URL],
250253
channelId: String,
251254
role: Role,
252-
multistreamEnabled: Bool)
255+
multistreamEnabled: Bool? = nil)
253256
{
254257
self.urlCandidates = urlCandidates
255258
self.channelId = channelId

Sora/PeerChannel.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
294294
message: "did connect to signaling channel")
295295

296296
var role: SignalingRole
297-
var multistream = configuration.multistreamEnabled || configuration.spotlightEnabled == .enabled
297+
var multistream = configuration.multistreamEnabled
298+
if configuration.spotlightEnabled == .enabled {
299+
multistream = true
300+
}
298301
switch configuration.role {
299302
case .sendonly:
300303
role = .sendonly

Sora/Signaling.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ public struct SignalingConnect {
270270
public var sdp: String?
271271

272272
/// マルチストリームの可否
273+
///
274+
/// レガシーストリーム機能は 2025 年 6 月リリースの Sora にて廃止します
275+
/// そのため、multistreamEnabled の使用は非推奨です
273276
public var multistreamEnabled: Bool?
274277

275278
/// 映像の可否

0 commit comments

Comments
 (0)