diff --git a/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java b/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java index a29c53ab..9904eb8a 100644 --- a/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java +++ b/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java @@ -767,6 +767,20 @@ public void toggleRemoteAudio(boolean enabled) { } } + public void setRemoteAudioPlayback(String participant, boolean enabled) { + if (room != null) { + for (RemoteParticipant rp : room.getRemoteParticipants()) { + if (rp.getSid().equals(participant)) { + for (AudioTrackPublication at : rp.getAudioTracks()) { + if (at.getAudioTrack() != null) { + ((RemoteAudioTrack) at.getAudioTrack()).enablePlayback(enabled); + } + } + } + } + } + } + public void publishLocalVideo(boolean enabled) { if (localParticipant != null && localVideoTrack != null) { if (enabled) { diff --git a/android/src/main/java/com/twiliorn/library/CustomTwilioVideoViewManager.java b/android/src/main/java/com/twiliorn/library/CustomTwilioVideoViewManager.java index 3705059f..f28bbd00 100644 --- a/android/src/main/java/com/twiliorn/library/CustomTwilioVideoViewManager.java +++ b/android/src/main/java/com/twiliorn/library/CustomTwilioVideoViewManager.java @@ -60,6 +60,7 @@ public class CustomTwilioVideoViewManager extends SimpleViewManager