-
Notifications
You must be signed in to change notification settings - Fork 10
onDisconnect: ((SoraCloseEvent) -> Void)) を追加する #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
Sora/MediaChannel.swift:424
- [nitpick] Consider using a more descriptive default message instead of 'NO-ERROR' for a successful disconnect event.
return SoraCloseEvent.ok(code: 1000, reason: "NO-ERROR")
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
Sora/MediaChannel.swift:424
- [nitpick] The literal 'NO-ERROR' may be unclear to end users. Consider using a more descriptive message to better explain the absence of an error.
return SoraCloseEvent.ok(code: 1000, reason: "NO-ERROR")
…ct-with-sora-close-event' into feature/on-disconnect-with-sora-close-event
miosakuma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確認しました、対応ありがとうございます。
MediaCHannelHandlersのonDisconnect: ((Error?) -> Void)?をonDisconnectLegacyという名前に変更し、非推奨にするonDisconnect: ((SoraCloseEvent) -> Void)?に移行するため、名前を変更したMediaChannelHandlersにonDisconnect: ((SoraCloseEvent) -> Void)?を追加するCopilo Summary
This pull request includes changes to the
Soraproject to improve the handling of disconnection events and update some deprecated methods. The most important changes include the introduction of a newSoraCloseEventenum, deprecation of the oldonDisconnecthandler, and updates to the error handling logic.Improvements to disconnection handling:
Sora/MediaChannel.swift: Introduced theSoraCloseEventenum to represent disconnection events, with cases for normal disconnection (.ok) and errors (.error).Sora/MediaChannel.swift: Deprecated theonDisconnect: ((Error?) -> Void)?handler and replaced it withonDisconnect: ((SoraCloseEvent) -> Void)?. Added a newonDisconnectLegacyhandler for backward compatibility.Sora/MediaChannel.swift: Updated theinternalDisconnectmethod to generateSoraCloseEventbased on the error and call the appropriate disconnection handlers.Updates to error handling:
Sora/SoraError.swift: Modified thewebSocketClosederror to include status code 1000 and updated the documentation to reflect the changes in how disconnection reasons are handled.Documentation updates:
CHANGES.md: Documented the deprecation of the oldonDisconnecthandler and the introduction of the newSoraCloseEventenum andonDisconnecthandler.