diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java
index 0168ca7..cf699b6 100644
--- a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java
+++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/CallActivity.java
@@ -119,6 +119,7 @@ public class CallActivity extends BaseActivity implements SignalExchangerCallbac
private LinearLayout mRemoteVideosLayout;
private SurfaceViewRenderer mLocalVideoView;
private View mButtonsView;
+ private ImageButton mSwitchCameraButton;
@Override
@@ -206,6 +207,8 @@ public class CallActivity extends BaseActivity implements SignalExchangerCallbac
mRemoteVideosLayout = findViewById(R.id.remoteVideosLayout);
mLocalVideoView = findViewById(R.id.local_video);
mButtonsView = findViewById(R.id.buttonsLayout);
+ mSwitchCameraButton = findViewById(R.id.switchCameraButton);
+ mSwitchCameraButton.setOnClickListener(v -> switchCamera());
}
@@ -459,6 +462,11 @@ public class CallActivity extends BaseActivity implements SignalExchangerCallbac
}
+ private void switchCamera(){
+ for(CallPeerConnection c : mList)
+ c.getPeerConnectionClient().switchCamera();
+ }
+
private void switchButtonsVisibility(){
boolean show = !getSupportActionBar().isShowing();
diff --git a/app/src/main/res/drawable/ic_camera_switch.xml b/app/src/main/res/drawable/ic_camera_switch.xml
new file mode 100644
index 0000000..7c50b54
--- /dev/null
+++ b/app/src/main/res/drawable/ic_camera_switch.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_call.xml b/app/src/main/res/layout/activity_call.xml
index d0307ed..54fb174 100644
--- a/app/src/main/res/layout/activity_call.xml
+++ b/app/src/main/res/layout/activity_call.xml
@@ -43,11 +43,11 @@
@@ -62,7 +62,23 @@
android:tint="@android:color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent" />
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 911a4cd..a0fba68 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -333,4 +333,5 @@
Impossible de connecter au signaling server !
Appel terminé.
Raccrocher
+ Changer de caméra
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7b474de..e578257 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -332,4 +332,5 @@
Could not connect to signaling server!
Call terminated
Hang up
+ Switch camera