Skip to content

Commit

Permalink
Add getter methods for mid and paused in TrackLocalContext (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
h3poteto authored Dec 5, 2024
1 parent 7bd5114 commit aaaba24
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions webrtc/src/track/track_local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ impl TrackLocalContext {
pub fn id(&self) -> String {
self.id.clone()
}

/// mid returns the id of media associated with the RTP stream
pub fn mid(&self) -> Option<SmolStr> {
self.mid.clone()
}

/// paused returns a boolean indicating whether the track is currently paused
pub fn paused(&self) -> Arc<AtomicBool> {
self.paused.clone()
}
}
/// TrackLocal is an interface that controls how the user can send media
/// The user can provide their own TrackLocal implementations, or use
Expand Down

0 comments on commit aaaba24

Please sign in to comment.