Package
@elevenlabs/client (used by @elevenlabs/react)
Versions
@elevenlabs/react: 1.12.1
@elevenlabs/client: 1.18.0
livekit-client: 2.21.0
Environment
- iOS Safari (iPhone + iPad)
- Works on desktop Chrome and Android Chrome
Error
The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Description
In @elevenlabs/client 1.9.0, WebRTCConnection.create() explicitly created the LiveKit Room with singlePeerConnection: false:
// @elevenlabs/client 1.9.0 — WebRTCConnection.js line 204-208
const room = new Room({
// Force dual peer connection (v0) path to maintain compatibility
// with LiveKit servers that don't support the v1 join protocol
// (publisher offer bundled in JoinRequest). See #781.
singlePeerConnection: false,
});
In @elevenlabs/client 1.18.0, this was changed to pass no config:
// @elevenlabs/client 1.18.0 — WebRTCConnection.js line 204
const room = new Room();
livekit-client 2.21.0 defaults to singlePeerConnection: true (the v1 join protocol — confirmed at livekit-client.esm.mjs:19201), which bundles the publisher offer in the JoinRequest. This changes the timing of when getUserMedia() is called during the connection lifecycle.
On iOS/iPad Safari, the v1 protocol's earlier getUserMedia() call triggers a NotAllowedError — the browser considers the call "not allowed in the current context" because the user gesture / permission context hasn't been fully established at that point in the WebRTC negotiation.
Regression
This worked in @elevenlabs/client 1.9.0 (which explicitly set singlePeerConnection: false). It broke after upgrading to 1.18.0. The change was introduced in the WebRTCConnection.js diff between the two versions — the singlePeerConnection: false config was removed without replacement.
Suggested fix
Restore the explicit singlePeerConnection: false in WebRTCConnection.create(), or expose a rtcConfig / roomOptions option in SessionConfig so callers can control this.
Reproduction
- Use
@elevenlabs/react 1.12.1 with useConversation() on iOS Safari
- Call
startSession({ agentId })
- Grant microphone permission when prompted
- Observe the error: "The request is not allowed by the user agent or the platform in the current context"
Workaround
We're using patch-package to restore singlePeerConnection: false in the bundled WebRTCConnection.js until an official fix is released.
Note: Originally filed at elevenlabs/elevenlabs-js#443, redirected here by @PaulAsjes.
Package
@elevenlabs/client(used by@elevenlabs/react)Versions
@elevenlabs/react: 1.12.1@elevenlabs/client: 1.18.0livekit-client: 2.21.0Environment
Error
Description
In
@elevenlabs/client1.9.0,WebRTCConnection.create()explicitly created the LiveKit Room withsinglePeerConnection: false:In
@elevenlabs/client1.18.0, this was changed to pass no config:livekit-client2.21.0 defaults tosinglePeerConnection: true(the v1 join protocol — confirmed atlivekit-client.esm.mjs:19201), which bundles the publisher offer in the JoinRequest. This changes the timing of whengetUserMedia()is called during the connection lifecycle.On iOS/iPad Safari, the v1 protocol's earlier
getUserMedia()call triggers aNotAllowedError— the browser considers the call "not allowed in the current context" because the user gesture / permission context hasn't been fully established at that point in the WebRTC negotiation.Regression
This worked in
@elevenlabs/client1.9.0 (which explicitly setsinglePeerConnection: false). It broke after upgrading to 1.18.0. The change was introduced in theWebRTCConnection.jsdiff between the two versions — thesinglePeerConnection: falseconfig was removed without replacement.Suggested fix
Restore the explicit
singlePeerConnection: falseinWebRTCConnection.create(), or expose artcConfig/roomOptionsoption inSessionConfigso callers can control this.Reproduction
@elevenlabs/react1.12.1 withuseConversation()on iOS SafaristartSession({ agentId })Workaround
We're using
patch-packageto restoresinglePeerConnection: falsein the bundledWebRTCConnection.jsuntil an official fix is released.Note: Originally filed at elevenlabs/elevenlabs-js#443, redirected here by @PaulAsjes.