Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: Make embed instead of Ruffle instance with the API when using Flash #16523

Conversation

danielhjacobs
Copy link
Contributor

@danielhjacobs danielhjacobs commented May 29, 2024

This should work, but it's arguable if it's something we should be doing. It's still possible to use the Ruffle API without it creating a Flash embed on Flash-enabled browsers by setting the favorFlash configuration option to false.

If you load the SWF as data instead of by URL, we still use Ruffle since Flash embeds don't have a way to support that.

@danielhjacobs danielhjacobs force-pushed the make-embed-with-ruffle-api-on-flash-browser branch 4 times, most recently from 3c9513b to 9f7c7b2 Compare May 31, 2024 19:18
@danielhjacobs danielhjacobs force-pushed the make-embed-with-ruffle-api-on-flash-browser branch from 28e3b3a to 74ab82f Compare May 31, 2024 20:26
@danielhjacobs
Copy link
Contributor Author

Things seem to be leaning towards not landing this PR. I can't say I necessarily disagree. The Ruffle API already has a few bits of functionality that differ from Flash. For example, you can do player.volume = 0.5; to set the volume of the SWF to half its initial value (on a logarithmic scale akin to human hearing). Another example is that when Ruffle is done loading an SWF it fires the loadeddata event, and some webmasters therefore wait for that event before doing something else. Additionally, there are plans to version the API and add even more QOL functionality that did not exist for Flash Player. If we fell back to a Flash embed some of a webmaster's code may not do anything if they used the API for functionality that didn't exist in Flash. Also, there is a configuration option, playerRuntime, which when set to "air" is meant to allow you to embed an AIR SWF in the browser. Currently, we still don't support most AIR APIs, but there are plans to improve that support, and if someone used the API to load an AIR SWF in the future, even Flash-enabled browsers wouldn't be able to load it without Ruffle.

Instead, we should just emphasize that webmasters should use the embed/object elements with the polyfill if their only purpose in using Ruffle is to embed Flash, which we already mention as the preferred method for non-advanced users.

@danielhjacobs danielhjacobs deleted the make-embed-with-ruffle-api-on-flash-browser branch May 31, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant