stremio-web icon indicating copy to clipboard operation
stremio-web copied to clipboard

[Feature]: Add an option to toggle rotation when Stremio Web is installed as PWA on Android

Open FastZet opened this issue 1 year ago • 12 comments

Feature Description

Not sure if it's a feature, more like an enhancement. But currently when Stremio Web is installed as a PWA on Android, the app auto rotates.

Proposed Solution

Having a toggle to switch it on/off in the settings would be really helpful.

Additional Context or Screenshots

Since Stremio 5 is a WIP, many buttons and menu are oversized on a smartphone while texts on file names list of any particular media are small and not wrapped.

With auto rotate, due to size discrepancy and no word wrap, information hardly appear even on a 6 inch android phone.

Code of Conduct

  • [X] I agree

FastZet avatar Jan 07 '25 17:01 FastZet

Rotation is managed by your phone settings you can choose to lock the rotation and rotate with a button. Being a web app even if its a PWA we do not have any control on that. please share other issues as screenshots in this issue. Thank you

Edit:

  • There is a feature to lock the orientation on PWAs available only on Android. https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/lock

kKaskak avatar Jan 07 '25 21:01 kKaskak

The rotation on my phone is locked/off. I use the small rotation icon/button that appears when we tilt the phone to rotate manually. If it supports android, please consider implementing it.

As for my other mentioned issues, I have attached screenshots as below.

  1. In the landscape image you can see that on the left side above the "add to library" button the space for information is very small as vertical half of the left side is occupied by buttons only. Two lines barely fit the space in top vertical half of the left side.
  2. In the first portrait image that shows the movie name and casta and the big "add to library" etc., the buttons and the spaces among everything are too big. This was a scrolling screenshot.
  3. Second portrait image is of the results shown by an addon for a movie. There are two columns here. Column one gives addon and resolution info, second column gives file names and other data like language and source of the file. This second column's words are not wrapped for the mobile view. For example, between the first two lines of the first result some of the words got cut off in the first line.

Point Blur_Jan082025_081422 Screenshot_20250108_081522_Chrome Point Blur_Jan082025_082054

FastZet avatar Jan 08 '25 03:01 FastZet

https://github.com/Stremio/stremio-web/pull/795 Some improvements for this

kKaskak avatar Jan 13 '25 16:01 kKaskak

The rotation on my phone is locked/off. I use the small rotation icon/button that appears when we tilt the phone to rotate manually. If it supports android, please consider implementing it.

As for my other mentioned issues, I have attached screenshots as below.

  1. In the landscape image you can see that on the left side above the "add to library" button the space for information is very small as vertical half of the left side is occupied by buttons only. Two lines barely fit the space in top vertical half of the left side.
  2. In the first portrait image that shows the movie name and casta and the big "add to library" etc., the buttons and the spaces among everything are too big. This was a scrolling screenshot.
  3. Second portrait image is of the results shown by an addon for a movie. There are two columns here. Column one gives addon and resolution info, second column gives file names and other data like language and source of the file. This second column's words are not wrapped for the mobile view. For example, between the first two lines of the first result some of the words got cut off in the first line.

Point Blur_Jan082025_081422 Screenshot_20250108_081522_Chrome Point Blur_Jan082025_082054

The changes for the PWA mobile landscape view are merged expect them soon in the new release.

kKaskak avatar Jan 17 '25 12:01 kKaskak

#1 landscape issue has been fixed with latest update.

#2 has been fixed as well. The spaces have been reduced, screen real estate is now being thoughtfully utilized.

#3 issue still remains. The words are not wrapping and are being cut off. If wrapping is not possible, can we make them "streaming/running lines"? By that I mean the lines will move from right to left so that we can read it fully.

FastZet avatar Feb 03 '25 11:02 FastZet

Point 3 addressed by showing the full title in the menu with right click (hold on mobile)

Rotation setting on pending now

kKaskak avatar Mar 24 '25 12:03 kKaskak

PS for newcomers that would want to contribute: rotation setting could be implemented in stremio-core and added to the settings

kKaskak avatar Oct 09 '25 08:10 kKaskak

greetings. I tried to follow up with a simple bool sol in types::profile::Settings. However stremio-core-web in streamio-core has a build incompatibility for wasm-bindgen. Couldnt build even on clean checkout. details here https://github.com/Stremio/stremio-core/issues/862.

vikramsingh117 avatar Oct 11 '25 21:10 vikramsingh117

greetings. I tried to follow up with a simple bool sol in types::profile::Settings. However stremio-core-web in streamio-core has a build incompatibility for wasm-bindgen. Couldnt build even on clean checkout. details here Stremio/stremio-core#862.

hi i answered in the above issue you linked

kKaskak avatar Oct 11 '25 21:10 kKaskak

PS for newcomers that would want to contribute: rotation setting could be implemented in stremio-core and added to the settings

Is vibe coding allowed? I prepared a pull request with the backend implementation because this has been bugging me a lot. Kindly have a look and feel free to discard if it's trash.

https://github.com/Stremio/stremio-core/pull/865

FastZet avatar Oct 16 '25 09:10 FastZet

This seems like limitation on the PWA. I tested with my phone on Firefox and it works as expected (it uses the orientation and lock/unlock) to change the app orientation. I tested with my phone on Chrome and there I can confirm that I see this issue of the app being in Auto rotate mode, even though my phone has a locked orientation.

I suspect this has more to do with the PWA settings than adding another setting in the UI. I would personally prefer to use the device functionality (for locking, unlocking,etc.) instead of adding, supporting and maintaining another user setting.

I even tested the little icon you mentioned, when you have a locked orientation (say portrait) and rotate the screen in landscape. It shows and is clickable on Firefox (works as expected)

elpiel avatar Oct 17 '25 14:10 elpiel

This seems like limitation on the PWA. I tested with my phone on Firefox and it works as expected (it uses the orientation and lock/unlock) to change the app orientation. I tested with my phone on Chrome and there I can confirm that I see this issue of the app being in Auto rotate mode, even though my phone has a locked orientation.

I suspect this has more to do with the PWA settings than adding another setting in the UI. I would personally prefer to use the device functionality (for locking, unlocking,etc.) instead of adding, supporting and maintaining another user setting.

I even tested the little icon you mentioned, when you have a locked orientation (say portrait) and rotate the screen in landscape. It shows and is clickable on Firefox (works as expected)

Yes, the issue is with Chrome only. Firefox respects the device rotation setting.

I understand your point about not wanting to maintain a feature which is essentially trying to fix a issue which probably is rooted in the browser (Chrome). I main Chrome in my devices, that's why I needed this fix.

Nevertheless, I see how the decision to implement this needs more deliberation. I leave it to your (dev team's) judgement.

FastZet avatar Oct 18 '25 07:10 FastZet