AOSSIE-Org / AOSSIE-Org/Rein

[Feature]: Keep mobile screen awake while using the trackpad

Offen
#78 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
38
Forks
78
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
6

Beschreibung

### Problem Statement
When using Rein to control my PC from my phone, the phone screen often dims or turns off after a minute of inactivity. This is pretty frustrating because I have to constantly unlock my phone just to move the cursor again, especially when I'm watching a movie or presenting and only need the remote occasionally.

Currently, there's no way to tell the mobile browser to stay awake while the trackpad interface is active.

**Implementation details:**
- Add a hook or logic in [trackpad.tsx](file:///Users/nakshatrasharma/Desktop/Rein/src/routes/trackpad.tsx) to request the wake lock when the component mounts.
- Handle the `visibilitychange` event so that the lock is re-acquired if the user switches tabs and comes back.
- Release the lock when the user navigates away from the trackpad or closes the tab to save battery.

### Checklist
- [x] I have searched for existing feature requests to avoid duplicates

### Proposed Solution

I suggest implementing the **Screen Wake Lock API**. This would allow the web app to request a "wake lock" when the user is on the trackpad route, preventing the OS from dimming the screen.

### Alternatives Considered

- Increasing the system-wide sleep timer on the phone (annoying to change back and forth).
- Using a library like `NoSleep.js`, but the native Wake Lock API is much cleaner for modern browsers.

### Additional Context

This would significantly improve the UX for "couch use" cases. I'd be happy to help test this on a few different mobile devices if needed!

### Checklist

- [x] I have searched for existing feature requests to avoid duplicates

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.