Skip to content

Fix enableMic: false still activating microphone device on iOS#25

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-mic-activation-issue
Draft

Fix enableMic: false still activating microphone device on iOS#25
Copilot wants to merge 3 commits intomainfrom
copilot/fix-mic-activation-issue

Conversation

Copy link

Copilot AI commented Mar 3, 2026

When enableMic: false is passed to PipecatClient, the microphone device still activates on iOS because Daily.createCallObject() was called in the constructor before initialize() had a chance to set startAudioOff/startVideoOff from enableMic/enableCam. Additionally, initDevices() called startCamera() without forwarding these options.

  • Move Daily.createCallObject() from the constructor to initialize(), so the call object is created after enableMic/enableCam have been processed into startAudioOff/startVideoOff
  • Pass startAudioOff and startVideoOff from _dailyFactoryOptions through to startCamera() in initDevices(), matching how DailyMediaManager already handles this in the SmallWebRTC transport
Original prompt

This section details on the original issue you should resolve

<issue_title>enableMic: false still activates the microphone device on iOS</issue_title>
<issue_description>## Description

When creating a PipecatClient with enableMic: false, the microphone device still starts (the OS mic indicator appears and the device requests/uses mic access). The expectation is that the mic hardware should not be activated at all until enableMic(true) is explicitly called.

Steps to Reproduce

  1. Create a PipecatClient with enableMic: false:
import { PipecatClient } from "@pipecat-ai/client-js"
import { RNDailyTransport } from "@pipecat-ai/react-native-daily-transport"

const transport = new RNDailyTransport()

const client = new PipecatClient({
  transport,
  enableMic: false,
  enableCam: false,
  callbacks: { /* ... */ },
})

await client.startBotAndConnect({
  endpoint: "https://example.com/connect",
  requestData: { /* ... */ },
})
  1. Observe that the OS microphone indicator activates immediately on connection, even though enableMic is false.

Expected Behavior

When enableMic: false is passed to PipecatClient, the microphone device should not be started or accessed. The mic should only activate when client.enableMic(true) is called later.

Actual Behavior

The microphone device starts regardless of the enableMic: false setting. The OS mic indicator (iOS orange dot / Android status bar icon) appears as soon as the connection is established.

Environment

  • @pipecat-ai/client-js: latest
  • @pipecat-ai/react-native-daily-transport: latest
  • React Native with Expo
  • Tested on: iOS 26 (device)

Context

Our app starts sessions in text-only mode and only enables the mic when the user explicitly switches to voice mode (via client.enableMic(true)). Because of this bug, users see the mic indicator immediately on session start — which is both confusing and a privacy concern, since they haven't opted into voice yet.</issue_description>

<agent_instructions>You'll need to check https://docs.daily.co/reference/daily-js/daily-call-client/properties#startVideoOff to figure out how to integrate this with daily-js.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

When enableMic: false is set, initDevices() was calling startCamera()
without forwarding the startAudioOff/startVideoOff options. This caused
the mic device to activate on iOS even when disabled. Now these options
from _dailyFactoryOptions are passed through, consistent with how
DailyMediaManager handles this in the SmallWebRTC transport.

Co-authored-by: jamsea <614910+jamsea@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix microphone activation issue on iOS with enableMic: false Fix enableMic: false still activating microphone device on iOS Mar 3, 2026
@jamsea
Copy link
Contributor

jamsea commented Mar 3, 2026

@copilot I believe we need to add this when creating the callObject (function should look something like createCallObject)

…ff/startVideoOff

Defers Daily.createCallObject() from the constructor to initialize(),
where enableMic/enableCam have been processed into startAudioOff/startVideoOff.
This ensures the call object is created with the correct audio/video off
settings from the start, preventing iOS from activating the mic hardware.

Co-authored-by: jamsea <614910+jamsea@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 3, 2026

@copilot I believe we need to add this when creating the callObject (function should look something like createCallObject)

Moved Daily.createCallObject() from the constructor to initialize(), where enableMic/enableCam have already been processed into startAudioOff/startVideoOff. This ensures the call object is created with the correct options from the start. See edbf14d.

@Goktug
Copy link

Goktug commented Mar 4, 2026

I tried this and it prevents the Pipecat SDK from being initialized

@filipi87 filipi87 closed this Mar 5, 2026
@filipi87 filipi87 reopened this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enableMic: false still activates the microphone device on iOS

4 participants