Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Oct 24, 2023
2 parents f779467 + f5eac64 commit 14d3085
Show file tree
Hide file tree
Showing 184 changed files with 41,796 additions and 21,641 deletions.
Binary file added .repackage-assets/maven_local.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,20 @@ Video roadmap and changelog is available [here](https://github.com/GetStream/pro
- [X] Screensharing from mobile
- [X] Picture of the video stream at the highest resolution + docs on how to add a button for this (Daniel)
- [X] Audio & Video filters. Support (Daniel)
- [ ] Default livestream player UI + docs (Jaewoong/ Daniel)
- [ ] Implement Chat overlay for Dogfooding (Jaewoong)
- [ ] Add Dogfooding instructions + directs Google Play (Jaewoong)
- [ ] Reaction dialog API for Compose (Jaewoong)
- [ ] Android SDK development.md cleanup (Daniel)
- [ ] Upgrade to more recent versions of webrtc (Kanat)
- [ ] Review foreground service vs backend for audio rooms etc. (Daniel)
- [ ] Support participant.custom field which was previously ignored. ParticipantState line 216 (Daniel)
- [X] Implement Chat overlay for Dogfooding (Jaewoong)
- [X] Migrate Stream Chat SDK v6 stable (Jaewoong)
- [X] Add Dogfooding instructions + directs Google Play (Jaewoong)
- [X] Support participant.custom field which was previously ignored. ParticipantState line 216 (Daniel)
- [X] Default livestream player UI + docs (Jaewoong)
- [X] Reaction dialog API for Compose (Jaewoong)
- [X] Android SDK development.md cleanup (Jaewoong)
- [X] Upgrade to more recent versions of webrtc (Jaewoong/Kanat)
- [X] Review foreground service vs backend for audio rooms etc. (Aleks)
- [X] Enable SFU switching
- [ ] Logging is too verbose (rtc is very noisy), clean it up to focus on the essential for info and higher (Daniel)

### 0.5.0 milestone

- [ ] Enable SFU switching
- [ ] H264 workaround on Samsung 23? (see https://github.com/livekit/client-sdk-android/blob/main/livekit-android-sdk/src/main/java/io/livekit/android/webrtc/SimulcastVideoEncoderFactoryWrapper.kt#L34 and
- https://github.com/react-native-webrtc/react-native-webrtc/issues/983#issuecomment-975624906)
- [ ] Test coverage
Expand Down
2 changes: 1 addition & 1 deletion benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ android {
}
}

flavorDimensions("environment")
flavorDimensions += "environment"
productFlavors {
create("dogfooding") {
dimension = "environment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ package io.getstream.video.android.benchmark
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.benchmark.macro.junit4.BaselineProfileRule
import androidx.test.uiautomator.By
import androidx.test.uiautomator.BySelector
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiObject2
import androidx.test.uiautomator.Until
import org.junit.Rule
import org.junit.Test

Expand All @@ -43,76 +38,6 @@ internal class BaselineProfileGenerator {
startActivityAndWait()
device.waitForIdle()

// -------------
// Authenticate
// -------------
device.authenticateAndNavigateToHome()

// -------------
// JoinCall
// -------------
device.navigateFromJoinCallToLobby()

// -------------
// Lobby
// -------------
device.navigateFromLobbyToCall()

// -------------
// Call
// -------------
device.testCall()
dogfoodingScenarios()
}
}

private fun UiDevice.authenticateAndNavigateToHome() {
wait(Until.hasObject(By.res("authenticate")), 5_000)

// Click the Authenticate button and login.
waitForObject(By.res("authenticate"))?.click()

waitForIdle()
}

private fun UiDevice.navigateFromJoinCallToLobby() {
wait(Until.hasObject(By.res("start_new_call")), 5_000)

// wait for the Join Call button and navigate to the lobby screen by clicking.
waitForObject(By.res("start_new_call"))?.click()

waitForIdle()
}

private fun UiDevice.navigateFromLobbyToCall() {
waitForObject(By.text(getPermissionText()), 5_000)?.click()
waitForObject(By.text(getPermissionText()), 5_000)?.click()

wait(Until.hasObject(By.res("call_lobby")), 15_000)
wait(Until.hasObject(By.res("participant_video_renderer")), 15_000)

// wait for the Start Call button and navigate to the call screen by clicking.
waitForObject(By.res("start_call"), 15_000)?.click()

waitForIdle()
}

private fun UiDevice.testCall() {
wait(Until.hasObject(By.res("call_content")), 5_000)
wait(Until.hasObject(By.res("video_renderer")), 5_000)
waitForIdle()
}

private fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 5_000): UiObject2? {
if (wait(Until.hasObject(selector), timeout)) {
return findObject(selector)
}
return null
}

private fun getPermissionText(): String {
return when {
Build.VERSION.SDK_INT <= 28 -> "ALLOW"
Build.VERSION.SDK_INT == 29 -> "Allow only while using the app"
else -> "While using the app"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://github.com/GetStream/stream-video-android/blob/main/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.getstream.video.android.benchmark

import androidx.benchmark.macro.MacrobenchmarkScope
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.Until

internal fun MacrobenchmarkScope.dogfoodingScenarios() {
// -------------
// Authenticate
// -------------
device.authenticateAndNavigateToHome()

// -------------
// JoinCall
// -------------
device.navigateFromJoinCallToLobby()

// -------------
// Lobby
// -------------
device.navigateFromLobbyToCall()

// -------------
// Call
// -------------
device.testCall()
}

internal fun UiDevice.authenticateAndNavigateToHome() {
wait(Until.hasObject(By.res("authenticate")), 5_000)

// Click the Authenticate button and login.
waitForObject(By.res("authenticate"))?.click()

waitForIdle()
}

internal fun UiDevice.navigateFromJoinCallToLobby() {
wait(Until.hasObject(By.res("start_new_call")), 5_000)

// wait for the Join Call button and navigate to the lobby screen by clicking.
waitForObject(By.res("start_new_call"))?.click()

waitForIdle()
}

internal fun UiDevice.navigateFromLobbyToCall() {
waitForObject(By.text(getPermissionText()), 5_000)?.click()
waitForObject(By.text(getPermissionText()), 5_000)?.click()

wait(Until.hasObject(By.res("call_lobby")), 15_000)
wait(Until.hasObject(By.res("participant_video_renderer")), 15_000)

// wait for the Start Call button and navigate to the call screen by clicking.
waitForObject(By.res("start_call"), 15_000)?.click()

waitForIdle()
}

internal fun UiDevice.testCall() {
wait(Until.hasObject(By.res("call_content")), 5_000)
wait(Until.hasObject(By.res("video_renderer")), 5_000)
waitForIdle()
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,9 @@ class StartupBenchmarks {
},
measureBlock = {
startActivityAndWait()
device.waitForIdle()

// TODO Add interactions to wait for when your app is fully drawn.
// The app is fully drawn when Activity.reportFullyDrawn is called.
// For Jetpack Compose, you can use ReportDrawn, ReportDrawnWhen and ReportDrawnAfter
// from the AndroidX Activity library.

// Check the UiAutomator documentation for more information on how to
// interact with the app.
// https://d.android.com/training/testing/other-components/ui-automator
dogfoodingScenarios()
},
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2014-2023 Stream.io Inc. All rights reserved.
*
* Licensed under the Stream License;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://github.com/GetStream/stream-video-android/blob/main/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.getstream.video.android.benchmark

import android.os.Build
import androidx.test.uiautomator.BySelector
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiObject2
import androidx.test.uiautomator.Until

internal fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 5_000): UiObject2? {
if (wait(Until.hasObject(selector), timeout)) {
return findObject(selector)
}
return null
}

internal fun getPermissionText(): String {
return when {
Build.VERSION.SDK_INT <= 28 -> "ALLOW"
Build.VERSION.SDK_INT == 29 -> "Allow only while using the app"
else -> "While using the app"
}
}
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.compatibility.validator) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.wire) apply false
alias(libs.plugins.nexus) apply false
alias(libs.plugins.google.gms) apply false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ object Configuration {
const val targetSdk = 34
const val minSdk = 24
const val majorVersion = 0
const val minorVersion = 3
const val patchVersion = 4
const val minorVersion = 4
const val patchVersion = 0
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 9
const val versionCode = 10
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "io.getstream"
const val streamVideoCallGooglePlayVersion = "1.0.0"
const val streamVideoCallGooglePlayVersion = "1.0.1"
}
Loading

0 comments on commit 14d3085

Please sign in to comment.