Skip to content
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

libwebrtc に含まれるバージョン文字列を Android と揃える #193

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

miosakuma
Copy link
Contributor

@miosakuma miosakuma commented Apr 1, 2024

修正内容

シグナリング connect で送信される libwebrtc の内容を Android にあわせました。

当初は branch-head の値が送信されていないことから始まりましたが、
最終的には Android の同項目と出力内容を合わせる対応としています。
Sora C++ SDK も () 内に M をつけていないのでそちらに合わせることにしました。

  • branch-head の項目がないので追加しました。
  • () 内の文字列から先頭の M を取り除きました

修正前
"libwebrtc":"Shiguredo-build M122 (M122.1.0 6b419a0)"

修正後
"libwebrtc":"Shiguredo-build M122 (122.6261.1.0 6b419a0)"

Sora Android SDK の出力内容
"libwebrtc": "Shiguredo-build M121 (121.6167.4.0 0f741da)"

確認した内容

  • libwebrtc 情報について想定通りの出力であることを確認しました
    • "libwebrtc": "Shiguredo-build M123 (123.6312.3.0 41b1493)"

This pull request includes changes to the CHANGES.md, Sora/PackageInfo.swift, and Sora/PeerChannel.swift files. The most important changes are aimed at aligning the version string of libwebrtc in the connect signaling message with Android. This involves adding branch-heads, removing the first character of the libwebrtc version in parentheses, and modifying the transmitted string.

Here are the key changes:

Version String Alignment:

  • CHANGES.md: Updated the change log to reflect the alignment of the libwebrtc version string in the connect signaling message with Android. This involves adding branch-heads, removing the first character from the libwebrtc version in parentheses, and changing the transmitted string from Shiguredo-build M122 (M122.1.0 6b419a0) to Shiguredo-build M122 (122.6261.1.0 6b419a0).

Code Changes:

  • Sora/PackageInfo.swift: Added branch-heads to the WebRTCInfo enum.
  • Sora/PeerChannel.swift: Modified the webRTCVersion string in the PeerChannel class to include the new branch-heads and to remove the first character from the libwebrtc version.

@miosakuma miosakuma requested a review from torikizi April 1, 2024 04:19
@miosakuma miosakuma marked this pull request as ready for review April 1, 2024 04:20
@miosakuma miosakuma requested a review from enm10k April 5, 2024 01:41
@@ -20,6 +20,9 @@ public enum WebRTCInfo {
/// WebRTC フレームワークのソースコードのリビジョン
public static let revision = "6b419a0536b1a0ccfff3682f997c6f19bcbd9bd8"

/// WebRTC の branch-heads
public static let branchHeads = "6261"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認するのが遅くなりすいません
この変数名だけ複数系になっているのが気になりました

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libwebrtc の branch-heads から取っています。
https://chromium.googlesource.com/external/webrtc/+/branch-heads/6312

Copy link
Contributor

@enm10k enm10k Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URI のデザインとして複数形 (branch-heads) になっているのではないかと思っており、 6261 は複数あるものでは無いので少し違和感があります
(https://example.com/posts/1 という URL の 1 を posts と呼んでいるイメージです)

変数名を branchName もしくは branch に変更してはどうかと思いましたが、いかがでしょうか?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

丁寧な説明ありがとうございます。Name らしい値ではないので branch とするようにしました。 8b4949e で対応しています。

@@ -307,7 +307,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {

let soraClient = "Sora iOS SDK \(SDKInfo.version)"

let webRTCVersion = "Shiguredo-build \(WebRTCInfo.version) (\(WebRTCInfo.version).\(WebRTCInfo.commitPosition).\(WebRTCInfo.maintenanceVersion) \(WebRTCInfo.shortRevision))"
let webRTCVersion = "Shiguredo-build \(WebRTCInfo.version) (\(String(WebRTCInfo.version.dropFirst())).\(WebRTCInfo.branchHeads).\(WebRTCInfo.commitPosition).\(WebRTCInfo.maintenanceVersion) \(WebRTCInfo.shortRevision))"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\(String(WebRTCInfo.version.dropFirst()) の String は省けませんか?

https://online.swiftplayground.run/ で確認したところ、なしでも動きそうな気がしました

import Foundation

let greeting = "Hello World"
print("\(greeting.dropFirst())") // ello World

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。修正して動作確認したところ、問題なさそうでしたのでそうします。
4ae0fda で対応しました

Copy link
Contributor

@enm10k enm10k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます

@miosakuma
Copy link
Contributor Author

ご確認ありがとうございました。マージします。

@miosakuma miosakuma merged commit b2c2363 into develop Apr 16, 2024
2 checks passed
@miosakuma miosakuma deleted the feature/fix-signaling-libwebrtc-message branch April 16, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants