Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Unified Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java

Issue 1820113003: Add Mic Toggle button to AppRTCDemo (Android). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
index 239988a97dfae85c80582c39c3db297876068726..21092227ccabd0a1cc8fdbde87b497b382701636 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
@@ -132,6 +132,7 @@ public class CallActivity extends Activity
private boolean isError;
private boolean callControlFragmentVisible = true;
private long callStartedTimeMs = 0;
+ private boolean micEnabled = true;
// Controls
private CallFragment callFragment;
@@ -337,6 +338,15 @@ public class CallActivity extends Activity
}
}
+ @Override
+ public boolean onToggleMic() {
+ if (peerConnectionClient != null) {
+ micEnabled = !micEnabled;
+ peerConnectionClient.setAudioEnabled(micEnabled);
+ }
+ return micEnabled;
+ }
+
// Helper functions.
private void toggleCallControlFragmentVisibility() {
if (!iceConnected || !callFragment.isAdded()) {

Powered by Google App Engine
This is Rietveld 408576698