WIP: Start integrating with LiveKit when creating/joining rooms

This commit is contained in:
Antonio Scandurra 2022-10-17 12:20:55 +02:00
parent 75c339851f
commit c9225bb87c
9 changed files with 120 additions and 24 deletions

View file

@ -54,6 +54,21 @@ impl Client {
}
}
pub fn room_token_for_user(&self, room: &str, identity: &str) -> Result<String> {
token::create(
&self.key,
&self.secret,
Some(identity),
token::VideoGrant {
room: Some(room),
room_join: Some(true),
can_publish: Some(true),
can_subscribe: Some(true),
..Default::default()
},
)
}
fn request<Req, Res>(
&self,
path: &str,