ruffle-rs / ruffle

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

Automatically rotate on Android phones when fullscreen to fit SWF #1700

Open Poopooracoocoo opened 3 years ago

Poopooracoocoo commented 3 years ago

Alt title that is kinda inaccurate but easier to understand: Force-rotate to landscape on Android phones when fullscreen

Currently when Ruffle is fullscreened, the player is in portrait mode when the browser is in portrait, respecting auto rotate.

Users may expect fullscreen to always be landscape, regardless of the phone's auto rotate setting, which would be consistent with other mobile video players.

This is what YouTube's mobile players, both native and web, do. It's worth thinking about Android tablets and not just phones too. It's also worth thinking about portrait SWFs (if they exist lol).

also see: https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock

https://bugs.chromium.org/p/chromium/issues/detail?id=326572

(I'm actually super curious about some statistics, both Chrome-wide and Android-wide but Google (and other companies) don't release them >:()

parkerlreed commented 3 years ago

But the user can still rotate the device after launching. Maybe better to have choice? I wouldn't want the landscape forced.

Poopooracoocoo commented 3 years ago

do you also feel the same way about youtube's player?

parkerlreed commented 3 years ago

For YouTube as a video player, yeah landscape is preferred (Although I have seen some players stay portrait for fullscreen. It really just depends on preference)

With Ruffle, you can rotate at any time. Ultimately letting the user decide what orientation they want seems like the best idea.

Poopooracoocoo commented 3 years ago

With Ruffle, you can rotate at any time. Ultimately letting the user decide what orientation they want seems like the best idea.

Yeah, that's the situation currently when the Ruffle player is both fullscreen and not fullscreen. I don't understand if you like that behaviour because you say that you prefer landscape for YouTube.

Do you like that YouTube is always landscape when it's fullscreen? (or portrait if the video is portrait, you know what i mean lol. why am i editing this so much)

The YouTube website doesn't automatically enter or leave fullscreen when you rotate your device but the app does, FYI (RE auto-rotate).

If you meant to put emphasis that YouTube is for videos and not interactive stuff, you raise a good point. There aren't that many web games that I can think off the top of my head. And the few that work on mobile may only work in one orientation. There's not a good reference for Ruffle AFAIK. :/

parkerlreed commented 3 years ago

Yeah. Flash being interactive and video is a tricky spot.

Think about this. If you add on making fullscreen landscape on Android you would also have to add logic if someone wants to go portrait.

Initially fullscreening landscape and allowing rotation could work, but then you are going to end up with users opposite of you wondering why this behavior is there in the first place.

The user already has the choice of how they want to view it. I think it's best to leave it like that.

Poopooracoocoo commented 3 years ago

Thanks for sharing your thoughts! :))) it's a pretty complicated thing as a lot of people don't like auto rotate.