mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-02-16 02:20:43 +00:00
Update examples/webrtc.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -17,16 +17,19 @@ use tokio::time::Duration;
|
|||||||
#[cfg(feature = "webrtc")]
|
#[cfg(feature = "webrtc")]
|
||||||
use webrtc::peer_connection::math_rand_alpha;
|
use webrtc::peer_connection::math_rand_alpha;
|
||||||
|
|
||||||
|
#[cfg(not(feature = "webrtc"))]
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
#[cfg(not(feature = "webrtc"))]
|
|
||||||
if true {
|
|
||||||
println!(
|
println!(
|
||||||
"The webrtc feature is not enabled. \
|
"The webrtc feature is not enabled. \
|
||||||
Please enable the webrtc feature to run this example."
|
Please enable the webrtc feature to run this example."
|
||||||
);
|
);
|
||||||
return Ok(());
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "webrtc")]
|
||||||
|
#[tokio::main]
|
||||||
|
async fn main() -> Result<()> {
|
||||||
let app = Command::new("webrtc-stream")
|
let app = Command::new("webrtc-stream")
|
||||||
.about("An example of webrtc stream using hbb_common and webrtc-rs")
|
.about("An example of webrtc stream using hbb_common and webrtc-rs")
|
||||||
.arg(
|
.arg(
|
||||||
|
|||||||
Reference in New Issue
Block a user