1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
extern crate opentok;
use opentok::log::{self, LogLevel};
use opentok::utils::subscriber::Subscriber;
#[path = "../cli.rs"]
mod cli;
#[async_std::main]
async fn main() -> anyhow::Result<()> {
let (credentials, duration) = cli::parse_cli().await?;
opentok::init()?;
log::enable_log(LogLevel::Error);
log::logger_callback(Box::new(|msg| {
println!("{:?}", msg);
}));
Subscriber::new(credentials, duration, None, None).run()?;
Ok(opentok::deinit()?)
}