Skip to content

Commit

Permalink
Merge branch 'hotfix/2021.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
enm10k committed Jul 1, 2021
2 parents cd4a1b7 + bdc85cb commit 1846078
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 33 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
- FIX
- バグ修正

## 2021.1.1

- [FIX] Sora への接続時に simulcast_rid を指定するとエラーになる現象を修正する
- @enm10k
- [CHANGE] enum class SimulcastRid の定義を `jp.shiguredo.sora.sdk.channel.signaling.message` から `jp.shiguredo.sora.sdk.channel.option.SoraVideoOption` に移動する
- @enm10k

## 2021.1

- [CHANGE] SoraAudioOption.Codec から PCMU を外す
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package jp.shiguredo.sora.sdk.channel.option

import jp.shiguredo.sora.sdk.Sora
import jp.shiguredo.sora.sdk.channel.signaling.message.SimulcastRid
import org.webrtc.*

/**
Expand All @@ -20,7 +19,7 @@ class SoraMediaOption {
internal var multistreamEnabled = false
internal var spotlightOption: SoraSpotlightOption? = null
internal var simulcastEnabled = false
internal var simulcastRid: SimulcastRid? = null
internal var simulcastRid: SoraVideoOption.SimulcastRid? = null

internal val spotlightEnabled: Boolean
get() = spotlightOption != null
Expand Down Expand Up @@ -80,7 +79,7 @@ class SoraMediaOption {
/**
* サイマルキャスト機能を有効にします。
*/
fun enableSimulcast(rid: SimulcastRid? = null) {
fun enableSimulcast(rid: SoraVideoOption.SimulcastRid? = null) {
simulcastEnabled = true
simulcastRid = rid
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package jp.shiguredo.sora.sdk.channel.option

import jp.shiguredo.sora.sdk.channel.signaling.message.SimulcastRid

/**
* スポットライト機能のオプションです。
*/
Expand All @@ -10,7 +8,7 @@ class SoraSpotlightOption {
/**
* サイマルキャストの rid
*/
var simulcastRid: SimulcastRid? = null
var simulcastRid: SoraVideoOption.SimulcastRid? = null

/**
* スポットライト機能のアクティブな配信数を指定します
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,22 @@ class SoraVideoOption {

}

enum class SimulcastRid(private val value: String) {
/**
* r0
*/
R0("r0"),

/**
* r1
*/
R1("r1"),

/**
* r2
*/
R2("r2");

override fun toString(): String = value
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package jp.shiguredo.sora.sdk.channel.signaling.message

import android.os.Build
import com.google.gson.annotations.SerializedName
import jp.shiguredo.sora.sdk.BuildConfig
import jp.shiguredo.sora.sdk.util.SDKInfo

data class MessageCommonPart(
Expand Down Expand Up @@ -31,7 +29,7 @@ data class ConnectMessage(
@SerializedName("spotlight") var spotlight: Any? = null,
@SerializedName("spotlight_number") var spotlightNumber: Int? = null,
@SerializedName("simulcast") var simulcast: Boolean? = false,
@SerializedName("simulcast_rid") var simulcastRid: SimulcastRid? = null,
@SerializedName("simulcast_rid") var simulcastRid: String? = null,
@SerializedName("video") var video: Any? = null,
@SerializedName("audio") var audio: Any? = null,
@SerializedName("sora_client") val soraClient: String = SDKInfo.sdkInfo(),
Expand Down Expand Up @@ -63,29 +61,6 @@ data class OpusParams(
@SerializedName("usedtx") var usedtx: Boolean? = null
)

/**
* サイマルキャストの rid
*/
enum class SimulcastRid(val value: String) {

/**
* r0
*/
R0("r0"),

/**
* r1
*/
R1("r1"),

/**
* r2
*/
R2("r2");

override fun toString(): String = value
}

data class IceServer(
@SerializedName("urls") val urls: List<String>,
@SerializedName("credential") val credential: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class MessageConverter {

if (mediaOption.simulcastEnabled) {
msg.simulcast = mediaOption.simulcastEnabled
msg.simulcastRid = mediaOption.simulcastRid
msg.simulcastRid = mediaOption.simulcastRid?.toString()
}

val jsonMsg = gson.toJson(msg)
Expand Down

0 comments on commit 1846078

Please sign in to comment.