Skip to content

Commit

Permalink
Fix camera icon state when voice agent camera is disabled (#336)
Browse files Browse the repository at this point in the history
* Fix camera icon state when voice agent camera is disabled

* bun.lockb updated
  • Loading branch information
kumard3 authored Oct 16, 2024
1 parent 4c2bc03 commit 32342a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions playground/src/platform/pc/rtc/camSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const CamSection = (props: CamSectionProps) => {
}, [xs])

useEffect(() => {
videoTrack?.setMuted(videoMute)
}, [videoTrack, videoMute])
videoTrack?.setEnabled(!videoMute);
}, [videoTrack, videoMute]);

const onClickMute = () => {
setVideoMute(!videoMute)
Expand Down
4 changes: 2 additions & 2 deletions playground/src/platform/pc/rtc/micSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const MicSection = (props: MicSectionProps) => {
}, [audioTrack])

useEffect(() => {
audioTrack?.setMuted(audioMute)
}, [audioTrack, audioMute])
audioTrack?.setEnabled(!audioMute);
}, [audioTrack, audioMute]);

const subscribedVolumes = useMultibandTrackVolume(mediaStreamTrack, 20);

Expand Down

0 comments on commit 32342a4

Please sign in to comment.