set correct video state for calls
This commit is contained in:
parent
6975299a28
commit
ebb48e9320
|
@ -1,5 +1,6 @@
|
|||
package eu.siacs.conversations.xmpp.jingle;
|
||||
|
||||
import android.telecom.VideoProfile;
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -732,6 +733,10 @@ public class JingleConnectionManager extends AbstractConnectionManager {
|
|||
}
|
||||
final CallIntegration callIntegration =
|
||||
new CallIntegration(mXmppConnectionService.getApplicationContext());
|
||||
callIntegration.setVideoState(
|
||||
Media.audioOnly(media)
|
||||
? VideoProfile.STATE_AUDIO_ONLY
|
||||
: VideoProfile.STATE_BIDIRECTIONAL);
|
||||
callIntegration.setInitialAudioDevice(CallIntegration.initialAudioDevice(media));
|
||||
final RtpSessionProposal proposal =
|
||||
RtpSessionProposal.of(account, with.asBareJid(), media, callIntegration);
|
||||
|
@ -1111,13 +1116,9 @@ public class JingleConnectionManager extends AbstractConnectionManager {
|
|||
Set<CallIntegration.AudioDevice> availableAudioDevices) {}
|
||||
|
||||
@Override
|
||||
public void onCallIntegrationReject() {
|
||||
|
||||
}
|
||||
public void onCallIntegrationReject() {}
|
||||
|
||||
@Override
|
||||
public void onCallIntegrationAnswer() {
|
||||
|
||||
}
|
||||
public void onCallIntegrationAnswer() {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package eu.siacs.conversations.xmpp.jingle;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.telecom.TelecomManager;
|
||||
import android.telecom.VideoProfile;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -2838,6 +2839,10 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
|||
|
||||
void setProposedMedia(final Set<Media> media) {
|
||||
this.proposedMedia = media;
|
||||
this.callIntegration.setVideoState(
|
||||
Media.audioOnly(media)
|
||||
? VideoProfile.STATE_AUDIO_ONLY
|
||||
: VideoProfile.STATE_BIDIRECTIONAL);
|
||||
this.callIntegration.setInitialAudioDevice(CallIntegration.initialAudioDevice(media));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue