We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 365de80 commit c5f4726Copy full SHA for c5f4726
examples/wgpu_room/src/app.rs
@@ -88,8 +88,15 @@ impl LkApp {
88
);
89
self.video_renderers
90
.insert((participant.identity(), track.sid()), video_renderer);
91
- } else if let RemoteTrack::Audio(_) = track {
92
- // TODO(theomonnom): Once we support media devices, we can play audio tracks here
+ } else if let RemoteTrack::Audio(ref audio_track) = track {
+ let rtc_track = audio_track.rtc_track();
93
+ let mut audio_stream = NativeAudioStream::new(rtc_track);
94
+ tokio::spawn(async move {
95
+ // Receive the audio frames in a new task
96
+ while let Some(audio_frame) = audio_stream.next().await {
97
+ log::info!("received audio frame - {audio_frame:#?}");
98
+ }
99
+ });
100
}
101
102
RoomEvent::TrackUnsubscribed {
0 commit comments