aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/call_peer_state.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-12-20 00:15:05 +0100
committerfiaxh <git@lightrise.org>2021-12-23 00:19:26 +0100
commitf0c7dd0682fec8d72c644d8e54896de7bdc40ddb (patch)
tree0e275aa1fab7004cef7c92e16721d493b18bf8b6 /libdino/src/service/call_peer_state.vala
parentff4e2540ae3bfab6873beb7e03ef5c6a5b9da1da (diff)
downloaddino-f0c7dd0682fec8d72c644d8e54896de7bdc40ddb.tar.gz
dino-f0c7dd0682fec8d72c644d8e54896de7bdc40ddb.zip
UI + libdino: Improve MUJI calls from MUC
- Move calls from ICE-thead onto main thread - Identify Call.ourpart as MUC nick if in MUC - Keep track of the initiator of a call
Diffstat (limited to 'libdino/src/service/call_peer_state.vala')
-rw-r--r--libdino/src/service/call_peer_state.vala14
1 files changed, 10 insertions, 4 deletions
diff --git a/libdino/src/service/call_peer_state.vala b/libdino/src/service/call_peer_state.vala
index 8c4b0930..09440371 100644
--- a/libdino/src/service/call_peer_state.vala
+++ b/libdino/src/service/call_peer_state.vala
@@ -127,8 +127,6 @@ public class Dino.PeerState : Object {
}
public void reject() {
- call.state = Call.State.DECLINED;
-
if (session != null) {
foreach (Xep.Jingle.Content content in session.contents) {
content.reject();
@@ -299,7 +297,12 @@ public class Dino.PeerState : Object {
debug(@"[%s] %s connecting content signals %s", call.account.bare_jid.to_string(), jid.to_string(), rtp_content_parameter.media);
rtp_content_parameter.stream_created.connect((stream) => on_stream_created(rtp_content_parameter.media, stream));
- rtp_content_parameter.connection_ready.connect((status) => on_connection_ready(content, rtp_content_parameter.media));
+ rtp_content_parameter.connection_ready.connect((status) => {
+ Idle.add(() => {
+ on_connection_ready(content, rtp_content_parameter.media);
+ return false;
+ });
+ });
content.senders_modify_incoming.connect((content, proposed_senders) => {
if (content.session.senders_include_us(content.senders) != content.session.senders_include_us(proposed_senders)) {
@@ -342,7 +345,10 @@ public class Dino.PeerState : Object {
if (media == "video" && stream.receiving) {
counterpart_sends_video = true;
video_content_parameter.connection_ready.connect((status) => {
- counterpart_sends_video_updated(false);
+ Idle.add(() => {
+ counterpart_sends_video_updated(false);
+ return false;
+ });
});
}