ruffle-rs / ruffle

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

Browser addon local file playback #11251

Open Liverrrrr opened 1 year ago

Liverrrrr commented 1 year ago

I am requesting the ability to open and play local SWF files in the browser addon build. This would be useful (in my case) to leverage some of the enhanced compatibility environments present in modern browsers, such as those for older GPUs, since the desktop build does not play any SWFs properly (I've tested with the Alien Hominid test SWF in this repo, along with The Fancy Pants Adventures World 3 SWF hosted on Kongregate) on my 2011 DX11 iGPU (https://www.techpowerup.com/gpu-specs/radeon-hd-8470d-igp.c2001) while the browser version plays them perfectly fine. Right now my only option for playing local SWFs with Ruffle is to use the demo on the website, which I'd assume is less than ideal for a considerable number of users to be doing regularly, so I'd really appreciate this feature :D image

Lord-McSweeney commented 1 year ago

This could be added as an option in the menu that appears when clicking the extension icon.

Liverrrrr commented 1 year ago

I was also thinking .swf files opened in a browser with the extension installed would automagically use Ruffle to play them

Lord-McSweeney commented 1 year ago

Unfortunately I believe that would require additional configuration on the user's side (at least on Chrome).

Liverrrrr commented 1 year ago

You mean the "Allow access to file URLs" slider in the extension details?

Lord-McSweeney commented 1 year ago

Yes, I think that's the one. I don't think it would be a good idea to make users have to manually set it on their side- it would be simpler to add some sort of "Play Local File: Browse" option in the extension popup.

Liverrrrr commented 1 year ago

Does Chrome allow some sort of confirmation dialog when trying to open local files with this option unset? Maybe Ruffle could give a quick popup to enable it in the future. I don't think it would be any kind of security concern since it looks like this option is extension-specific

Lord-McSweeney commented 1 year ago

AFAIK it just silently fails without a confirmation dialog; we can continue this conversation on the Ruffle discord (I'm @ uqers).

Lenni-builder commented 2 months ago

Yes, I think that's the one. I don't think it would be a good idea to make users have to manually set it on their side- it would be simpler to add some sort of "Play Local File: Browse" option in the extension popup.

I think it should be implemented that way. If a user knows what to do they could enable that option and set their Chromium browser as the default handler for SWFs and if they don't they just won't configure it anyways. You could also add options to open SWFs from the extension menu (wasn't that even implemented already), but having the ability to play an SFW with the extension just by double clicking it in the file manager (after a bit of optional configuration) would be great.