rust-sdks
rust-sdks copied to clipboard
ffi setMute dont work
after send FfiRequest::LocalTrackMuteRequest, remote participants don't receive TrackMuted/TrackUnmuted room event
Hi @xwxctjpkfc-bit, thank you for reporting this—we will investigate the issue.
fn on_local_track_mute(
server: &'static FfiServer,
request: proto::LocalTrackMuteRequest,
) -> FfiResult<proto::LocalTrackMuteResponse> {
let ffi_pub = server.retrieve_handle::<FfiPublication>(request.track_handle)?.clone();
let TrackPublication::Local(publication) = &ffi_pub.publication else {
return Err(FfiError::InvalidRequest("publication is not a LoclPublication".into()));
};
let mut muted = false;
if(request.mute){
publication.mute();
}else{
publication.unmute();
}
muted = publication.is_muted();
Ok(proto::LocalTrackMuteResponse { muted: muted })
}
Its work for me after change on_local_track_mute in requests.rs
I believe this PR can fix this issue. https://github.com/livekit/rust-sdks/pull/799