VapiAI / client-sdk-ios

This package lets you start Vapi calls directly in your iOS app.
MIT License
17 stars 9 forks source link

Assistance Needed to Enable Camera in VAPI Call #15

Closed jai-raj-pb closed 2 months ago

jai-raj-pb commented 3 months ago

I'm working on a project using your repository and have encountered an issue when trying to enable the camera during a VAPI call.

From the logs, I noticed that the camera.isEnabled flag is currently set to false. Here is a snippet from the logs:

VAPI call started WebCallResponse(webCallUrl: https://vapi.daily.co/YIHypfJJUQBBwKrRjK3t, id: "****", artifactPlan: nil)
Soup send queue starting
CallManager event loop starting
Participant joined  PeerId="****" SendLog=false Terse=true
Not syncing subscriptions yet as we're not ready to subscribe  SendLog=false
API call: join(****, no token, {
  "inputs" : {
    "camera" : {
      "isEnabled" : false
    },
    "microphone" : {
      "isEnabled" : true
    }
  }
})  SendLog=true Terse=false

I have looked into the private func startCall(body: [String: Any]) async throws -> WebCallResponse method, which parses the flag as response.artifactPlan?.videoRecordingEnabled.

Could you please help me understand how to pass this flag to enable the camera (camera.isEnabled) as true?

I would greatly appreciate your guidance on how to proceed.

Thank you for your support!

nikhilro commented 3 months ago

Not an iOS dev but first q, what does claude say?

jai-raj-pb commented 2 months ago

let assistantOverrides: [String: Any] = [
                    "artifactPlan": [
                        "videoRecordingEnabled": true
                    ]
                ]
                let response = try await vapi.start(assistantId: "---", assistantOverrides: assistantOverrides)