Commit graph

1767 commits

Author SHA1 Message Date
Timothy Z.
42579ce297 cleanup 2026-05-01 18:37:19 +03:00
AK
5686019587 fix(fullscreen): use settings hook for escape behavior
Wrap the fullscreen provider with the core suspender so it can read escExitFullscreen through useSettings instead of manually parsing core event payloads.
2026-04-30 15:29:56 -04:00
AK
fa3cd0f5b2 fix(fullscreen): ignore shortcut in editable fields 2026-04-30 12:23:15 -04:00
AK
dfe0d08a78 chore(fullscreen): drop inline rationale comments, bump copyright to 2026
Addresses review feedback: the explanatory block comments in
FullscreenProvider (source-of-truth rationale, CoreTransport typing
note) were noise — the same context already lives in the PR
description and commit history. Copyright headers on the four new
files were carried over from the template at 2023; bumped to 2026.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 17:20:54 -04:00
AK
b2eec31114 Merge branch 'development' into fix/fullscreen-state-desync-on-route-change
Resolves a conflict in src/App/App.js between the new GamepadProvider
(landed via #882 on development) and FullscreenProvider on this branch.
Both wrap parts of the app tree at the same point.

Resolution: nest as <GamepadProvider> > <ShortcutsProvider> >
<FullscreenProvider>. FullscreenProvider stays innermost so it remains
inside ShortcutsProvider — required for the onShortcut('fullscreen', ...)
subscription added in 35b100767. Both ShortcutsModal and GamepadModal
render as siblings inside FullscreenProvider. NavBar conflict
auto-merged cleanly (kept useFullscreen import, added gamepad-nav hook).

Lint and types clean on App.js, HorizontalNavBar.js, FullscreenProvider.tsx.
2026-04-29 09:45:59 -04:00
Timothy Z.
f95273b8ce feat: add controller guide 2026-04-28 22:31:33 +03:00
AK
35b100767f refactor(fullscreen): route F key through ShortcutsProvider
shortcuts.json already declares fullscreen -> F, but the provider was
listening for KeyF on its own keydown handler in parallel — both fired
on every F press, with the canonical shortcuts dispatch going nowhere.

Subscribe via onShortcut('fullscreen', toggleFullscreen, ...) and drop
the KeyF branch (plus the now-unused inputFocused check). Escape stays
local because its action is gated on the escExitFullscreen profile
setting; F11 stays local because it's shell-only and not in
shortcuts.json.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 09:15:31 -04:00
AK
d3d35bcb42 perf(fullscreen): subscribe to SettingsUpdated, not every ctx NewState
The previous NewState listener fired on every change to the ctx model —
notifications, search history, library sync, streaming-server URL — and
each fire triggered a getState('ctx') round-trip to the worker just to
re-read escExitFullscreen.

Switch to the CoreEvent / SettingsUpdated channel (same pattern App.js
uses for interfaceLanguage/quitOnClose), reading the new value straight
from the event payload. Initial seed still uses getState('ctx') once
on mount.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 01:26:42 -04:00
AK
90e2cbff15 chore(fullscreen): drop ts-expect-error, type ctx + NewState properly
useServices is already typed via src/services/ServicesContext/useServices.d.ts,
so the @ts-expect-error suppression on the import was unnecessary and
masked two real type holes that surfaced once it was removed:

- core.transport.getState('ctx') returns Promise<object>; cast to the
  ambient Ctx type so escExitFullscreen is read through a typed path.
- CoreTransport.on/off types listeners as () => void, but the 'NewState'
  event actually emits a string[]. Use a (...args: unknown[]) wrapper +
  Array.isArray narrowing so the call site stays type-safe without
  weakening the ambient transport signature.

No behavior change.

Made-with: Cursor
2026-04-28 00:57:53 -04:00
Timothy Z.
2730444445 correct throttle ms 2026-04-27 11:20:42 +03:00
Timothy Z.
5f6ff99cb6 Revert "Update Shortcuts.tsx"
This reverts commit 136b3b24d2.
2026-04-27 11:20:03 +03:00
Timothy Z.
136b3b24d2 Update Shortcuts.tsx 2026-04-27 10:36:26 +03:00
Timothy Z.
e805fef88c fix: throttle repeat actions 2026-04-27 10:27:57 +03:00
AK
2e13a60007 fix(fullscreen): read settings via core.transport, not useSettings
FullscreenProvider sits above the router, but useSettings() ->
useProfile() -> useModelState() requires CoreSuspenderContext which is
only provided by withCoreSuspender below the router. Mounting the
provider therefore crashed with "Cannot read properties of null
(reading 'getState')".

Switch the provider to read profile.settings.escExitFullscreen directly
from core.transport.getState('ctx') and refresh on the 'NewState' event
when 'ctx' changes. core is available via useServices(), whose provider
sits at the very top of the tree and is always reachable here.

Behavior is preserved: ESC still exits fullscreen iff the user has the
escExitFullscreen setting enabled, and updates to that setting from the
Settings tab take effect on the next ctx NewState push.

Made-with: Cursor
2026-04-27 01:56:02 -04:00
AK
b7f7a3d2ed fix(fullscreen): consume FullscreenProvider, remove per-instance state
useFullscreen is now a thin useContext consumer of FullscreenProvider,
so all callers share a single fullscreen state owned by the app root.

Why this fixes the desync bug:

stremio-router keeps multiple route layers mounted at once, and each
top-level route (Board, Discover, Library, Calendar, Addons, Settings,
Search) renders its own MainNavBars -> HorizontalNavBar -> useFullscreen.
The previous hook held local useState plus its own listeners, so each
route had an independent boolean. Entering fullscreen, then navigating
to another tab, mounted a fresh hook initialized to false; the icon
flipped back to "enter fullscreen" and clicking it re-requested
fullscreen on top of the existing one, leaving the UI unresponsive
until a route remount happened to coincide with reality.

With one provider above the router, state outlives route remounts and
listeners are attached exactly once. The hook's return tuple shape
([fullscreen, requestFullscreen, exitFullscreen, toggleFullscreen]) is
preserved, so all three call sites (HorizontalNavBar, NavMenuContent,
Player) keep working with no API change.

Also removes the legacy src/common/useFullscreen.ts and routes its
imports through stremio/common/Fullscreen (and the stremio/common
barrel for App.js / Player).

Note: MainNavBars is still rendered per-route. Lifting it to a single
app-level layout above the router is a worthwhile follow-up (eliminates
6+ duplicate mounts) but carries non-trivial CSS / useRouteFocused /
stacked-route risk and is out of scope for this PR; tracking separately.

Made-with: Cursor
2026-04-27 01:52:02 -04:00
AK
60df6860d7 feat(common): add FullscreenProvider + context module
Introduce a single, app-root-owned source of truth for fullscreen state,
mirroring the existing provider pattern (ToastProvider, FileDropProvider).
The provider centralizes the fullscreenchange / win-visibility-changed /
keydown listeners and exposes the same [fullscreen, requestFullscreen,
exitFullscreen, toggleFullscreen] tuple that consumers already destructure.

Not yet wired up - both the legacy src/common/useFullscreen hook and the
new module coexist. Subsequent commits mount the provider in App.js and
switch consumers over.

Made-with: Cursor
2026-04-27 01:50:14 -04:00
Timothy Z.
1f293b7cbc
Merge pull request #1180 from Stremio/feat/magnet-http-streams-handing
feat: handle http/magnets from search bar
2026-04-13 17:17:42 +03:00
Timothy Z.
117f932596 chore(shortcuts): add enabled param to onShortcut hook 2026-04-06 21:25:56 +03:00
Tim
3f5dedd072 feat(player): add transitions to menus 2026-04-02 09:53:20 +02:00
Tim
73409fff8c feat(player): sort subtitles menu languages by default language 2026-04-01 22:39:48 +02:00
Tim
c131d7f75e fix: normalize subtitles languages from player menu 2026-04-01 17:32:24 +02:00
Timothy Z.
e260e52322 refactor: change type to info 2026-03-31 13:45:08 +03:00
Timothy Z.
de32e3a765 fix: correct message for fail 2026-03-31 13:11:48 +03:00
Timothy Z.
6cb0c75555 feat: add loading state 2026-03-31 12:56:08 +03:00
Timothy Z.
e0961ec686 remove the try catch 2026-03-30 18:47:20 +03:00
Timothy Z.
fcd85bdcf4 feat: handle http/magnets from search bar 2026-03-30 18:40:24 +03:00
Botzy
80e065778f chore: update translations 2026-03-26 18:27:52 +02:00
Botzy
0286994773 feat(Shortcuts): added shortcuts for increasing and decreasing playback speed 2026-03-26 18:15:46 +02:00
Botzy
eb4f4b9cce fix: translation key for shortcut Shift + N 2026-03-13 11:05:42 +02:00
Botzy
041748ef71 feat(Player): added shortcut for next episode 2026-03-11 18:56:32 +02:00
Tim
31a5cc6f1a chore: update langs
Some checks failed
Build / build (push) Has been cancelled
2026-03-06 14:27:33 +01:00
Timothy Z.
389a91aeca
Merge pull request #1147 from Stremio/feat/add-support-for-more-external-players
Some checks are pending
Build / build (push) Waiting to run
Settings: support infuse & vidhub external players
2026-03-04 14:52:28 +02:00
Timothy Z.
c8d107d036 refactor: improve ios vision os detection 2026-03-04 13:53:40 +02:00
Timothy Z.
c8f3a70f41 feat: support infuse & vidhub external players 2026-03-04 13:52:52 +02:00
Timothy Z.
ec6db02829 fix: host whitelist logic 2026-02-23 13:07:04 +02:00
Timothy Z.
92d0644c9f Merge branch 'development' into pr/675 2026-01-22 14:18:05 +02:00
Tim
5aaee64549 chore: add new interface languages
Some checks are pending
Build / build (push) Waiting to run
2026-01-20 21:39:03 +01:00
Tim
9dbf950a40 chore: replace deprecated lodash.isequal 2026-01-14 03:12:15 +01:00
Tim
fc2d906a42 Merge branch 'development' of https://github.com/Stremio/stremio-web into feat/player-mute-shortcut-2 2026-01-10 00:56:47 +01:00
Tim
c15ca17d2d
Merge pull request #1097 from Stremio/refactor/player-shortcuts
Dev: use shortcuts provider on player
2026-01-09 23:21:16 +01:00
Timothy Z.
80066b2f3f chore: update styles after trakt icon change 2025-12-31 17:31:37 +02:00
Tim
c9a40aabd7 refactor: use shortcuts provider on player 2025-12-18 13:46:05 +01:00
Lachezar Lechev
7046622fb6
feat: player - mute shortcut
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
2025-12-17 14:15:06 +02:00
Neeraj TK
5eb55d3aaf Added the toggle subtitles shortcut 2025-11-14 17:45:45 +05:30
Tim
cbc708bc64 chore: add missing interface languages
Some checks are pending
Build / build (push) Waiting to run
2025-10-23 20:41:44 +02:00
Tim
5969bc9251
Merge pull request #1041 from Stremio/feat/shortcuts-modal
App: Add shortcuts modal
2025-10-23 15:57:34 +02:00
Timothy Z.
c416971d22
Merge pull request #1009 from actuallylost/chore/typos
chore: fix all typos and misspellings
2025-10-23 16:51:45 +03:00
Tim
5c3b2b0b22 refactor(Shortcuts): use json to declare shortcuts 2025-10-14 17:22:08 +02:00
Lachezar Lechev
91fbfc1178
fix: useFullscreen - catch exception on Firefox when using keyboard F shortcut in web
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
2025-10-14 12:00:43 +03:00
Lachezar Lechev
56b60beedb
fix: useFullscreen - catch exception on Firefox when using keyboard F shortcut in web
Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
2025-10-14 11:39:28 +03:00