mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Add ability to fetch external signaling settings
This commit is contained in:
parent
eea7f7ebfe
commit
dc16c7b91d
@ -461,7 +461,7 @@ public class CallController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!inCall) {
|
if (!inCall) {
|
||||||
startCall();
|
fetchSignalingSettings();
|
||||||
}
|
}
|
||||||
} else if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(),
|
} else if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(),
|
||||||
PERMISSIONS_CALL)) {
|
PERMISSIONS_CALL)) {
|
||||||
@ -500,7 +500,7 @@ public class CallController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!inCall) {
|
if (!inCall) {
|
||||||
startCall();
|
fetchSignalingSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ public class CallController extends BaseController {
|
|||||||
EffortlessPermissions.hasPermissions(getActivity(), PERMISSIONS_MICROPHONE))) {
|
EffortlessPermissions.hasPermissions(getActivity(), PERMISSIONS_MICROPHONE))) {
|
||||||
checkIfSomeAreApproved();
|
checkIfSomeAreApproved();
|
||||||
} else if (!inCall) {
|
} else if (!inCall) {
|
||||||
startCall();
|
fetchSignalingSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -652,7 +652,7 @@ public class CallController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isVoiceOnlyCall && !inCall) {
|
if (isVoiceOnlyCall && !inCall) {
|
||||||
startCall();
|
fetchSignalingSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(),
|
} else if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(),
|
||||||
@ -780,9 +780,6 @@ public class CallController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startCall() {
|
|
||||||
startPullingSignalingMessages();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void animateCallControls(boolean show, long startDelay) {
|
private void animateCallControls(boolean show, long startDelay) {
|
||||||
if (isVoiceOnlyCall) {
|
if (isVoiceOnlyCall) {
|
||||||
@ -878,7 +875,7 @@ public class CallController extends BaseController {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startPullingSignalingMessages() {
|
private void fetchSignalingSettings() {
|
||||||
leavingCall = false;
|
leavingCall = false;
|
||||||
|
|
||||||
ncApi.getSignalingSettings(credentials, ApiUtils.getUrlForSignalingSettings(baseUrl))
|
ncApi.getSignalingSettings(credentials, ApiUtils.getUrlForSignalingSettings(baseUrl))
|
||||||
|
@ -35,4 +35,10 @@ public class Settings {
|
|||||||
|
|
||||||
@JsonField(name = "turnservers")
|
@JsonField(name = "turnservers")
|
||||||
List<IceServer> turnServers;
|
List<IceServer> turnServers;
|
||||||
|
|
||||||
|
@JsonField(name = "server")
|
||||||
|
String externalSignalingServer;
|
||||||
|
|
||||||
|
@JsonField(name = "ticket")
|
||||||
|
String externalSignalingTicket;
|
||||||
}
|
}
|
||||||
|
@ -24,15 +24,11 @@ import com.nextcloud.talk.api.ExternalSignaling;
|
|||||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||||
import com.tinder.scarlet.Scarlet;
|
import com.tinder.scarlet.Scarlet;
|
||||||
import com.tinder.scarlet.messageadapter.moshi.MoshiMessageAdapter;
|
import com.tinder.scarlet.messageadapter.moshi.MoshiMessageAdapter;
|
||||||
import com.tinder.scarlet.retry.ExponentialBackoffStrategy;
|
|
||||||
import com.tinder.scarlet.retry.LinearBackoffStrategy;
|
import com.tinder.scarlet.retry.LinearBackoffStrategy;
|
||||||
import com.tinder.scarlet.streamadapter.rxjava2.RxJava2StreamAdapterFactory;
|
import com.tinder.scarlet.streamadapter.rxjava2.RxJava2StreamAdapterFactory;
|
||||||
import com.tinder.scarlet.websocket.okhttp.OkHttpClientUtils;
|
import com.tinder.scarlet.websocket.okhttp.OkHttpClientUtils;
|
||||||
import com.tinder.scarlet.websocket.okhttp.OkHttpWebSocket;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
Loading…
Reference in New Issue
Block a user