aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-12-27 16:20:36 +0100
committermetamuffin <metamuffin@disroot.org>2022-12-27 16:20:36 +0100
commit67694f908f7fc76f78566e6f02d89db2d7a19c1d (patch)
tree15e740b806144616e17d70dd0a53becb3c17c237
parentc2e6a4f002be8a687038e3d2cff836d43275617f (diff)
downloadkeks-meet-67694f908f7fc76f78566e6f02d89db2d7a19c1d.tar
keks-meet-67694f908f7fc76f78566e6f02d89db2d7a19c1d.tar.bz2
keks-meet-67694f908f7fc76f78566e6f02d89db2d7a19c1d.tar.zst
rift: handle control messages
-rw-r--r--client-native-rift/src/main.rs38
-rw-r--r--todo.org8
2 files changed, 27 insertions, 19 deletions
diff --git a/client-native-rift/src/main.rs b/client-native-rift/src/main.rs
index 5d0c7d6..45f720a 100644
--- a/client-native-rift/src/main.rs
+++ b/client-native-rift/src/main.rs
@@ -192,21 +192,29 @@ impl EventHandler for Handler {
let writer = writer.clone();
let pos = pos.clone();
Box::pin(async move {
- let pos = pos.fetch_add(mesg.data.len(), Ordering::Relaxed);
- info!(
- "recv {:?} ({} of {})",
- mesg.data.len(),
- humansize::format_size(pos, DECIMAL),
- humansize::format_size(resource.size.unwrap_or(0), DECIMAL),
- );
- writer
- .write()
- .await
- .as_mut()
- .unwrap()
- .write_all(&mesg.data)
- .await
- .unwrap();
+ // TODO
+ if mesg.is_string {
+ let s = String::from_utf8((&mesg.data).to_vec()).unwrap();
+ if &s == "end" {
+ info!("EOF reached")
+ }
+ } else {
+ let pos = pos.fetch_add(mesg.data.len(), Ordering::Relaxed);
+ info!(
+ "recv {:?} ({} of {})",
+ mesg.data.len(),
+ humansize::format_size(pos, DECIMAL),
+ humansize::format_size(resource.size.unwrap_or(0), DECIMAL),
+ );
+ writer
+ .write()
+ .await
+ .as_mut()
+ .unwrap()
+ .write_all(&mesg.data)
+ .await
+ .unwrap();
+ }
})
})
}
diff --git a/todo.org b/todo.org
index 592cc77..16e0772 100644
--- a/todo.org
+++ b/todo.org
@@ -4,12 +4,12 @@
* client-web
-** TODO mute
-** TODO voice activity indicators
-** TODO fix tabbing order for chat
+** DONE mute
+** DONE voice activity indicators
+** ABANDONED fix tabbing order for chat
** TODO Make the optional streams UI prettier
** ABANDONED Maybe group tracks in streams to make sure everything is in sync
-** How do we implement global hotkeys?
+** ABANDONED How do we implement global hotkeys?
** ABANDONED Dont use websocket to send images to not block anything else
** PARTIAL File transfers via data channel (rift)
CLOSED: [2022-10-28 Fri 21:48]