1

The below code is working well in the browser console of the google chrome browser and in visualforce also.

console.log(new RTCPeerConnection({}))

enter image description here

but when I add the same console.log in the connected call back of my LWC page it throws below error

enter image description here

Do we need to do somehting extra to make it work in LWC also

2
  • 1
    I am guessing this relates to the Lightning locker service.
    – Phil W
    Sep 5, 2021 at 14:04
  • 1
    Yes it seems like locker service issue webRTC is not supported in the locker service
    – gs650x
    Sep 5, 2021 at 14:37

1 Answer 1

2

RTCPeerConnection is not supported by Lightning Locker

locker api viewer

From Winter '22 on, you can activate next generation Lightning Web Security for LWC (beta) and see if that specific interface is supported (haven't tried). See more details here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .