-
Notifications
You must be signed in to change notification settings - Fork 10
Sora から切断された場合の切断処理を改善する #241
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
CHANGES.md
Outdated
| - [UPDATE] Sora から切断された場合の切断処理を改善する | ||
| - Sora から Close Frame を受けとった場合にステータスコードと理由を `MediaChannelHandlers.onDisconnect` で返すようになった | ||
| - ネットワークエラーや Sora がダウンした場合のエラー内容を `MediaChannelHandlers.onDisconnect` で返すようになった | ||
| - いままでは WebSocket メッセージ受信失敗時のエラーである `The operation couldn’t be completed. Socket is not connected` というエラーしか返せていなかった状態が改善された | ||
| - @zztkm |
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.
今回の変更内容はここです。
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.
Pull Request Overview
This PR aims to improve the disconnection behavior when Sora disconnects and update the changelog accordingly.
- Updated the WebRTC version.
- Improved the disconnection handling for Sora in the changelog, including returning status codes and reasons via MediaChannelHandlers.onDisconnect.
- Added the encoding parameter "scaleResolutionDownTo" for simulcast video.
Files not reviewed (2)
- Sora/SignalingChannel.swift: Language not supported
- Sora/URLSessionWebSocketChannel.swift: Language not supported
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.
Pull Request Overview
This pull request improves the handling of WebSocket disconnections and error reporting for Sora while updating the changelog to reflect these changes and added simulcast video encoding parameters.
- Updated Sora disconnection processing to return error details via MediaChannelHandlers.onDisconnect
- Enhanced logging for WebSocket send/receive errors
- Documented the simulcast video encoding parameter change
Files not reviewed (2)
- Sora/SignalingChannel.swift: Language not supported
- Sora/URLSessionWebSocketChannel.swift: Language not supported
…ect-process-from-sora' into feature/fix-disconnect-process-from-sora
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 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
Sora/URLSessionWebSocketChannel.swift:166
- [nitpick] The disconnect call on message reception failure has been removed in favor of handling it in didCompleteWithError. Consider adding a more detailed comment explaining this design decision for clarity.
case .failure(let error):
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 3 out of 3 changed files in this pull request and generated no comments.
| disconnect(error: error) | ||
| } | ||
| // 2025.2.x から、ステータスコード 1000 の場合でも error として上位層に伝搬させることにする (上位層が error 前提で組まれているためこのような方針にした) | ||
| // これは disconnect が error を渡さないと機能 |
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.
文章が途中で切れていないでしょうか?
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.
すみません修正漏れでした。そこの文章はいらないので削除しようと思います。
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.
指摘ありがとうございます。
2b8d2de で修正しました
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で受け取ることができるようにするSoraError.webSocketErrorしか受信できなかったが、以下の内容を受信できるようになったMediaChannelHandlers.onDisconnectで通知するMediaChannelHandlers.onDisconnectで受信するメッセージの内容は変わるが、コールバックが発火するタイミングに変更はないうエラーしか返せていなかった状態が改善されたThis pull request includes several changes to improve WebSocket handling and error reporting in the
Soraproject. The most important changes focus on enhancing the disconnect process and improving logging for WebSocket operations.Improvements to WebSocket handling and error reporting:
Sora/URLSessionWebSocketChannel.swift: Added a method to handle WebSocket disconnection, including handling errors from Sora or network issues, and improved logging for disconnect events. [1] [2] [3] [4]Sora/URLSessionWebSocketChannel.swift: Enhanced logging for sending text and binary messages, and improved error logging when message sending fails. [1] [2]Sora/URLSessionWebSocketChannel.swift: Improved error handling and logging for message reception failures, ensuring that higher-level error detection occurs in thedidCompleteWithErrormethod. [1] [2]Documentation updates:
CHANGES.md: Updated the change log to reflect the improvements in WebSocket disconnection handling and the addition of new encoding parameters for simulcast video.Code comments:
Sora/SignalingChannel.swift: Updated comments to clarify the behavior of theonDisconnectWithErrorhandler for WebSocket disconnections.