client-sdk-react-native
client-sdk-react-native copied to clipboard
Audio Track fails to publish on iOS
Describe the bug
Publishing an Audio Track fails. The problem seems to originate in livekit-client when trying to access the userAgent in the getBrowser util function.
https://github.com/livekit/client-sdk-js/blob/db162f3effe98bbdb076c856e06b794856174afc/src/utils/browserParser.ts#L25
I'm not sure if this is a problem with the ReactNative SDK or JS SDK. Let me know if this Issue should be posted over in the client-sdk-js repo.
To Reproduce
Steps to reproduce the behavior:
<LiveKitRoom
serverUrl={props.serverUrl}
token={props.token}
connect={true}
audio={true}
video={false}
onConnected={() => console.log('LiveKitRoom connected')}
onDisconnected={() => console.log('LiveKitRoom disconnected')}
onError={(error: Error) => console.log('LiveKitRoom error', error)}
onEncryptionError={(error: Error) =>
console.log('LiveKitRoom encryptionError', error)
}
onMediaDeviceFailure={(error: Error) =>
console.log('LiveKitRoom mediaDeviceFailure', error)
}
>
<RoomView />
</LiveKitRoom>
Expected behavior
The Audio track should be published.
Screenshots
Device Info:
- Device: iPhone SE 3rdGen
- OS: iOS 18.3.2
Dependencies Info (please reference your package-lock.json or yarn.lock file, not just your package.json):
- @livekit/react-native: 2.6.5
- livekit-client: 2.9.8
- react-native-webrtc: 125.0.9
Additional context Logfile: console-1742648678382.log