Add LiveKit APIs for starting and stopping audio tracks
This commit is contained in:
parent
c2d56cd5f8
commit
aa50f69940
3 changed files with 25 additions and 11 deletions
|
@ -262,6 +262,7 @@ impl TestServer {
|
|||
let track = Arc::new(RemoteAudioTrack {
|
||||
sid: sid.clone(),
|
||||
publisher_id: identity.clone(),
|
||||
running: AtomicBool::new(true),
|
||||
});
|
||||
|
||||
let publication = Arc::new(RemoteTrackPublication);
|
||||
|
@ -644,6 +645,7 @@ impl RemoteVideoTrack {
|
|||
pub struct RemoteAudioTrack {
|
||||
sid: Sid,
|
||||
publisher_id: Sid,
|
||||
running: AtomicBool,
|
||||
}
|
||||
|
||||
impl RemoteAudioTrack {
|
||||
|
@ -655,12 +657,12 @@ impl RemoteAudioTrack {
|
|||
&self.publisher_id
|
||||
}
|
||||
|
||||
pub fn enable(&self) -> impl Future<Output = Result<()>> {
|
||||
async { Ok(()) }
|
||||
pub fn start(&self) {
|
||||
self.running.store(true, SeqCst);
|
||||
}
|
||||
|
||||
pub fn disable(&self) -> impl Future<Output = Result<()>> {
|
||||
async { Ok(()) }
|
||||
pub fn stop(&self) {
|
||||
self.running.store(false, SeqCst);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue