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

OfferMessage を更新する #143

Merged
merged 7 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@

- [UPDATE] libwebrtc を 131.6778.4.0 に上げる
- @miosakuma @zztkm
- [UPDATE] OfferMessage に項目を追加する
- 追加した項目
- `version`
- `multistream`
- `simulcast_multicodec`
- `spotlight`
- `channel_id`
- `session_id`
- `audio`
- `audio_codec_type`
- `audio_bit_rate`
- `video`
- `video_codec_type`
- `video_bit_rate`
- @zztkm
- [UPDATE] SoraForwardingFilterOption 型の引数を Sora での 2025 年 12 月の廃止に向けて非推奨にする
- 今後はリスト形式の転送フィルター設定を利用してもらう
- 非推奨になるクラス
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

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

channel_id や multistream などのオプショナルでない項目は確定で入ってくることを前提にしていて、オプショナルにしてある項目は互換性担保の目的でオプショナルにしてあります。

Copy link
Contributor

@miosakuma miosakuma Dec 18, 2024

Choose a reason for hiding this comment

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

議論になる箇所と思うのですが、Sora の仕様変更の可能性を考えると、SDK として動作に必須でない(利用していない)項目は全てオプショナルにしてしまって良いように思いました。将来的に multistream が廃止されることなどを意識しています。

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package jp.shiguredo.sora.sdk.channel.signaling.message
import com.google.gson.annotations.SerializedName
import jp.shiguredo.sora.sdk.util.SDKInfo

// NOTE: 後方互換性を考慮して、項目を追加するときはオプショナルで定義するようにしてください。

data class MessageCommonPart(
@SerializedName("type") val type: String?
)
Expand Down Expand Up @@ -111,15 +113,31 @@ data class RedirectMessage(
data class OfferMessage(
@SerializedName("type") val type: String = "offer",
@SerializedName("sdp") val sdp: String,
@SerializedName("version") val version: String? = null,

@SerializedName("multistream") val multistream: Boolean? = null,
@SerializedName("simulcast") val simulcast: Boolean = false,
@SerializedName("simulcast_multicodec") val simulcastMulticodec: Boolean? = null,
@SerializedName("spotlight") val spotlight: Boolean? = null,

@SerializedName("channel_id") val channelId: String? = null,
@SerializedName("client_id") val clientId: String,
@SerializedName("bundle_id") val bundleId: String? = null,
@SerializedName("connection_id") val connectionId: String,
@SerializedName("simulcast") val simulcast: Boolean = false,
@SerializedName("session_id") val sessionId: String? = null,

@SerializedName("metadata") val metadata: Any?,
@SerializedName("config") val config: OfferConfig? = null,
@SerializedName("mid") val mid: Map<String, String>? = null,
@SerializedName("encodings") val encodings: List<Encoding>?,
@SerializedName("data_channels") val dataChannels: List<Map<String, Any>>? = null
@SerializedName("data_channels") val dataChannels: List<Map<String, Any>>? = null,

@SerializedName("audio") val audio: Boolean? = null,
@SerializedName("audio_codec_type") val audioCodecType: String? = null,
@SerializedName("audio_bit_rate") val audioBitRate: Int? = null,
@SerializedName("video") val video: Boolean? = null,
@SerializedName("video_codec_type") val videoCodecType: String? = null,
@SerializedName("video_bit_rate") val videoBitRate: Int? = null,
)

data class SwitchedMessage(
Expand Down