Skip to content

Commit

Permalink
Merge pull request #118 from GetStream/PBE-6341-Fix-deserialization-e…
Browse files Browse the repository at this point in the history
…rror.-Missing-start-closed-captions-call

Fix deserialization when creating a new call breaking due to missing enum value
  • Loading branch information
sierpinskid authored Nov 12, 2024
2 parents 1a5059b + 3354ad3 commit a9095ef
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/Graphy - Ultimate Stats Monitor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ internal enum OwnCapabilityInternalEnum

[System.Runtime.Serialization.EnumMember(Value = @"update-call-settings")]
UpdateCallSettings = 25,

[System.Runtime.Serialization.EnumMember(Value = @"start-closed-captions-call")]
StartClosedCaptionsCall = 26,

[System.Runtime.Serialization.EnumMember(Value = @"stop-closed-captions-call")]
StopClosedCaptionsCall = 27,

}

Expand Down
6 changes: 6 additions & 0 deletions Packages/StreamVideo/Runtime/Core/Models/OwnCapability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public enum OwnCapability
UpdateCallSettings = 23,
EnableNoiseCancellation = 24,
ChangeMaxDuration = 25,
StartClosedCaptionsCall = 26,
StopClosedCaptionsCall = 27,
}

internal static class OwnCapabilityExt
Expand Down Expand Up @@ -65,6 +67,8 @@ public static OwnCapabilityInternalEnum ToInternalEnum(this OwnCapability ownCap
case OwnCapability.UpdateCallSettings: return OwnCapabilityInternalEnum.UpdateCallSettings;
case OwnCapability.EnableNoiseCancellation: return OwnCapabilityInternalEnum.EnableNoiseCancellation;
case OwnCapability.ChangeMaxDuration: return OwnCapabilityInternalEnum.ChangeMaxDuration;
case OwnCapability.StartClosedCaptionsCall: return OwnCapabilityInternalEnum.StartClosedCaptionsCall;
case OwnCapability.StopClosedCaptionsCall: return OwnCapabilityInternalEnum.StopClosedCaptionsCall;
default: throw new ArgumentOutOfRangeException(nameof(ownCapability), ownCapability, null);
}
}
Expand Down Expand Up @@ -99,6 +103,8 @@ public static OwnCapability ToPublicEnum(this OwnCapabilityInternalEnum ownCapab
case OwnCapabilityInternalEnum.UpdateCallSettings: return OwnCapability.UpdateCallSettings;
case OwnCapabilityInternalEnum.EnableNoiseCancellation: return OwnCapability.EnableNoiseCancellation;
case OwnCapabilityInternalEnum.ChangeMaxDuration: return OwnCapability.ChangeMaxDuration;
case OwnCapabilityInternalEnum.StartClosedCaptionsCall: return OwnCapability.StartClosedCaptionsCall;
case OwnCapabilityInternalEnum.StopClosedCaptionsCall: return OwnCapability.StopClosedCaptionsCall;
default: throw new ArgumentOutOfRangeException(nameof(ownCapability), ownCapability, null);
}
}
Expand Down

0 comments on commit a9095ef

Please sign in to comment.