ruffle-rs / ruffle

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

Regression - Full Screen button added by Flash dev no longer works. #16119

Closed TomFulp closed 6 months ago

TomFulp commented 6 months ago

Describe the bug

53xy83457 has reported that the Fullscreen button in Coglab previously worked via Ruffle but is no longer working.

https://www.newgrounds.com/portal/view/897464

The button is on the top right, this is 53xy83457's AS2 code:

on(release){
    if (Stage.displayState == "normal"){
        Stage.displayState = "fullscreen";
    } else {
        Stage.displayState = "normal";
    }
}

Expected behavior

It is expected that pressing the fullscreen button on the top right will activate fullscreen mode.

Content Location

https://www.newgrounds.com/portal/view/897464

Affected platform

Self-hosted version

Operating system

Windows 11

Browser

Chrome 123.0.6312.107

Additional information

No response

danielhjacobs commented 6 months ago

Hi. This was probably regressed by #14841. @n0samu mentioned it breaking a fullscreen button in a Newgrounds game on Discord. According to https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html#displayState the default for that option is false, so unless it was set explicitly, the content could not be made full screen. There was a disagreement among devs on whether to match Flash here, but more fell on the side of matching Flash, so that was done. You can either explicitly set allowFullscreen (that option in the config corresponds to allowFullScreen in the embed) to true in the config for all games or add it as a publish option.

danielhjacobs commented 6 months ago

The game reported on Discord for a similar issue was https://www.newgrounds.com/portal/view/486700/. I tested in a Flash-enabled browser and the full screen button there did not work unless the embed had allowFullScreen set.

TomFulp commented 6 months ago

Thanks, we'll get this changed on our end!