Attach speaking state update

This commit is contained in:
2023-03-13 20:56:37 -04:00
parent 632a115930
commit c7558645c2

View File

@@ -95,9 +95,6 @@ impl EventHandler for Receiver {
// An event which fires for every received rtcp packet,
// containing the call statistics and reporting information.
// println!("RTCP packet received: {:?}", data.packet);
},
Ctx::Client() => {
},
Ctx::ClientDisconnect(
ClientDisconnect {user_id, ..}
@@ -140,6 +137,11 @@ pub async fn join(ctx: Context, guild: Guild, cid: ChannelId) -> Option<Arc<Mute
{
let mut call = call.lock().await;
call.add_global_event(
CoreEvent::SpeakingStateUpdate.into(),
Receiver::new(call_handle.clone()),
);
call.add_global_event(
CoreEvent::SpeakingUpdate.into(),
Receiver::new(call_handle.clone()),