Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop' into feature/rahullohra/enable_tran…
Browse files Browse the repository at this point in the history
…scriptions_in_demo_app

# Conflicts:
#	demo-app/src/main/kotlin/io/getstream/video/android/ui/call/CallScreen.kt
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt
  • Loading branch information
rahul-lohra committed Dec 18, 2024
2 parents 6a65116 + a048ff9 commit c8234aa
Show file tree
Hide file tree
Showing 38 changed files with 6,037 additions and 2,467 deletions.
32 changes: 11 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,35 +147,25 @@ Video roadmap and changelog is available [here](https://github.com/GetStream/pro
- [X] Improve Compose UI SDK performance by marking WebRTC models as stable.
- [X] Development token to support a development environment

### 1.0.0 milestone - April
### 1.0.0 milestone

- [X] Blur & AI video filters
- [X] Analytics and stats for calls
- [X] New `StreamCallActivity` for easier integration

### 1.1.0 milestone - June
### 1.1.0 milestone
- [X] Noise cancelling support
- [X] Session timers
- [X] Transcriptions
- [X] Manual quality selection

- [ ] Android Telecom framework integration
- [ ] Noise cancelling support
- [ ] Waiting rooms
- [ ] Session timers
- [ ] Closed Captions and multi language support for transcriptions

### After 1.1 release
### After 1.1.x release
- [ ] Test coverage
- [ ] Dynascale 2.0 (depending backend support)
- [ ] Testing on more devices
- [ ] Support for closed captions
- [ ] Android Telecom framework integration
- [ ] Codec negotiation
- [ ] Setup testing infrastructure (more devices)
- [ ] Camera controls
- [ ] Tap to focus
- [ ] Breakout rooms


### Dynascale 2.0

- currently we support selecting which of the 3 layers you want to send: f, h and q. in addition we should support:
- changing the resolution of the f track
- changing the codec that's used from VP8 to h264 or vice versa
- detecting when webrtc changes the resolution of the f track, and notifying the server about it (if needed)

## 💼 We are hiring!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ object Configuration {
const val targetSdk = 35
const val minSdk = 24
const val majorVersion = 1
const val minorVersion = 0
const val patchVersion = 20
const val minorVersion = 1
const val patchVersion = 0
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 43
const val versionCode = 44
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "io.getstream"
const val streamVideoCallGooglePlayVersion = "1.1.14"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import androidx.compose.material.icons.filled.RadioButtonChecked
import androidx.compose.material.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateListOf
Expand Down Expand Up @@ -95,6 +94,7 @@ import io.getstream.video.android.compose.ui.components.video.VideoScalingType
import io.getstream.video.android.core.Call
import io.getstream.video.android.core.RealtimeConnection
import io.getstream.video.android.core.call.state.ChooseLayout
import io.getstream.video.android.core.model.PreferredVideoResolution
import io.getstream.video.android.core.utils.isEnabled
import io.getstream.video.android.filters.video.BlurredBackgroundVideoFilter
import io.getstream.video.android.filters.video.VirtualBackgroundVideoFilter
Expand Down Expand Up @@ -154,9 +154,13 @@ fun CallScreen(
val messageScope = rememberCoroutineScope()
var showingLandscapeControls by remember { mutableStateOf(false) }
var preferredScaleType by remember { mutableStateOf(VideoScalingType.SCALE_ASPECT_FILL) }
var selectedIncomingVideoResolution by remember {
mutableStateOf<PreferredVideoResolution?>(null)
}
var isIncomingVideoEnabled by remember { mutableStateOf(true) }

val connection by call.state.connection.collectAsStateWithLifecycle()
val me by call.state.me.collectAsState()
val me by call.state.me.collectAsStateWithLifecycle()

LaunchedEffect(key1 = connection) {
if (connection == RealtimeConnection.Disconnected) {
Expand Down Expand Up @@ -363,8 +367,7 @@ fun CallScreen(
)
},
floatingVideoRenderer = { _, _ ->
val myself = me ?: participantsSize.firstOrNull { it.sessionId == call.sessionId }
myself?.let {
me?.let {
FloatingParticipantVideo(
call = call,
participant = it,
Expand Down Expand Up @@ -532,6 +535,23 @@ fun CallScreen(
onNoiseCancellation = {
isNoiseCancellationEnabled = call.toggleAudioProcessing()
},
selectedIncomingVideoResolution = selectedIncomingVideoResolution,
onSelectIncomingVideoResolution = {
call.setIncomingVideoEnabled(true)
isIncomingVideoEnabled = true

call.setPreferredIncomingVideoResolution(it)
selectedIncomingVideoResolution = it

isShowingSettingMenu = false
},
isIncomingVideoEnabled = isIncomingVideoEnabled,
onToggleIncomingVideoVisibility = {
call.setIncomingVideoEnabled(it)
isIncomingVideoEnabled = it

isShowingSettingMenu = false
},
onSelectScaleType = {
preferredScaleType = it
isShowingSettingMenu = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ import androidx.compose.material.icons.filled.SwitchLeft
import androidx.compose.material.icons.filled.VideoFile
import androidx.compose.material.icons.filled.VideoLibrary
import androidx.compose.material.icons.filled.VideoSettings
import androidx.compose.material.icons.filled.Videocam
import androidx.compose.material.icons.filled.VideocamOff
import io.getstream.video.android.compose.ui.components.video.VideoScalingType
import io.getstream.video.android.core.audio.StreamAudioDevice
import io.getstream.video.android.core.model.PreferredVideoResolution
import io.getstream.video.android.ui.menu.base.ActionMenuItem
import io.getstream.video.android.ui.menu.base.DynamicSubMenuItem
import io.getstream.video.android.ui.menu.base.MenuItem
Expand All @@ -69,6 +72,10 @@ fun defaultStreamMenu(
onSwitchSfuClick: () -> Unit,
onShowFeedback: () -> Unit,
onNoiseCancellation: () -> Unit,
selectedIncomingVideoResolution: PreferredVideoResolution?,
onSelectIncomingVideoResolution: (PreferredVideoResolution?) -> Unit,
isIncomingVideoEnabled: Boolean,
onToggleIncomingVideoEnabled: (Boolean) -> Unit,
onDeviceSelected: (StreamAudioDevice) -> Unit,
onSfuRejoinClick: () -> Unit,
onSfuFastReconnectClick: () -> Unit,
Expand Down Expand Up @@ -136,6 +143,65 @@ fun defaultStreamMenu(
),
)
}
add(
SubMenuItem(
title = "Incoming video settings",
icon = Icons.Default.VideoSettings,
items = listOf(
ActionMenuItem(
title = "Auto Quality",
icon = Icons.Default.AspectRatio,
highlight = selectedIncomingVideoResolution == null,
action = { onSelectIncomingVideoResolution(null) },
),
ActionMenuItem(
title = "4K 2160p",
icon = Icons.Default.AspectRatio,
highlight = selectedIncomingVideoResolution == PreferredVideoResolution(3840, 2160),
action = {
onSelectIncomingVideoResolution(PreferredVideoResolution(3840, 2160))
},
),
ActionMenuItem(
title = "Full HD 1080p",
icon = Icons.Default.AspectRatio,
highlight = selectedIncomingVideoResolution == PreferredVideoResolution(1920, 1080),
action = {
onSelectIncomingVideoResolution(PreferredVideoResolution(1920, 1080))
},
),
ActionMenuItem(
title = "HD 720p",
icon = Icons.Default.AspectRatio,
highlight = selectedIncomingVideoResolution == PreferredVideoResolution(1280, 720),
action = {
onSelectIncomingVideoResolution(PreferredVideoResolution(1280, 720))
},
),
ActionMenuItem(
title = "SD 480p",
icon = Icons.Default.AspectRatio,
highlight = selectedIncomingVideoResolution == PreferredVideoResolution(640, 480),
action = {
onSelectIncomingVideoResolution(PreferredVideoResolution(640, 480))
},
),
ActionMenuItem(
title = "Data Saver 144p",
icon = Icons.Default.AspectRatio,
highlight = selectedIncomingVideoResolution == PreferredVideoResolution(256, 144),
action = {
onSelectIncomingVideoResolution(PreferredVideoResolution(256, 144))
},
),
ActionMenuItem(
title = if (isIncomingVideoEnabled) "Disable incoming video" else "Enable incoming video",
icon = if (isIncomingVideoEnabled) Icons.Default.VideocamOff else Icons.Default.Videocam,
action = { onToggleIncomingVideoEnabled(!isIncomingVideoEnabled) },
),
),
),
)
if (showDebugOptions) {
add(
SubMenuItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import io.getstream.video.android.compose.ui.components.video.VideoScalingType
import io.getstream.video.android.core.Call
import io.getstream.video.android.core.call.audio.InputAudioFilter
import io.getstream.video.android.core.mapper.ReactionMapper
import io.getstream.video.android.core.model.PreferredVideoResolution
import io.getstream.video.android.tooling.extensions.toPx
import io.getstream.video.android.ui.call.ReactionsMenu
import io.getstream.video.android.ui.menu.base.ActionMenuItem
Expand All @@ -76,6 +77,10 @@ internal fun SettingsMenu(
onSelectVideoFilter: (Int) -> Unit,
onShowFeedback: () -> Unit,
onNoiseCancellation: () -> Unit,
selectedIncomingVideoResolution: PreferredVideoResolution?,
onSelectIncomingVideoResolution: (PreferredVideoResolution?) -> Unit,
isIncomingVideoEnabled: Boolean,
onToggleIncomingVideoVisibility: (Boolean) -> Unit,
onShowCallStats: () -> Unit,
onSelectScaleType: (VideoScalingType) -> Unit,
) {
Expand Down Expand Up @@ -279,6 +284,10 @@ internal fun SettingsMenu(
onSwitchSfuClick = onSwitchSfuClick,
onShowCallStats = onShowCallStats,
onNoiseCancellation = onNoiseCancellation,
selectedIncomingVideoResolution = selectedIncomingVideoResolution,
onSelectIncomingVideoResolution = { onSelectIncomingVideoResolution(it) },
isIncomingVideoEnabled = isIncomingVideoEnabled,
onToggleIncomingVideoEnabled = { onToggleIncomingVideoVisibility(it) },
onSfuRejoinClick = onSfuRejoinClick,
onSfuFastReconnectClick = onSfuFastReconnectClick,
isScreenShareEnabled = isScreenSharing,
Expand Down Expand Up @@ -349,6 +358,10 @@ private fun SettingsMenuPreview() {
onShowFeedback = {},
onSelectScaleType = {},
onNoiseCancellation = {},
selectedIncomingVideoResolution = null,
onSelectIncomingVideoResolution = {},
isIncomingVideoEnabled = true,
onToggleIncomingVideoEnabled = {},
loadRecordings = { emptyList() },
transcriptionUiState = TranscriptionAvailableUiState,
onToggleTranscription = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ private fun DynamicMenuPreview() {
onDeviceSelected = {},
onShowFeedback = {},
onNoiseCancellation = {},
selectedIncomingVideoResolution = null,
onSelectIncomingVideoResolution = {},
isIncomingVideoEnabled = true,
onToggleIncomingVideoEnabled = {},
onSelectScaleType = {},
loadRecordings = { emptyList() },
transcriptionUiState = TranscriptionAvailableUiState,
Expand Down Expand Up @@ -259,6 +263,10 @@ private fun DynamicMenuDebugOptionPreview() {
onShowFeedback = {},
onSelectScaleType = { },
onNoiseCancellation = {},
selectedIncomingVideoResolution = null,
onSelectIncomingVideoResolution = {},
isIncomingVideoEnabled = true,
onToggleIncomingVideoEnabled = {},
loadRecordings = { emptyList() },
transcriptionUiState = TranscriptionAvailableUiState,
onToggleTranscription = {},
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tink = "1.9.0"
turbine = "0.13.0"
itu = "1.7.3"

streamWebRTC = "1.2.2"
streamWebRTC = "1.3.4"
streamNoiseCancellation = "1.0.1"
streamResult = "1.3.0"
streamChat = "6.5.1"
Expand Down
Loading

0 comments on commit c8234aa

Please sign in to comment.