Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Ideal for Chrome Extension v3 - Causing issues in Chrome Extension Manifest v3 #862

Closed
Adnan-Saleem-93 opened this issue Nov 22, 2023 · 9 comments

Comments

@Adnan-Saleem-93
Copy link

I'm building a chrome extension in Manifest v3. I submitted my extension on the Chrome Web Store for publishing and it got rejected because it states that my extension is using remotely-hosted code (scripts, CDNs and anything that is not present in the extension build). Google updated their privacy policy that doesn't allow remotely-hosted code to be published on the Chrome Web Store.

I checked and found out that RecordRTC is using a <script> tag to remotely access some GifRecorder code from a remote url

@jsalsman
Copy link

Can you download it and bundle it in your build?

@Adnan-Saleem-93
Copy link
Author

Adnan-Saleem-93 commented Nov 26, 2023

Can you download it and bundle it in your build?

I've tried that. That most definitely works, as I can only use the code I need for my use case and ignore the rest, and the extension might get accepted on the web store (not sure yet). However, it still doesn't solve the issue mentioned in #860 (comment)

@valentinkorzun
Copy link

Hey @Adnan-Saleem-93, I also use RecordRTC for the Chrome extension, but I don't have the <script> tag with the GIF recorder. Maybe I used a minified source without these dependencies. I only used:

import { RecordRTCPromisesHandler } from 'recordrtc';

Also, if I build the source in the dev mode, it present:

script.src = 'https://www.webrtc-experiment.com/gif-recorder.js';

@augustnmonteiro
Copy link

Hey @Adnan-Saleem-93, I also use RecordRTC for the Chrome extension, but I don't have the <script> tag with the GIF recorder. Maybe I used a minified source without these dependencies. I only used:

import { RecordRTCPromisesHandler } from 'recordrtc';

Also, if I build the source in the dev mode, it present:

script.src = 'https://www.webrtc-experiment.com/gif-recorder.js';

Are you using manifest v3?

@Adnan-Saleem-93
Copy link
Author

Yes, I'm using Manifest v3.
I'm using:
import {RecordRTC} from "recordrtc"

I haven't tried using other classes from it. Maybe that'll remove the gif-recorder script.

@augustnmonteiro
Copy link

@Adnan-Saleem-93 we got reject when we submitted an update using manifest v3.
Screenshot 2023-12-13 at 15 51 04

the way I fixed was to:

  1. Forked RecordRTC
  2. Changed in package.json to use our fork
  3. Removed GifRecorder from our fork (we don't use it for anything, we only use audio)

After changing the code remember to run grunt as well as webpack to move the files to dist.
the contributing file needs to be updated it doesn't mention webpack just grunt

@augustnmonteiro
Copy link

@Adnan-Saleem-93 if you need the gifRecorder you can just download the file from the webrtc-experiment.com and add that inside the code itself and change the src in the script to use it instead of pointing to the external url

@valentinkorzun
Copy link

@Adnan-Saleem-93 @augustnmonteiro. I decided to use MediaRecorderAPI directly. To prevent reject and it works: )

@rikifridrich-outreach
Copy link

@muaz-khan When do you plan to publish v5.6.3 with this fix to NPM? The latest version I see there is still 5.6.2 (https://www.npmjs.com/package/recordrtc?activeTab=versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants