use std::time;
use moq_transfork::Path;
use super::Broadcast;
pub struct Resumable {
path: Path,
}
impl Resumable {
pub fn new(path: Path) -> Self {
Self { path }
}
pub fn broadcast(&self) -> Broadcast {
let id = time::SystemTime::now()
.duration_since(time::UNIX_EPOCH)
.unwrap()
.as_secs();
let path = self.path.clone().push(id.to_string());
Broadcast::new(path)
}
}