Events: Add SsrcKnown event
Knowing your own SSRC is useful for handling RTCP packets, which may detail information about *ourselves* rather than another host. In theory, at least: this confirms that Discord just sends ReceiverReports containing your own packet stats. This would have been better to fit into Driver(Re)Connect, but that would be a breaking change: when this change is made, `SsrcKnown` shall be deprecated.
This commit is contained in:
@@ -7,6 +7,7 @@ use super::{
|
||||
};
|
||||
use crate::{
|
||||
constants::*,
|
||||
events::CoreContext,
|
||||
model::{
|
||||
payload::{Identify, Resume, SelectProtocol},
|
||||
Event as GatewayEvent,
|
||||
@@ -195,6 +196,10 @@ impl Connection {
|
||||
.mixer
|
||||
.send(MixerMessage::SetConn(mix_conn, ready.ssrc))?;
|
||||
|
||||
let _ = interconnect
|
||||
.events
|
||||
.send(EventMessage::FireCoreEvent(CoreContext::SsrcKnown(ssrc)));
|
||||
|
||||
spawn(ws_task::runner(
|
||||
interconnect.clone(),
|
||||
ws_msg_rx,
|
||||
|
||||
Reference in New Issue
Block a user