Skip to content

Commit

Permalink
Merge pull request #226 from shiguredo/feature/no-multistream-modific…
Browse files Browse the repository at this point in the history
…ation

設定に応じて multistreamEnabled の値を更新する処理を削除する
  • Loading branch information
zztkm authored Jan 28, 2025
2 parents e27eca4 + 94b53d8 commit 87b83a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

## develop

- [CHANGE] connect メッセージの `multistream` を true 固定で送信する処理を削除する破壊的変更
- Configration.role に .sendrecv を指定している場合に multistream を true に更新する処理を削除
- Configration.spotlightEnabled に .enabled を指定している場合に multistream を true に更新する処理を削除
- 結果、connect メッセージには Configration.multistreamEnabled に指定した値が送信される
- 今後は Configration.role に .sendrecv を指定している場合または Configration.spotlightEnabled に .enabled を指定している場合に Confgration.multistreamEnabled に false を指定すると接続エラーになる
- @zztkm
- [UPDATE] multistreamEnabled を非推奨扱いにする
- multistreamEnabled の設定が不要なイニシャライザを `Configuration` に追加する
- ドキュメントコメントに非推奨扱いの旨を追加する
Expand Down
8 changes: 1 addition & 7 deletions Sora/PeerChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -294,22 +294,16 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
message: "did connect to signaling channel")

var role: SignalingRole
var multistream = configuration.multistreamEnabled
if configuration.spotlightEnabled == .enabled {
multistream = true
}
switch configuration.role {
case .sendonly:
role = .sendonly
case .recvonly:
role = .recvonly
case .sendrecv:
role = .sendrecv
multistream = true
}

let soraClient = "Sora iOS SDK \(SDKInfo.version)"

let webRTCVersion = "Shiguredo-build \(WebRTCInfo.version) (\(WebRTCInfo.version.dropFirst()).\(WebRTCInfo.branch).\(WebRTCInfo.commitPosition).\(WebRTCInfo.maintenanceVersion) \(WebRTCInfo.shortRevision))"

let simulcast = configuration.simulcastEnabled
Expand All @@ -321,7 +315,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
metadata: configuration.signalingConnectMetadata,
notifyMetadata: configuration.signalingConnectNotifyMetadata,
sdp: sdp,
multistreamEnabled: multistream,
multistreamEnabled: configuration.multistreamEnabled,
videoEnabled: configuration.videoEnabled,
videoCodec: configuration.videoCodec,
videoBitRate: configuration.videoBitRate,
Expand Down

0 comments on commit 87b83a1

Please sign in to comment.