Skip to content

Commit

Permalink
サイマルキャストマルチコーデックに対応する
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Jun 1, 2024
1 parent f5bcde5 commit 7416bc9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sora/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ public struct Configuration {
/// ロールが `.sendrecv` または `.recvonly` のときのみ有効です。
public var simulcastRid: SimulcastRid?

/// サイマルキャストマルチコーデックの可否。`true` であればサイマルキャストマルチコーデックを有効にします。
public var simulcastMulticodecEnabled: Bool? = nil

/// スポットライトの可否
/// 詳しくは Sora のスポットライト機能を参照してください。
public var spotlightEnabled: Spotlight = .disabled
Expand Down
1 change: 1 addition & 0 deletions Sora/PeerChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
spotlightUnfocusRid: configuration.spotlightUnfocusRid,
simulcastEnabled: simulcast,
simulcastRid: configuration.simulcastRid,
simulcastMulticodecEnabled: configuration.simulcastMulticodecEnabled,
soraClient: soraClient,
webRTCVersion: webRTCVersion,
environment: DeviceInfo.current.description,
Expand Down
6 changes: 6 additions & 0 deletions Sora/Signaling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ public struct SignalingConnect {
/// サイマルキャストでの映像の種類
public var simulcastRid: SimulcastRid?

/// サイマルキャストマルチコーデックの可否
public var simulcastMulticodecEnabled: Bool?

/// :nodoc:
public var soraClient: String?

Expand Down Expand Up @@ -770,6 +773,7 @@ extension SignalingConnect: Codable {
case spotlight_unfocus_rid
case simulcast
case simulcast_rid
case simulcast_multicodec
case video
case audio
case sora_client
Expand Down Expand Up @@ -874,6 +878,8 @@ extension SignalingConnect: Codable {
}
}

try container.encodeIfPresent(simulcastMulticodecEnabled, forKey: .simulcast_multicodec)

switch spotlightEnabled {
case .enabled:
try container.encode(true, forKey: .spotlight)
Expand Down

0 comments on commit 7416bc9

Please sign in to comment.