Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zztkm committed Feb 4, 2025
1 parent 2ffd36c commit b56eaae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Sora/PeerChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,9 @@ extension RTCRtpSender {
}

if let value = encoding.scaleResolutionDownTo {
Logger.debug(type: .peerChannel, message: "scaleResolutionDownTo: \(value.maxWidth)x\(value.maxHeight)")
Logger.debug(
type: .peerChannel,
message: "scaleResolutionDownTo: \(value.maxWidth)x\(value.maxHeight)")
oldEncoding.scaleResolutionDownTo = value
}

Expand Down
6 changes: 4 additions & 2 deletions Sora/Signaling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ extension SignalingOffer.Configuration: Codable {
}

/// scaleResolutionDownTo を JSON デコードする専用の構造体
fileprivate struct ScaleResolutionDownTo {
private struct ScaleResolutionDownTo {
fileprivate let maxWidth: Int
fileprivate let maxHeight: Int
}
Expand Down Expand Up @@ -1015,7 +1015,9 @@ extension SignalingOffer.Encoding: Codable {
scaleResolutionDownBy = try container.decodeIfPresent(
Double.self,
forKey: .scaleResolutionDownBy)
if let _scleResolutionDownTo = try container.decodeIfPresent(ScaleResolutionDownTo.self, forKey: .scaleResolutionDownTo) {
if let _scleResolutionDownTo = try container.decodeIfPresent(
ScaleResolutionDownTo.self, forKey: .scaleResolutionDownTo)
{
let restriction = RTCResolutionRestriction()
restriction.maxWidth = NSNumber(value: _scleResolutionDownTo.maxWidth)
restriction.maxHeight = NSNumber(value: _scleResolutionDownTo.maxHeight)
Expand Down

0 comments on commit b56eaae

Please sign in to comment.