RN 0.73+ hidden compatibility issue: "Property 'addEventListener' does not exist on type 'RTCPeerConnection'"
The issue was first raised with this issue, but it was closed following a workaround using tsc change config, silencing the problem instead of fixing the root cause.
User @IanMolldrem in this comment reproduces the issue and provides a patch-alternative here that is scoped to the rn-webrtc package instead of relying on the tcs config change that affects your entire project.
Here is a copy of the post since it is the heart of this issue:
saghul Here's the sample project: https://github.com/IanMolldrem/WebRTCRepro
Just created a new RN project and installed this package and it is occurring as described.
Repro is evident through the TS errors here: https://github.com/IanMolldrem/WebRTCRepro/blob/main/App.tsx
The workaround detailed in my original issue description still works by uncommenting this: https://github.com/IanMolldrem/WebRTCRepro/blob/f6cb28305dbf0534259c43254ff3b80fc0f88ba7/tsconfig.json#L4
There was a mention about revisiting this issue as a potential fix, but I have no clue if it is the right approach!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please keep open
this is a tough issue. Happily add @ts-ignore, but that took quite a bit of extra time to get going on this lib, when things are already complicated trying to figure it out.
Will be addressed in a future update but you aren't wrong. Some things could be better and some issues can be annoying to resolve gracefully.