mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-21 03:28:47 +00:00
Add callbacks to tiny local video renderer.
This commit is contained in:
@@ -462,6 +462,7 @@ private fun BoxScope.Viewport(
|
|||||||
spacerOffset.y.toDp()
|
spacerOffset.y.toDp()
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
onToggleCameraDirection = onToggleCameraDirection,
|
||||||
onClick = onPipClick
|
onClick = onPipClick
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -503,7 +504,8 @@ private fun TinyLocalVideoRenderer(
|
|||||||
localParticipant: CallParticipant,
|
localParticipant: CallParticipant,
|
||||||
localRenderState: WebRtcLocalRenderState,
|
localRenderState: WebRtcLocalRenderState,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
onClick: () -> Unit
|
onClick: () -> Unit,
|
||||||
|
onToggleCameraDirection: () -> Unit
|
||||||
) {
|
) {
|
||||||
val (smallSize, expandedSize, padding) = rememberTinyPortraitSize()
|
val (smallSize, expandedSize, padding) = rememberTinyPortraitSize()
|
||||||
val size = if (localRenderState == WebRtcLocalRenderState.EXPANDED) expandedSize else smallSize
|
val size = if (localRenderState == WebRtcLocalRenderState.EXPANDED) expandedSize else smallSize
|
||||||
@@ -528,7 +530,12 @@ private fun TinyLocalVideoRenderer(
|
|||||||
callParticipant = localParticipant,
|
callParticipant = localParticipant,
|
||||||
isLocalParticipant = true,
|
isLocalParticipant = true,
|
||||||
renderInPip = true,
|
renderInPip = true,
|
||||||
selfPipMode = CallParticipantView.SelfPipMode.MINI_SELF_PIP,
|
onToggleCameraDirection = onToggleCameraDirection,
|
||||||
|
selfPipMode = if (localRenderState == WebRtcLocalRenderState.EXPANDED) {
|
||||||
|
CallParticipantView.SelfPipMode.EXPANDED_SELF_PIP
|
||||||
|
} else {
|
||||||
|
CallParticipantView.SelfPipMode.MINI_SELF_PIP
|
||||||
|
},
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.padding(padding)
|
.padding(padding)
|
||||||
.height(height)
|
.height(height)
|
||||||
|
|||||||
Reference in New Issue
Block a user