livekit / client-sdk-react-native

Official React Native SDK for LiveKit.
https://livekit.io
Apache License 2.0
110 stars 30 forks source link

Sound can't go to 0 (muted) on iOS and Android #137

Closed Spharian closed 5 months ago

Spharian commented 5 months ago

Describe the bug

When changing volume on a device, the volume can't go to 0 (tested on iOS and Android). It feels like a "minimum volume" is set somewhere.

To Reproduce

  1. Use the VideoView component:
    <VideoView
    style={{
    flex: 1,
    backgroundColor: Colors.black,
    }}
    objectFit="cover"
    videoTrack={streamerParticipant.getTrackPublication(Track.Source.Camera)?.videoTrack}
    />
  2. Try to reduce the volume to the minimum on iOS or Android, the sound is never muted (volume to 0) as it should be.

Expected behavior

The volume should go to 0 and we shouldn't hear the remote participant.

Device Info:

Dependencies Info (please reference your package-lock.json or yarn.lock file):

Spharian commented 5 months ago

Solved by configuring AudioType.MediaAudioType(): https://github.com/livekit/client-sdk-react-native?tab=readme-ov-file#kotlin Using Expo, this is forcing me to keep an android folder and not having it in the .gitignore then Expo take in into account for builds.

davidzhao commented 5 months ago

Thanks for the update @Spharian, it's on our roadmap to make Expo integration a lot easier! @davidliu