scribear / ScribeAR.github.io

Live Transcription for Augmented Reality Glasses
11 stars 16 forks source link

Using Permissions API in JS to improve browser compatibility #167

Open ammpr opened 9 months ago

ammpr commented 9 months ago

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions/request

https://www.w3.org/TR/permissions/

This could help us to make the site more functional in Firefox, and enable DOM storage (or another permission like mic access) in cases where it is disabled. See my comment on issue #153 (I observe that disabling DOM/default storage leaves ScribeAR non-functional).

The end user could be guided by request pops, instead of having to manually whitelist, etc. Permission request pops do not always appear in ScribeAR.

It is not uncommon for DOM storage to be disabled entirely, and DOM storage is handled heterogeneously by different browsers. In the case of Chrome, which was the Firefox alternative recommended to me for this project, DOM storage and cookies are interlinked. If you disable cookies, browser storage is disabled entirely.