diff --git a/examples/wgpu_room/src/app.rs b/examples/wgpu_room/src/app.rs index 99001f27..d2cf7e8b 100644 --- a/examples/wgpu_room/src/app.rs +++ b/examples/wgpu_room/src/app.rs @@ -88,8 +88,15 @@ impl LkApp { ); self.video_renderers .insert((participant.identity(), track.sid()), video_renderer); - } else if let RemoteTrack::Audio(_) = track { - // 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(); + let mut audio_stream = NativeAudioStream::new(rtc_track); + tokio::spawn(async move { + // Receive the audio frames in a new task + while let Some(audio_frame) = audio_stream.next().await { + log::info!("received audio frame - {audio_frame:#?}"); + } + }); } } RoomEvent::TrackUnsubscribed {