From 74939df430ba40e84cbb6c41243b9a16a82c6ff2 Mon Sep 17 00:00:00 2001 From: Dario A Lencina-Talarico Date: Fri, 13 Dec 2024 01:41:29 -0500 Subject: [PATCH] videocall-daemon: Modify readme to include link (#178) * save * save --- videocall-daemon/Cargo.lock | 2 +- videocall-daemon/Cargo.toml | 2 +- videocall-daemon/README.md | 3 ++- videocall-daemon/src/camera.rs | 2 +- videocall-daemon/src/main.rs | 14 ++++++++++++-- videocall-daemon/src/quic.rs | 10 +++++++++- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/videocall-daemon/Cargo.lock b/videocall-daemon/Cargo.lock index 3ea6aa5..2eb5862 100644 --- a/videocall-daemon/Cargo.lock +++ b/videocall-daemon/Cargo.lock @@ -3132,7 +3132,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "videocall-daemon" -version = "0.3.0" +version = "0.3.1" dependencies = [ "anyhow", "base64", diff --git a/videocall-daemon/Cargo.toml b/videocall-daemon/Cargo.toml index 2eb8d55..2a691bf 100644 --- a/videocall-daemon/Cargo.toml +++ b/videocall-daemon/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "videocall-daemon" -version = "0.3.0" +version = "0.3.1" edition = "2021" license = "MIT" readme = "README.md" diff --git a/videocall-daemon/README.md b/videocall-daemon/README.md index bf2546b..045f194 100644 --- a/videocall-daemon/README.md +++ b/videocall-daemon/README.md @@ -4,6 +4,7 @@ ## ✨ Features - Stream video effortlessly from your desktop/robot/rpi. - Works seamlessly with [videocall.rs](https://videocall.rs). +- Currently Supports Chrome, Chromium and Edge. - Compatible with **local servers** or **production environments**. --- @@ -37,7 +38,7 @@ videocall-daemon \ --fps 30 ``` -## 🌐 See Your Stream Live! +## 🌐 See Your Stream Live! using Chrome This system integrates directly with [videocall.rs](https://videocall.rs). Simply navigate to the following URL to watch your stream live: ``` diff --git a/videocall-daemon/src/camera.rs b/videocall-daemon/src/camera.rs index f254ef6..1c8feb3 100644 --- a/videocall-daemon/src/camera.rs +++ b/videocall-daemon/src/camera.rs @@ -122,7 +122,7 @@ impl CameraDaemon { .unwrap() ]; Ok(std::thread::spawn(move || { - info!("Camera opened... waiting for frames"); + debug!("Camera opened... waiting for frames"); let mut camera = Camera::new( CameraIndex::Index(video_device_index), RequestedFormat::new::(RequestedFormatType::Closest( diff --git a/videocall-daemon/src/main.rs b/videocall-daemon/src/main.rs index b22f6b7..2df2e94 100644 --- a/videocall-daemon/src/main.rs +++ b/videocall-daemon/src/main.rs @@ -1,6 +1,7 @@ use clap::Parser; use tokio::sync::mpsc::channel; +use tracing::level_filters::LevelFilter; use videocall_daemon::camera::{CameraConfig, CameraDaemon}; use videocall_daemon::microphone::MicrophoneDaemon; use videocall_daemon::quic::{Client, Opt}; @@ -9,7 +10,9 @@ use videocall_daemon::quic::{Client, Opt}; async fn main() { tracing::subscriber::set_global_default( tracing_subscriber::FmtSubscriber::builder() - .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .with_env_filter(tracing_subscriber::EnvFilter::builder() + .with_default_directive(LevelFilter::INFO.into()) + .from_env_lossy()) .finish(), ) .unwrap(); @@ -28,6 +31,7 @@ async fn main() { panic!("invalid framerate: {}", framerate); } let user_id = opt.user_id.clone(); + let meeting_id = opt.meeting_id.clone(); let video_device_index = opt.video_device_index; let audio_device = opt.audio_device.clone(); let mut client = Client::new(opt); @@ -46,9 +50,15 @@ async fn main() { let mut microphone = MicrophoneDaemon::default(); if let Some(audio_device) = audio_device { microphone - .start(quic_tx, audio_device, user_id) + .start(quic_tx, audio_device, user_id.clone()) .expect("failed to start microphone"); } + + tracing::info!( + "If you used the default url, the stream is ready at https://app.videocall.rs with meeting id:{} \n** warning: use Chrome or Chromium \n** warning: do no reuse the username {}", + meeting_id, + user_id + ); while let Some(data) = quic_rx.recv().await { if let Err(e) = client.send_packet(data).await { tracing::error!("Failed to send packet: {}", e); diff --git a/videocall-daemon/src/quic.rs b/videocall-daemon/src/quic.rs index 5a871c4..3ffc53f 100644 --- a/videocall-daemon/src/quic.rs +++ b/videocall-daemon/src/quic.rs @@ -17,6 +17,14 @@ use videocall_types::protos::{ packet_wrapper::{packet_wrapper::PacketType, PacketWrapper}, }; + + +/// Video Call Daemon +/// +/// This daemon connects to the videocall.rs and streams audio and video to the specified meeting. +/// +/// You can watch the video at https://videocall.rs/meeting/{user_id}/{meeting_id} + #[derive(Parser, Debug)] #[clap(name = "client")] pub struct Opt { @@ -32,7 +40,7 @@ pub struct Opt { pub user_id: String, #[clap(long = "meeting-id")] - meeting_id: String, + pub meeting_id: String, #[clap(long = "video-device-index")] pub video_device_index: usize,