mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 04:20:00 +03:00
Merge pull request #2104 from ginnyTheCat/develop
Only front camera is mirrored now
This commit is contained in:
commit
94a7db26f5
2 changed files with 6 additions and 1 deletions
|
@ -11,6 +11,7 @@ Improvements 🙌:
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
- Clear the notification when the event is read elsewhere (#1822)
|
- Clear the notification when the event is read elsewhere (#1822)
|
||||||
- Speakerphone is not used for ringback tone (#1644, #1645)
|
- Speakerphone is not used for ringback tone (#1644, #1645)
|
||||||
|
- Back camera preview is not mirrored anymore (#1776)
|
||||||
- Various report of people that cannot play video (#2107)
|
- Various report of people that cannot play video (#2107)
|
||||||
|
|
||||||
Translations 🗣:
|
Translations 🗣:
|
||||||
|
|
|
@ -503,7 +503,7 @@ class WebRtcPeerConnectionManager @Inject constructor(
|
||||||
// render local video in pip view
|
// render local video in pip view
|
||||||
localSurfaceRenderer.forEach {
|
localSurfaceRenderer.forEach {
|
||||||
it.get()?.let { pipSurface ->
|
it.get()?.let { pipSurface ->
|
||||||
pipSurface.setMirror(true)
|
pipSurface.setMirror(this.cameraInUse?.type == CameraType.FRONT)
|
||||||
// no need to check if already added, addSink is checking that
|
// no need to check if already added, addSink is checking that
|
||||||
currentCall?.localVideoTrack?.addSink(pipSurface)
|
currentCall?.localVideoTrack?.addSink(pipSurface)
|
||||||
}
|
}
|
||||||
|
@ -740,6 +740,10 @@ class WebRtcPeerConnectionManager @Inject constructor(
|
||||||
override fun onCameraSwitchDone(isFrontCamera: Boolean) {
|
override fun onCameraSwitchDone(isFrontCamera: Boolean) {
|
||||||
Timber.v("## VOIP onCameraSwitchDone isFront $isFrontCamera")
|
Timber.v("## VOIP onCameraSwitchDone isFront $isFrontCamera")
|
||||||
cameraInUse = availableCamera.first { if (isFrontCamera) it.type == CameraType.FRONT else it.type == CameraType.BACK }
|
cameraInUse = availableCamera.first { if (isFrontCamera) it.type == CameraType.FRONT else it.type == CameraType.BACK }
|
||||||
|
localSurfaceRenderer.forEach {
|
||||||
|
it.get()?.setMirror(isFrontCamera)
|
||||||
|
}
|
||||||
|
|
||||||
currentCallsListeners.forEach {
|
currentCallsListeners.forEach {
|
||||||
tryThis { it.onCameraChange(this@WebRtcPeerConnectionManager) }
|
tryThis { it.onCameraChange(this@WebRtcPeerConnectionManager) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue