Skip to content

Commit

Permalink
Merge branch 'release/sora-andoroid-sdk-2023.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
miosakuma committed Apr 5, 2023
2 parents 3bb7d78 + 83ac0dc commit 94d1cfc
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'adopt'
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
- name: Copy gradle.properties
Expand Down
21 changes: 21 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,43 @@

## develop

## sora-andoroid-sdk-2023.1.0

- [UPDATE] システム条件を更新する
- Android Studio 2022.1.1 以降
- WebRTC SFU Sora 2022.2.0 以降
- Sora Android SDK 2023.1.0 以降
- @miosakuma
- [UPDATE] `compileSdkVersion` を 33 に上げる
- @miosakuma
- [UPDATE] `targetSdkVersion` を 33 に上げる
- @miosakuma
- [UPDATE] Kotlin のバージョンを 1.8.10 に上げる
- @miosakuma
- [UPDATE] Compose Compiler のバージョンを 1.4.3 に上げる
- @miosakuma
- [UPDATE] Gradle を 7.6.1 に上げる
- @miosakuma
- [UPDATE] 依存ライブラリーのバージョンを上げる
- com.android.tools.build:gradle を 7.4.2 に上げる
- com.github.ben-manes:gradle-versions-plugin を 0.46.0 に上げる
- org.jlleitschuh.gradle:ktlint-gradle を 11.3.1 に上げる
- com.google.code.gson:gson を 2.10.1 に上げる
- androidx.appcompat:appcompat を 1.6.1 に上げる
- androidx.recyclerview:recyclerview: を 1.3.0 に上げる
- com.google.android.material:material: を 1.8.0 に上げる
- androidx.navigation:navigation-fragment-ktx を 2.5.3 に上げる
- androidx.navigation:navigation-ui-ktx を 2.5.3 に上げる
- androidx.compose.ui:ui:1.4.0 に上げる
- androidx.compose.material:material を 1.4.0 に上げる
- androidx.compose.material:material-icons-extended を 1.4.0 に上げる
- androidx.activity:activity-compose を 1.7.0 に上げる

- [ADD] 映像コーデックに AV1 を追加する
- @miosakuma
- [ADD] ビデオチャットサンプルに音声ストリーミング機能の言語コードを追加する
- @miosakuma

## sora-andoroid-sdk-2022.4.0

- [UPDATE] `compileSdkVersion` を 32 に上げる
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Please read https://github.com/shiguredo/oss before use.
## システム条件

- Android 8.0 以降 (エミュレーターでの動作は保証しません)
- Android Studio 2021.2.1 以降
- WebRTC SFU Sora 2022.1.1 以降
- Sora Android SDK 2022.4.0 以降
- Android Studio 2022.1.1 以降
- WebRTC SFU Sora 2022.2.2 以降
- Sora Android SDK 2023.1.0 以降

## サンプルの使い方

Expand All @@ -41,6 +41,10 @@ Please read https://github.com/shiguredo/oss before use.

スポットライトのデモです。アクティブ配信数を固定したチャットが可能です。

### メッセージング

メッセージングのデモです。

### スクリーンキャスト

クライアント端末の画面を動画配信するデモです。
Expand All @@ -51,6 +55,6 @@ Please read https://github.com/shiguredo/oss before use.

## Copyright

- Copyright 2022, Shiguredo Inc. and Lyo Kato <lyo.kato at gmail.com>
- Copyright 2023, Shiguredo Inc. and Lyo Kato <lyo.kato at gmail.com>

- LibYuv ライブラリ: Copyright 2011 The LibYuv Project Authors.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
apply plugin: "com.github.ben-manes.versions"

buildscript {
ext.kotlin_version = '1.7.10'
ext.sora_android_sdk_version = '2022.4.0'
ext.kotlin_version = '1.8.10'
ext.sora_android_sdk_version = '2023.1.0'

repositories {
google()
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"

classpath "com.github.ben-manes:gradle-versions-plugin:0.42.0"
classpath "org.jlleitschuh.gradle:ktlint-gradle:10.3.0"
classpath "com.github.ben-manes:gradle-versions-plugin:0.46.0"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.3.1"
}

// デバッグ用: true に設定すると wss ではなく ws で接続できる
Expand Down
26 changes: 13 additions & 13 deletions samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

android {
compileSdkVersion 32
compileSdkVersion 33
defaultConfig {
applicationId "jp.shiguredo.sora.sample"
targetSdkVersion 30
targetSdkVersion 33
minSdkVersion 26
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -49,7 +49,7 @@ android {
}

composeOptions {
kotlinCompilerExtensionVersion '1.3.0'
kotlinCompilerExtensionVersion '1.4.3'
}

buildTypes {
Expand Down Expand Up @@ -91,21 +91,21 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"

implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.google.code.gson:gson:2.10.1'

implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.0'

implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.jaredrummler:material-spinner:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.1'
implementation 'androidx.compose.ui:ui:1.2.1'
implementation 'androidx.compose.material:material:1.2.1'
implementation "androidx.compose.material:material-icons-extended:1.2.1"
implementation 'androidx.activity:activity-compose:1.5.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
implementation 'androidx.compose.ui:ui:1.4.0'
implementation 'androidx.compose.material:material:1.4.0'
implementation "androidx.compose.material:material-icons-extended:1.4.0"
implementation 'androidx.activity:activity-compose:1.7.0'

ext.pd_version = '4.9.2'
implementation "com.github.permissions-dispatcher:permissionsdispatcher:${pd_version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class SoraVideoChannel(
private val audioStereo: Boolean = false,
private val needLocalRenderer: Boolean = true,
private val audioEnabled: Boolean = true,
private val audioStreamingLanguageCode: String? = null,
private val capturerFactory: CameraVideoCapturerFactory =
DefaultCameraVideoCapturerFactory(context, fixedResolution, cameraFacing),
private var listener: Listener?
Expand Down Expand Up @@ -330,6 +331,7 @@ class SoraVideoChannel(
this.proxy.password = BuildConfig.PROXY_PASSWORD
}
}
audioStreamingLanguageCode = this@SoraVideoChannel.audioStreamingLanguageCode
}

val peerConnectionOption = PeerConnectionOption().apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class SoraScreencastService : Service() {
}

val activityIntent = createBoundActivityIntent()
val pendingIntent = PendingIntent.getActivity(this, 0, activityIntent, 0)
val pendingIntent = PendingIntent.getActivity(this, 0, activityIntent, PendingIntent.FLAG_MUTABLE)
val notification = NotificationCompat.Builder(this, notificationChannelId)
.setContentTitle(req!!.stateTitle)
.setContentText(req!!.stateText)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ScreencastSetupActivity : AppCompatActivity() {
val TAG = ScreencastSetupActivity::class.simpleName
}

private val videoCodecOptions = listOf("VP9", "VP8", "H264")
private val videoCodecOptions = listOf("VP9", "VP8", "H264", "AV1")
private val audioCodecOptions = listOf("OPUS")
private val multistreamOptions = listOf("有効", "無効")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SpotlightRoomSetupActivity : AppCompatActivity() {
}

private val spotlightNumberOptions = listOf("未指定", "1", "2", "3", "4", "5", "6", "7", "8")
private val videoCodecOptions = listOf("VP8", "VP9", "H264")
private val videoCodecOptions = listOf("VP8", "VP9", "H264", "AV1")
private val audioCodecOptions = listOf("OPUS")
private val audioBitRateOptions = listOf(
"未指定", "8", "16", "24", "32",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class VideoChatRoomActivity : AppCompatActivity() {
private var bundleId: String? = null
private var dataChannelSignaling: Boolean? = null
private var ignoreDisconnectWebSocket: Boolean? = null
private var audioStreamingLanguageCode: String? = null

private var oldAudioMode: Int = AudioManager.MODE_NORMAL

Expand Down Expand Up @@ -196,6 +197,13 @@ class VideoChatRoomActivity : AppCompatActivity() {
else -> null
}

audioStreamingLanguageCode = when (intent.getStringExtra("AUDIO_STREAMING_LANGUAGE_CODE")) {
"ja-JP" -> "ja-JP"
"en-US" -> "en-US"
"未指定" -> null
else -> null
}

// ステレオでは landscape にしたほうが内蔵マイクを使うときに自然な向きとなる。
if (audioStereo) {
if (resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
Expand Down Expand Up @@ -330,6 +338,7 @@ class VideoChatRoomActivity : AppCompatActivity() {
cameraFacing = cameraFacing,
clientId = clientId,
bundleId = bundleId,
audioStreamingLanguageCode = audioStreamingLanguageCode,
listener = channelListener,
needLocalRenderer = true
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
val TAG = VideoChatRoomSetupActivity::class.simpleName
}

private val videoCodecOptions = listOf("VP9", "VP8", "H264")
private val videoCodecOptions = listOf("VP9", "VP8", "H264", "AV1")
private val videoEnabledOptions = listOf("有効", "無効")
private val audioCodecOptions = listOf("OPUS")
private val audioEnabledOptions = listOf("有効", "無効")
Expand All @@ -39,6 +39,7 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
private val bundleIdOptions = listOf("なし", "端末情報", "時雨堂", "ランダム")
private val dataChannelSignalingOptions = listOf("未指定", "無効", "有効")
private val ignoreDisconnectWebSocketOptions = listOf("未指定", "無効", "有効")
private val audioStreamingLanguageCodeOptions = listOf("未指定", "ja-JP", "en-US")

private lateinit var binding: ActivityVideoChatRoomSetupBinding

Expand Down Expand Up @@ -88,6 +89,8 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
binding.dataChannelSignalingSelection.spinner.setItems(dataChannelSignalingOptions)
binding.ignoreDisconnectWebSocketSelection.name.text = "WS 切断を無視"
binding.ignoreDisconnectWebSocketSelection.spinner.setItems(ignoreDisconnectWebSocketOptions)
binding.audioStreamingLanguageCodeSelection.name.text = "文字変換言語コード"
binding.audioStreamingLanguageCodeSelection.spinner.setItems(audioStreamingLanguageCodeOptions)
}

private fun startVideoChat() {
Expand Down Expand Up @@ -115,6 +118,7 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
val bundleId = selectedItem(binding.bundleIdSelection.spinner)
val dataChannelSignaling = selectedItem(binding.dataChannelSignalingSelection.spinner)
val ignoreDisconnectWebSocket = selectedItem(binding.ignoreDisconnectWebSocketSelection.spinner)
val audioStreamingLanguageCode = selectedItem(binding.audioStreamingLanguageCodeSelection.spinner)

val intent = Intent(this, VideoChatRoomActivity::class.java)
intent.putExtra("CHANNEL_NAME", channelName)
Expand All @@ -136,6 +140,7 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
intent.putExtra("BUNDLE_ID", bundleId)
intent.putExtra("DATA_CHANNEL_SIGNALING", dataChannelSignaling)
intent.putExtra("IGNORE_DISCONNECT_WEBSOCKET", ignoreDisconnectWebSocket)
intent.putExtra("AUDIO_STREAMING_LANGUAGE_CODE", audioStreamingLanguageCode)

startActivity(intent)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
<include
layout="@layout/signaling_selection"
android:id="@+id/ignoreDisconnectWebSocketSelection"/>
<include
layout="@layout/signaling_selection"
android:id="@+id/audioStreamingLanguageCodeSelection"/>

</com.google.android.material.textfield.TextInputLayout>

Expand Down
4 changes: 2 additions & 2 deletions webrtc-video-effector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apply plugin: 'com.android.library'
apply plugin: 'org.jlleitschuh.gradle.ktlint'

android {
compileSdkVersion 31
compileSdkVersion 33
defaultConfig {
targetSdkVersion 30
targetSdkVersion 33
minSdkVersion 26
externalNativeBuild {
cmake {
Expand Down

0 comments on commit 94d1cfc

Please sign in to comment.