ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.47k stars 801 forks source link

Is there any way to disable ruffle altogether? #486

Closed DuendeInexistente closed 10 months ago

DuendeInexistente commented 4 years ago

...or any plans to add one? Just a button in the Click To Play screen to embed the flash directly instead of the html5 emulation.

Herschel commented 4 years ago

Not sure if this is important seeing as Flash won't be available in browsers within 8 months -- although it'd be nice have more options in the extension at least it to easily enable and blacklist/whitelist sites. For the polyfill/JS APIs, I see it as up to the website developer to enable/disable Ruffle as appropriate.

DuendeInexistente commented 4 years ago

Not sure if this is important seeing as Flash won't be available in browsers within 8 months -- although it'd be nice have more options in the extension at least it to easily enable and blacklist/whitelist sites. For the polyfill/JS APIs, I see it as up to the website developer to enable/disable Ruffle as appropriate.

I understand that webadmins may know the best choice for most of the userbase, but there's always outliers. My computer for example has some issue where ruffle just isn't an option- I asume because it's some venerable hardware alright. Other limited devices, like microcomputers, might encounter similar issues.

Adding an option to embed the flash on the user's end would remove webadmins having to think much about it. Turn ruffle on for everything and if too many users have issues with a flash (Embeding the flash directly could even send metrics about users needing to do this) then disable it for that one. Hell, could even be automatized.

Toad06 commented 4 years ago

FWIW, here's a very simple solution to only enable Ruffle if the Flash Player is not detected, using FlashDetect.js. https://github.com/tchakabam/FlashDetect

<script type="text/javascript" src="path/to/flashdetect.js"></script>
<script type="text/javascript">
    if(!FlashDetect.installed) {
        var script = document.createElement("script");
        script.setAttribute("type", "text/javascript");
        script.setAttribute("src", "path/to/ruffle.js");
        document.head.appendChild(script);
    }
</script>
kmeisthax commented 4 years ago

I added a UI in a branch that I never PR'd in that would allow extension users to disable Ruffle. I should probably revive that.

As for webmasters, it's already possible to load Ruffle without polyfills. Before Ruffle loads, ensure RufflePlayer.config.polyfills is an empty array. By default, this is set to a handful of polyfills intended to fool sites into thinking Flash is installed. If you set to an empty array, Ruffle will just make itself available as a separate player library that your code can leverage selectively. (AFAIK Newgrounds does this.) Bonus points is that this also works with the extension, as they read the same configuration from the same place.

Korne127 commented 11 months ago

This has been implemented in #11407.

danielhjacobs commented 10 months ago

Ruffle will no longer be active if your browser has Flash player installed, and the extension can be toggled off. You can't disable self-hosted Ruffle if you don't have Flash installed, but that shouldn't really be an issue, as without Ruffle or Flash the self-hosted content would not work anyway.