refactor: ♻️ play remote media stream error handling
This commit is contained in:
parent
7fcac42b7e
commit
d54c138607
3 changed files with 16 additions and 5 deletions
|
@ -74,7 +74,11 @@ pub fn app() -> impl IntoView {
|
|||
let play_remote_audio_button = button()
|
||||
.on(leptos::ev::click, move |_| {
|
||||
let webrtc_audio = webrtc_audio.clone();
|
||||
spawn_local(get_remote_audio_stream_and_play(webrtc_audio));
|
||||
spawn_local(async {
|
||||
get_remote_audio_stream_and_play(webrtc_audio)
|
||||
.await
|
||||
.unwrap()
|
||||
});
|
||||
})
|
||||
.child("Play");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue