ruffle-rs / ruffle

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

player.displayMessage throwing error #17851

Closed rodneytamblyn closed 1 month ago

rodneytamblyn commented 1 month ago

Describe the bug

This code previously worked

            // player.displayMessage('The Spherical Aberration simulator was developed by Associate Professor Gordon Sanderson. Gordon established the ophthalmic science programme at the University of Otago and was an enthusiastic and dedicated teacher and mentor until he sadly passed away in 2017. Gordon was passionate about all things optics and would be pleased to know that his simulator remains a valuable learning tool for our students. If you have any questions about the simulator, please contact your tutor or the education team at ophthalmology.education@sydney.edu.au. Tip: after simulation loads, right mouse click (Mac controlkey + click) for option to show full screen.');
                player.load("SphericalAberration.swf");

Expected behavior

Should display message in Ruffle web player when player runs, instead throws error in developer console and player fails to load.

Content Location

Please verify player.displayMessage is working correctly.

Affected platform

Online demo

Operating system

macOSX

Browser

latest versions all browsers - issue is not browser specific

Additional information

No response

n0samu commented 1 month ago

Hello! Unfortunately, player.displayMessage was never meant to be part of Ruffle's public API, so it was removed in #17313. If you want to display a custom message over the Flash content, you would need to implement that separately, or we would need to restore that removed function. Sorry for the inconvenience!

rodneytamblyn commented 1 month ago

OK no problem, I figured it would be something like this, but it broke some learning objects we had deployed for use by University medical students. It would be good in future when functions are removed that they are done safely….

Thanks for confirming…

Rod

n0samu commented 1 month ago

Hi, we are really sorry for the disruption. I just double-checked our wiki and we did document this as being available to users, so even though it was marked as internal in our codebase, we should not have removed it. We'll work on restoring it ASAP (hopefully by the 2024-09-13 nightly release). And we'll try to review these sorts of changes more thoroughly so something like this doesn't happen again.

n0samu commented 1 month ago

By the way, if you are using our CDN, you can still pin Ruffle to a specific version. For example, here is the URL you could use to pin Ruffle to the 2024-09-02 release: https://unpkg.com/@ruffle-rs/ruffle@0.1.0-nightly.2024.9.2/ruffle.js This would allow you to test changes before updating Ruffle and be an additional guard against disruptions.

rodneytamblyn commented 1 month ago

That’s a great tip. I will do this. Running on latest does expose you to API changes….

Thanks

Rod

On 12/09/2024, at 12:05 PM, nosamu @.***> wrote:

By the way, if you are using our CDN, you can still pin Ruffle to a specific version. For example, here is the URL you could use to pin Ruffle to the 2024-09-02 release: @.**@./ruffle.js This would allow you to test changes before updating Ruffle and be an additional guard against disruptions.

— Reply to this email directly, view it on GitHub https://github.com/ruffle-rs/ruffle/issues/17851#issuecomment-2345001086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL5STF2DDGSKZ6EX5JAFHLZWDLGNAVCNFSM6AAAAABN73HZYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGAYDCMBYGY. You are receiving this because you authored the thread.

evilpie commented 1 month ago

I don't think we necessarily want to add the method back, considering we haven't yet committed to a stable release.

I did remove the reference to displayMessage from the wiki to prevent anyone else from being confused.

rodneytamblyn commented 1 month ago

Agree. It’s all good. The only issue for me is that the removal broke loading player. But was easily fixed.

Rod

adrian17 commented 1 month ago

FYI, we just merged https://github.com/ruffle-rs/ruffle/pull/17887 that should make displayMessage work again, starting next nightly build in a couple hours.

n0samu commented 1 month ago

Latest nightly is up with the function restored!