Struct medea_client_api_proto::TrackPatchEvent
source · pub struct TrackPatchEvent {
pub id: TrackId,
pub media_direction: Option<MediaDirection>,
pub receivers: Option<Vec<MemberId>>,
pub muted: Option<bool>,
}
Expand description
Patch of a Track
which Media Server can send with an
Event::PeerUpdated
.
Fields§
§id: TrackId
ID of the Track
which should be patched.
media_direction: Option<MediaDirection>
General media exchange direction of the Track
.
receivers: Option<Vec<MemberId>>
IDs of the Member
s who should receive this outgoing Track
.
If Some
, then it means there are some changes in this outgoing
Track
’s receivers
(or we just want to sync this outgoing
Track
’s receivers
). It describes not changes, but the actual
Vec<MemberId>
of this outgoing Track
, that have to be reached
once this TrackPatchEvent
applied.
If None
, then it means there is no need to check and recalculate
this outgoing Track
’s receivers
.
muted: Option<bool>
Track
’s mute state.
Muting and unmuting can be performed without adding/removing tracks from transceivers, hence renegotiation is not required.
Implementations§
source§impl TrackPatchEvent
impl TrackPatchEvent
sourcepub const fn new(id: TrackId) -> Self
pub const fn new(id: TrackId) -> Self
Returns a new empty TrackPatchEvent
with the provided TrackId
.
sourcepub fn merge(&mut self, another: &Self)
pub fn merge(&mut self, another: &Self)
Merges this TrackPatchEvent
with the provided one.
Does nothing if TrackId
of this TrackPatchEvent
and the
provided TrackPatchEvent
are different.
Trait Implementations§
source§impl Clone for TrackPatchEvent
impl Clone for TrackPatchEvent
source§fn clone(&self) -> TrackPatchEvent
fn clone(&self) -> TrackPatchEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TrackPatchEvent
impl Debug for TrackPatchEvent
source§impl<'de> Deserialize<'de> for TrackPatchEvent
impl<'de> Deserialize<'de> for TrackPatchEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl From<TrackPatchCommand> for TrackPatchEvent
impl From<TrackPatchCommand> for TrackPatchEvent
source§fn from(from: TrackPatchCommand) -> Self
fn from(from: TrackPatchCommand) -> Self
source§impl PartialEq<TrackPatchEvent> for TrackPatchEvent
impl PartialEq<TrackPatchEvent> for TrackPatchEvent
source§fn eq(&self, other: &TrackPatchEvent) -> bool
fn eq(&self, other: &TrackPatchEvent) -> bool
self
and other
values to be equal, and is used
by ==
.