Skip to content

Commit 480ff5c

Browse files
committed
add offered_media
1 parent 9f60cc6 commit 480ff5c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

media/rtc/src/sdp/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,15 @@ impl SdpSession {
452452
})
453453
}
454454

455+
pub fn offered_media(&self) -> impl Iterator<Item = &PendingMedia> {
456+
self.offered_changes
457+
.iter()
458+
.filter_map(|pending_change| match pending_change {
459+
PendingChange::AddMedia(pending_media) => Some(pending_media),
460+
_ => None,
461+
})
462+
}
463+
455464
/// Set the RTP/RTCP ports of a transport
456465
pub fn set_transport_ports(
457466
&mut self,

0 commit comments

Comments
 (0)