Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug]: Landscape video playback should still allow rotating to reverse landscape with rotation lock #24678

Closed
intrnl opened this issue Apr 8, 2022 · 8 comments
Assignees
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Media help wanted Help wanted from a contributor. More complex than good first issue.

Comments

@intrnl
Copy link

intrnl commented Apr 8, 2022

Steps to reproduce

  1. Open Firefox
  2. Enable rotation lock/disable auto rotate
  3. Play a landscape video
  4. Rotate device between landscape and reverse landscape

Expected behaviour

The screen should still rotate between the two with rotation lock enabled

Actual behaviour

It's forced to landscape only, which doesn't match the behavior of other applications (e.g. YouTube, Chromium-based browsers)

Device name

Poco M3

Android version

Android 11

Firefox release type

Firefox Nightly

Firefox version

101.0a1

Device logs

No response

Additional information

No response

┆Issue is synchronized with this Jira Task

@intrnl intrnl added needs:triage Issue needs triage 🐞 bug Crashes, Something isn't working, .. labels Apr 8, 2022
@intrnl
Copy link
Author

intrnl commented Apr 8, 2022

Android does show an indicator1 if you would like to change your screen orientation when playing landscape videos in fullscreen with Firefox, but the end result is that the orientation is kept when exiting fullscreen, which causes another hassle.

Footnotes

  1. seems like the indicator only shows up if you make the status bar visible, I presume this is due to how Firefox is handling fullscreen currently?

@amedyne amedyne removed the needs:triage Issue needs triage label Apr 11, 2022
@kbrosnan kbrosnan added Feature:Media help wanted Help wanted from a contributor. More complex than good first issue. labels Apr 11, 2022
@indurs
Copy link
Contributor

indurs commented Apr 13, 2022

@Mugurell , @kbrosnan can I work on this issue?

@indurs
Copy link
Contributor

indurs commented Apr 20, 2022

@Mugurell , to play the video both in landscape and landscape reverse, when auto rotate is disabled we can use

activity.requestedOrientation =
                    ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE

instead of

activity.requestedOrientation =
                    ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE

in MediaSessionFullscreenFeature
https://github.com/mozilla-mobile/android-components/blob/62fe384048d6c4048c0ddd60befa1158774b3589/components/feature/media/src/main/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeature.kt#L55

I think this is enough to fix this issue, but in order to completely solve the orientation issue in general we need to look further into MediaSessionFullscreenFeature as you've mentioned. I've explored and discussed about this issue in
#24040

@Mugurell
Copy link
Contributor

Thank you for looking into this @indurs
I've created mozilla-mobile/android-components#12034 to address the issue based on your findings. Please leave a comment there if you plan to work on it and have that ticket assigned to you.

@Mugurell
Copy link
Contributor

Fix landed in Android-components - mozilla-mobile/android-components#12042.
Should be available to test in the next Nightly.

@Mugurell Mugurell added the eng:qa:needed QA Needed label Apr 29, 2022
@indurs
Copy link
Contributor

indurs commented Apr 29, 2022

Thank You @Mugurell

@intrnl
Copy link
Author

intrnl commented Apr 29, 2022

Can confirm that it works as intended now.

101.0a1 (Build #2015877587), d4c9c548a+
AC: 101.0.20220429152027, 69f4a3aaa1
GV: 101.0a1-20220429094842
AS: 91.1.2

@SoftVision-LorandJanos
Copy link

Verified as fixed with the latest Nightly 101.0a1 (2022-05-01T17:11:31.722002) build.
Device used: Huawei P30 (Android 10).
Closing the ticket as fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Media help wanted Help wanted from a contributor. More complex than good first issue.
Projects
None yet
Development

No branches or pull requests

6 participants