muaz-khan / RecordRTC

RecordRTC is WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows.
https://www.webrtc-experiment.com/RecordRTC/
MIT License
6.45k stars 1.75k forks source link

Recording does not work on pages with 'Content Security Policy' #860

Open Adnan-Saleem-93 opened 8 months ago

Adnan-Saleem-93 commented 8 months ago

I'm creating a Chrome Extension (manifest v3 - Content Script) that runs on other sites inside an iFrame. I'm using RecordRTC to record user's audio for a Speech to Text module. It works fine on most sites, but recording doesn't work on sites which have 'Content Security Policy' headers, such as GitHub. Either this is an issue in the library or I'm missing some logic. I've tried adding headers for the 'Content Security Policy' in the iFrame but it doesn't work. Please help me with this issue.

Please have a look at the Screenshot attached.

Screenshot 2023-11-06 135132

P.S. the iFrame is not causing the issue. I've tried testing it after removing the iFrame completely.