[WIP] offer メッセージの simulcast を利用する #129
Open
+8
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
動作するところまで確認したので相談の Draft PR です。
対応内容
simulcast について connect でクライアントから払い出した値を認証ウェブフックで 上書きしても
クライアントに反映されない不具合を修正した。
ユーザーから指定された simulcast を利用していたので offer メッセージから取得した simulcast を利用するように修正した。
相談内容
offer で取得した simulcast の値を EncoderFactory まで引き回すように各種引数を追加したが、この対応で問題ないか。
現在ユーザが設定した接続オプション(MediaOption) をそのままコア部分まで渡しているがそこから抜本的に変えた方がよいか。
修正経緯として、はじめは #93 にて MediaOption の simulcastEnabled を offer の値で上書きしていましたが、
ユーザが設定した接続オプションを SDK 側で書き換えるのはよくない、という指摘を受け、MediaOption を更新しない書き方で対応しています。
#93 (comment)
現在の接続の流れ
関係ない項目は割愛していますが、以下のような内容です。
修正後の接続の流れ
4 の処理について PeerChannel, RTCComponentFactory のコンストラクタ引数に simulcastEnabled を追加しています。
そもそも MediaOption が最後まで連携されるのはおかしい、MediaOption + simulcastEnabled の値を持った別の構造体を用意すべき、という意見もあるかなと思い、対応内容がこれでよかったかコメントをもらえるとうれしいです。
This pull request primarily focuses on adding simulcast support to the
SoraMediaChannel
andPeerChannelImpl
classes in thesora-android-sdk
project. The changes include adding a newsimulcastEnabled
parameter to several methods and classes, and replacing the use ofmediaOption.simulcastEnabled
with this new parameter.Changes related to
simulcastEnabled
:sora-android-sdk/src/main/kotlin/jp/shiguredo/sora/sdk/channel/SoraMediaChannel.kt
: AddedsimulcastEnabled
as a parameter to theSoraMediaChannel
constructor.sora-android-sdk/src/main/kotlin/jp/shiguredo/sora/sdk/channel/rtc/PeerChannel.kt
: AddedsimulcastEnabled
as a parameter to thePeerChannelImpl
constructor and replacedmediaOption.simulcastEnabled
withsimulcastEnabled
in several places. [1] [2] [3] [4]sora-android-sdk/src/main/kotlin/jp/shiguredo/sora/sdk/channel/rtc/RTCComponentFactory.kt
: AddedsimulcastEnabled
as a parameter to theRTCComponentFactory
constructor and replacedmediaOption.simulcastEnabled
withsimulcastEnabled
. [1] [2]Changes related to
OfferMessage
:sora-android-sdk/src/main/kotlin/jp/shiguredo/sora/sdk/channel/signaling/message/Catalog.kt
: Addedsimulcast
as a serialized field to theOfferMessage
data class.