Skip to content

Commit aaaba24

Browse files
authored
Add getter methods for mid and paused in TrackLocalContext (webrtc-rs#640)
1 parent 7bd5114 commit aaaba24

File tree

1 file changed

+10
-0
lines changed
  • webrtc/src/track/track_local

1 file changed

+10
-0
lines changed

webrtc/src/track/track_local/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ impl TrackLocalContext {
8686
pub fn id(&self) -> String {
8787
self.id.clone()
8888
}
89+
90+
/// mid returns the id of media associated with the RTP stream
91+
pub fn mid(&self) -> Option<SmolStr> {
92+
self.mid.clone()
93+
}
94+
95+
/// paused returns a boolean indicating whether the track is currently paused
96+
pub fn paused(&self) -> Arc<AtomicBool> {
97+
self.paused.clone()
98+
}
8999
}
90100
/// TrackLocal is an interface that controls how the user can send media
91101
/// The user can provide their own TrackLocal implementations, or use

0 commit comments

Comments
 (0)