mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 17:08:34 +03:00
Add ability to fetch external signaling settings
This commit is contained in:
parent
eea7f7ebfe
commit
dc16c7b91d
3 changed files with 11 additions and 12 deletions
|
@ -461,7 +461,7 @@ public class CallController extends BaseController {
|
|||
}
|
||||
|
||||
if (!inCall) {
|
||||
startCall();
|
||||
fetchSignalingSettings();
|
||||
}
|
||||
} else if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(),
|
||||
PERMISSIONS_CALL)) {
|
||||
|
@ -500,7 +500,7 @@ public class CallController extends BaseController {
|
|||
}
|
||||
|
||||
if (!inCall) {
|
||||
startCall();
|
||||
fetchSignalingSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ public class CallController extends BaseController {
|
|||
EffortlessPermissions.hasPermissions(getActivity(), PERMISSIONS_MICROPHONE))) {
|
||||
checkIfSomeAreApproved();
|
||||
} else if (!inCall) {
|
||||
startCall();
|
||||
fetchSignalingSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -652,7 +652,7 @@ public class CallController extends BaseController {
|
|||
}
|
||||
|
||||
if (isVoiceOnlyCall && !inCall) {
|
||||
startCall();
|
||||
fetchSignalingSettings();
|
||||
}
|
||||
|
||||
} 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) {
|
||||
if (isVoiceOnlyCall) {
|
||||
|
@ -878,7 +875,7 @@ public class CallController extends BaseController {
|
|||
super.onDestroy();
|
||||
}
|
||||
|
||||
private void startPullingSignalingMessages() {
|
||||
private void fetchSignalingSettings() {
|
||||
leavingCall = false;
|
||||
|
||||
ncApi.getSignalingSettings(credentials, ApiUtils.getUrlForSignalingSettings(baseUrl))
|
||||
|
|
|
@ -35,4 +35,10 @@ public class Settings {
|
|||
|
||||
@JsonField(name = "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.tinder.scarlet.Scarlet;
|
||||
import com.tinder.scarlet.messageadapter.moshi.MoshiMessageAdapter;
|
||||
import com.tinder.scarlet.retry.ExponentialBackoffStrategy;
|
||||
import com.tinder.scarlet.retry.LinearBackoffStrategy;
|
||||
import com.tinder.scarlet.streamadapter.rxjava2.RxJava2StreamAdapterFactory;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
|
Loading…
Reference in a new issue