embed-privacy icon indicating copy to clipboard operation
embed-privacy copied to clipboard

Add JS-API to enable/disable embeds

Open kraftner opened this issue 2 years ago • 1 comments

What feature are you requesting?

I love the fact that the plugin does one thing well in contrast to most other plugins offering embed consent that is bundled with consent banners and other functions. So you can mix and match features you need here.

The only thing that is missing for me right now is some kind of JS-API to enable/disable embeds without basically re-implementing most of the functionality in embed-privacy.js.

Something like:

window.embedPrivacy.enableProviderAlwaysActive()
window.embedPrivacy.disableProviderAlwaysActive()
window.embedPrivacy.enableAllProvidersAlwaysActive()
window.embedPrivacy.disableAllProvidersAlwaysActive()

Why is this feature necessary?

It would allow the plugin to be integrated with other 3rd party functionality, e.g. with a consent banner were you can give consent to load all embeds together with other things like tracking.

Are you expecing side-effects?

Apart from the general issue that you're opening a new API surface that needs to be maintained: No, since it doesn't change any of the existing functionality.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

kraftner avatar Jul 11 '23 09:07 kraftner

This could maybe be considered in the context of #67.

kraftner avatar Jul 11 '23 09:07 kraftner