1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
extern crate opentok;
use opentok::log::{self, LogLevel};
use opentok_utils::publisher::Publisher;
#[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);
Publisher::new(credentials, None, duration).run()?;
Ok(opentok::deinit()?)
}