lingua-libre / SignIt

🌻 Lingua Libre SignIt web-browser extension translates selected word in French Sign Language via an elegant pop up so you learn sign language while reading online.
https://addons.mozilla.org/en-US/firefox/addon/lingua-libre-signit/
MIT License
15 stars 15 forks source link

Refactor/twospeed #109

Closed kabir-afk closed 4 months ago

kabir-afk commented 4 months ago

Description

As mentioned in previous PR , video tag was replaced by iframe. While this allowed our extension to work on sites with strict CSP headers like Github or X, it also broke twospeed feature. The twospeed feature enabled users to view the video first in normal speed and then in slow mo.

To counter this @hugolpz came up with the approach of using video hosted on github pages ,set as iframe's src. While iframe didn't violate CSP headers' media-src directive, using a page that is hosted by us allowed us to manipulate the DOM and have control over the embedded video. Hence the twospeed feature is back again.

The way this works goes something like this :