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

Firefox extension #3

Open
Victor239 opened this issue Nov 20, 2020 · 13 comments
Open

Firefox extension #3

Victor239 opened this issue Nov 20, 2020 · 13 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@Victor239
Copy link

Extension looks great, would love to see this ported to Firefox as well.

@alyssaxuu alyssaxuu added the enhancement New feature or request label Nov 20, 2020
@alyssaxuu
Copy link
Owner

Hmm, so I have been converting the extension to Firefox, and while everything is compatible, there's an issue with getDisplayMedia, where I cannot run it from the extension background as it requires a "user gesture", meaning it can only be triggered directly from a DOM event (e.g. button click). This is a problem because in this case the code would have to be in the popup or a content script, and neither of those options are viable. The popup wouldn't work whatsoever because the moment it's been closed, the recording would be stopped. The content script might work to an extent, but it would require the tab to be opened at all times (a separate tab?), as if the user closed it the recording would also stop.

I have looked at other extensions available for Firefox and indeed, it seems everyone has run into this problem, I can barely find options, and the few there are use the second approach I mentioned, when you want to start recording a new tab opens and you need to click a "start recording" button while leaving that tab open. It's very unintuitive for sure, so I am honestly not sure what to do about it - is it worth rewriting the code and releasing a confusing version of Screenity for Firefox? I'm really not sure.

@alyssaxuu alyssaxuu added the question Further information is requested label Nov 22, 2020
@wp-entwickler-at
Copy link

Hi @alyssaxuu !
Can you provide the rewritten code for the firefox-addon? Will be very interesting how you handled some things.. Would be great, thanks!

For the recording problem: Have you considered opening the code for capturing in a sidebar? Would this even help?

@alyssaxuu
Copy link
Owner

Hi @alyssaxuu !
Can you provide the rewritten code for the firefox-addon? Will be very interesting how you handled some things.. Would be great, thanks!

For the recording problem: Have you considered opening the code for capturing in a sidebar? Would this even help?

I really didn't have to make that many changes, mostly changing chrome to browser, disabling tab capture (since it's not available in Firefox), and some manifest settings. I don't know if the current code would work since I got stuck on the desktop recording thing.

I considered having it be a content script VS in the popup like Loom does, but again, if the tab is closed at any point during the recording, it will stop. So if you start recording and you click a link, it will stop, while Screenity in Chrome will continue the recording, even if you switch tabs or close them (in desktop recordings). So not really sure what to do.

@jonalmeida
Copy link

Hi @alyssaxuu , you may be able to get some support for this from the addons team in the Mozilla Matrix #addon room.

@Asheboy
Copy link

Asheboy commented Mar 17, 2021

A Firefox version would be great!

@spekulatius
Copy link

Hey,

Just joining to show my excitement for a FF version 👍 haha

Would be awesome if it would end up being possible!

Cheers!

@nikhilraojl
Copy link

nikhilraojl commented Sep 30, 2021

Hmm, so I have been converting the extension to Firefox, and while everything is compatible, there's an issue with getDisplayMedia, where I cannot run it from the extension background as it requires a "user gesture", meaning it can only be triggered directly from a DOM event (e.g. button click). This is a problem because in this case the code would have to be in the popup or a content script, and neither of those options are viable. The popup wouldn't work whatsoever because the moment it's been closed, the recording would be stopped. The content script might work to an extent, but it would require the tab to be opened at all times (a separate tab?), as if the user closed it the recording would also stop.

@alyssaxuu screenity uses chrome manifest v2 but the same issue mentioned above will occur when you have to switch to chrome manifest v3 meaning the background "script" (called service worker in v3) doesn't have access to tabCapture API. You may want to look into it as manifest v2 will be slowly phased out starting January 2022.
Blog post announcing timeline: https://developer.chrome.com/blog/mv2-transition/

Thank you for such great extension

@bonigarcia
Copy link

@alyssaxuu Did you manage to use chrome.tabCapture.capture in Firefox? I read that this should be possible (in this issue and here), but I get the following error to invoke this API in Firefox:

Error: chrome.tabCapture is undefined

Maybe do you need any other permission in the manifest?

@mptorz
Copy link

mptorz commented May 13, 2022

any updates here?

@olex0r
Copy link

olex0r commented May 31, 2022

Any alternatives?

@Iey4iej3
Copy link

Iey4iej3 commented Oct 4, 2022

I considered having it be a content script VS in the popup like Loom does, but again, if the tab is closed at any point during the recording, it will stop. So if you start recording and you click a link, it will stop, while Screenity in Chrome will continue the recording, even if you switch tabs or close them (in desktop recordings).

I think that this is reasonable for sake of security — especially recording after closing seems to be a thing that malicious codes would do. Also, it is better to have a single code base in order to make maintenance easier.

@alyssaxuu
Copy link
Owner

As Firefox appears to be supporting MV3 extensions now, I think I should be able to port Screenity there with the new version I've been working on :)

@alyssaxuu alyssaxuu added this to the MV3 milestone Aug 2, 2023
@alyssaxuu
Copy link
Owner

I've just released the new MV3 version of Screenity for Chrome. I will now look into making any required changes to have it work for Firefox. You can register interest for Firefox in this form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests