This message was deleted.
# ask-ai
s
This message was deleted.
✅ 1
t
Thanks for reaching out, bisharat. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear you: you join as a viewer but the app still asks for mic permission. That usually happens when the app creates or publishes a local audio track, which triggers the Flutter SDK to request microphone access. What to do • Don’t create or publish any local audio tracks when joining as a viewer. • Remove calls like
LocalAudioTrack.create()
or
setMicrophoneEnabled(true)
before/after connecting. • Ensure you’re not calling
room.localParticipant.publishTrack(...)
with an audio track for viewer flows. If you’d like, tell me: • a short snippet of the code you use to join the room (or where you connect/publish), and I’ll point exactly which line to change., with interactive elements
g
these things are not called any where still geeting mic permission • Don’t create or publish any local audio tracks when joining as a viewer. • Remove calls like
LocalAudioTrack.create()
or
setMicrophoneEnabled(true)
before/after connecting. • Ensure you’re not calling
room.localParticipant.publishTrack(...)
with an audio track for viewer flows.
t
Thanks — I’m following up on your note that none of those calls are present but you still get the mic prompt. I can help pinpoint the cause, but I need a few quick details: 1. Which platform(s) see this prompt (iOS, Android, or both) and OS versions? 2. LiveKit Flutter SDK version from your `pubspec.yaml`/`pubspec.lock`. 3. The minimal code you use to connect/join the room (the connect/join call and any SDK init). If you can’t paste code, say whether you use pre-connect audio, audio visualizers, or similar features. 4. A list of other Flutter plugins that touch audio or background execution (e.g.,
flutter_background_service
, audio visualizer packages). 5. Any console logs around the time the prompt appears. In the meantime, try these quick checks: • Disable any pre-connect audio option. • Remove or disable `AudioVisualizer`/`SoundWaveform` widgets or any plugin that listens to audio input. • Try a minimal app that only calls connect as a viewer (no other audio plugins) to confirm whether the prompt still appears. Send the details/snippet and I’ll point to the exact line or component causing the microphone permission. Sources: Agent speech and audio | LiveKit Documentation | [Flutter iOS] SoundWaveformWidget / AudioVisualizerWidget Not Working (Miss..., with interactive elements
g
this is my bloc code for room connection
t
Thanks — can you paste the BLoC code you use to connect/join the room (the connect/join call and any SDK/init code around it)? Also tell me: • Platform(s) where the prompt appears (iOS, Android, or both) • LiveKit Flutter SDK version (`pubspec.yaml`/`pubspec.lock`) • Whether you use pre-connect audio, AudioVisualizer/SoundWaveform widgets, or plugins like
flutter_background_service
With that I’ll look for any implicit audio initialization causing the mic prompt. , with interactive elements
g
livekit_client: ^2.7.0 and this is file which contains all logic for room connection
t
Thanks — I’ll look at the BLoC to find any implicit audio initialization causing the mic prompt. Please paste the BLoC file (or the connect/join-related parts) and also confirm: • Platform(s) where the prompt appears (iOS, Android, or both) • Any audio-related widgets/plugins you use (e.g.,
AudioVisualizerWidget
,
SoundWaveformWidget
,
flutter_background_service
) If you prefer, paste a minimal reproducible snippet that shows the SDK init and `connect`/`join` call. , with interactive elements
g
no audio-related widgets/plugins you used, platform iOS
t
Thanks — I’m focusing on the iOS mic prompt with LiveKit Flutter v2.7.0. To find any implicit audio initialization I need to inspect your BLoC connect/join logic. Please paste the BLoC file (or at least the parts that: • initialize the LiveKit client/engine, • call `connect`/`join` (including options), • create or manage participants/tracks, • and any flags or options like pre-connect audio). If you can’t share the whole file, paste a minimal reproducible snippet showing the SDK init and the join/connect call. I’ll pinpoint what’s triggering the microphone permission. , with interactive elements
g
this is whole file for connect room and all listeners
t
Thanks — please paste the BLoC file (or the connect/join parts) so I can inspect the initialization, `connect`/`join` options, and listeners. I’m specifically looking for any use of pre-connect audio, options passed to
connect
, or any code that touches tracks/participants. , with interactive elements
Thanks — I understand this is iOS and you still see the mic prompt even though you haven’t created/published audio tracks. I can help find the implicit trigger, but I need the exact connect/join code and initialization. Please paste the BLoC file (or the minimal snippet) showing: • LiveKit SDK init and any options passed • the `connect`/`join` call (including its options) • any listeners or flags related to participants/tracks • any calls to `Room`/`LocalParticipant` methods If you cannot share the whole file, paste just the connect/join portion. I’ll pinpoint what’s causing iOS to request microphone permission. , with interactive elements
g
this is file for connect room
t
Thanks — I understand you're on iOS and still getting the mic prompt. I need the exact connect/join code to find implicit audio initialization. Please paste the minimal snippet that includes: • LiveKit SDK initialization • the `connect`/`join` call (with its options) • any code that references
Room
,
LocalParticipant
, or track creation/publishing • any flags like pre-connect audio If you can’t share the full file, just paste those lines. I’ll pinpoint what’s triggering the microphone permission. , with interactive elements