switch audio device when switching to video
This commit is contained in:
parent
ebb48e9320
commit
6ba9208eea
|
@ -145,6 +145,13 @@ public class CallIntegration extends Connection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAudioDeviceWhenAvailable(final AudioDevice audioDevice) {
|
||||||
|
final var available = getAudioDevices();
|
||||||
|
if (available.contains(audioDevice)) {
|
||||||
|
this.setAudioDevice(audioDevice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
@RequiresApi(api = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||||
private Set<AudioDevice> getAudioDevicesUpsideDownCake() {
|
private Set<AudioDevice> getAudioDevicesUpsideDownCake() {
|
||||||
return ImmutableSet.copyOf(
|
return ImmutableSet.copyOf(
|
||||||
|
|
|
@ -2610,6 +2610,8 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
||||||
private void modifyLocalContentMap(final RtpContentMap rtpContentMap) {
|
private void modifyLocalContentMap(final RtpContentMap rtpContentMap) {
|
||||||
final RtpContentMap activeContents = rtpContentMap.activeContents();
|
final RtpContentMap activeContents = rtpContentMap.activeContents();
|
||||||
setLocalContentMap(activeContents);
|
setLocalContentMap(activeContents);
|
||||||
|
this.callIntegration.setAudioDeviceWhenAvailable(
|
||||||
|
CallIntegration.initialAudioDevice(activeContents.getMedia()));
|
||||||
updateEndUserState();
|
updateEndUserState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue