forked from mirror/monocles_chat_clean
set correct video state for calls
(cherry picked from commit ebb48e9320d07459d898556e3f48fca786b7201b)
This commit is contained in:
parent
f92504e2ab
commit
b0994a67d5
2 changed files with 12 additions and 6 deletions
|
@ -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);
|
||||
|
@ -1121,13 +1126,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;
|
||||
|
@ -2842,6 +2843,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