feat: audio communication through webrtc

This commit is contained in:
Ahmet Kaan Gümüş 2025-05-02 19:29:47 +03:00
parent 87f7d0763f
commit 52615c3d27
4 changed files with 70 additions and 5 deletions

View file

@ -1,3 +1,4 @@
use leptos::logging::log;
use protocol::Error;
use wasm_bindgen_futures::JsFuture;
use web_sys::{
@ -38,6 +39,11 @@ pub async fn audio() -> Result<MediaStream, Error> {
.first()
.ok_or(Error::MediaStream("Get First Media Track".to_owned()))?;
log!(
"Local Constraints = {:#?}",
audio_stream_track.get_constraints()
);
let audio_stream_track_apply_constraints_promise = audio_stream_track
.apply_constraints_with_constraints(&media_track_constraints)
.map_err(|err_val| Error::MediaStream(format!("{:?}", err_val)))?;