diff options
-rw-r--r-- | client-native-rift/src/main.rs | 38 | ||||
-rw-r--r-- | todo.org | 8 |
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(); + } }) }) } @@ -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] |