Commit graph

6472 commits

Author SHA1 Message Date
Timothy Z.
d62ba32363 fix: imports 2026-04-28 17:14:07 +03:00
Timothy Z.
93833d0cd1 fixes
1. Player.js — Added optional chaining (gamepad?.on/gamepad?.off) to prevent null crash
  2. GamepadProvider.tsx — Toast messages now use t('GAMEPAD_CONNECTED') / t('GAMEPAD_DISCONNECTED') via i18next, added keys to en-US.json
  3. useVerticalNavGamepadNavigation.tsx — Fixed event.nativeEvent?.spatialNavigationPrevented → event.spatialNavigationPrevented (native DOM events don't have nativeEvent)
  4. GamepadProvider.tsx — Changed connectedGamepads from useState to useRef to avoid rAF effect restart cycle, removed it from effect deps, simplified the enabled guard
2026-04-28 17:09:02 +03:00
Timothy Z.
0c1af71aa9 Merge remote-tracking branch 'origin/development' into feat/gamepad-support
# Conflicts:
#	package-lock.json
#	package.json
#	src/App/App.js
#	src/routes/Player/Player.js
#	src/routes/Settings/General/General.tsx
2026-04-28 16:47:48 +03:00
Timothy Z.
ba45c7f47f
Merge pull request #1235 from mrcanelas/fix/pwa-metadetails-safe-area
Some checks are pending
Build / build (push) Waiting to run
Details: Fix respect PWA safe area
2026-04-28 15:25:57 +02: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
Timothy Z.
d31da0d8e0
Merge pull request #1231 from dav1312/br-img
Some checks are pending
Build / build (push) Waiting to run
style(ui): adjust side panel border-radii and center main background image
2026-04-28 10:49:14 +02:00
Timothy Z.
450229a40f restore 2026-04-28 11:48:06 +03:00
Timothy Z.
4107366094 Merge branch 'br-img' of https://github.com/dav1312/stremio-web into pr/1231 2026-04-28 11:40:36 +03: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
mrcanelas
a20640d87f fix: respect PWA safe area in metadetails 2026-04-27 18:42:18 -03:00
dav1312
55904da5f0 style(ui): update background image alignment 2026-04-27 23:01:10 +02:00
Timothy Z.
0c05ec335a bump: release v5.0.0-beta.35
Some checks are pending
Build / build (push) Waiting to run
2026-04-27 15:53:42 +03:00
Timothy Z.
233049cf6d fix: sidedrawer bug on webkit browsers 2026-04-27 14:55:17 +03:00
Timothy Z.
f4e5b71239 Revert "bump: release v5.0.0-beta.35"
This reverts commit c849c6ccd2.
2026-04-27 14:50:13 +03:00
Timothy Z.
0925cb0939 Player: subtitle improvements 2026-04-27 14:50:06 +03:00
Timothy Z.
07a37c872b
Merge pull request #1234 from Stremio/claude/fix-stremio-subtitles-BVkxV
Player: derive subtitles toggle state from live track selection
2026-04-27 13:10:43 +02:00
Timothy Z.
3d9b403cb8 fix(player): derive subtitles toggle state from live track selection
The C shortcut tracked enabled/disabled via a ref that was never reset
on stream change and was not updated when the user picked tracks via
the menu, so the toggle could become inverted or no-op until pressed
twice. Read selectedSubtitlesTrackId / selectedExtraSubtitlesTrackId
directly instead.
2026-04-27 13:57:56 +03:00
Timothy Z.
c849c6ccd2 bump: release v5.0.0-beta.35
Some checks are pending
Build / build (push) Waiting to run
2026-04-27 11:25:25 +03:00
Timothy Z.
21620c81e0
Merge pull request #1233 from Stremio/player/fix-shortcuts-hold-repeat-throttle
Player: Correctly throttle holding shortcut actions
2026-04-27 10:24:53 +02:00
Timothy Z.
849108785b Revert "bump: release v5.0.0-beta.35"
This reverts commit 2efd1f7d2c.
2026-04-27 11:24:22 +03: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.
2efd1f7d2c bump: release v5.0.0-beta.35 2026-04-27 10:38:00 +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
Timothy Z.
caf4a09687 Revert "bump: release v5.0.0-beta.35"
This reverts commit e2177938d1.
2026-04-27 10:27:12 +03:00
Timothy Z.
e5b500d74c
Merge pull request #1232 from Stremio/player/fix-subtitles-size-shortcut
Player: Fix subtitles size shortcut
2026-04-27 09:23:02 +02:00
Timothy Z.
95ee640813 Player: fix subtitles size shortcut 2026-04-27 10:11:52 +03:00
Timothy Z.
ee4a6f562d bump: stremio-translations 2026-04-27 09:35:30 +03:00
Timothy Z.
c8ffdf7a44
Merge pull request #1225 from FrigoDev/feat/meta-preview-action-buttons-tooltips
Details: add tooltips to rating actions
2026-04-27 08:34:33 +02: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
c97a9f1566 feat(app): mount FullscreenProvider at app root
Wrap the router with <FullscreenProvider> so a single provider instance
spans the whole app lifetime. The legacy useFullscreen hook is still
intact and continues to drive consumers; the provider is in place but
not yet consumed. Splitting this from the consumer cutover keeps each
commit independently buildable.

Made-with: Cursor
2026-04-27 01:50:51 -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
FrigoDev
5611a36783
Merge branch 'Stremio:development' into feat/meta-preview-action-buttons-tooltips 2026-04-25 13:07:00 -05:00
David
4e66a60e11
style(ui): adjust side panel border-radii and center main background image
- Remove border-radius from side panels where they meet the screen edges to ensure a flush, "docked" appearance against the viewport wall.
- Center the main background image for better visual placement on small screens.
2026-04-25 13:58:32 +02:00
FrigoDev
e136770d7e detail: add tooltips for rating like and rating love 2026-04-24 16:59:43 -05:00
FrigoDev
fc7dc45a54 Revert "feat: add styled tooltips to trailer and rating actions"
This reverts commit 204d9afc8f.
2026-04-24 16:55:39 -05:00
Sanjay
338fea48d4 fix: correct Lithuanian ISO 639-2 code from 'ltu' to 'lit'
'ltu' is not a valid ISO 639 code. The correct ISO 639-2/B code
for Lithuanian is 'lit'.

Fixes #1169
2026-04-23 23:54:13 -07:00
Timothy Z.
e2177938d1 bump: release v5.0.0-beta.35
Some checks failed
Build / build (push) Has been cancelled
2026-04-23 20:34:56 +02:00
Timothy Z.
8188381e64 bump: stremio-translations to 1.51.0 2026-04-23 19:55:34 +02:00
Timothy Z.
ea9edc292c
Merge pull request #1223 from Stremio/feat/add-subtiles-menu-options-context-menu
Some checks are pending
Build / build (push) Waiting to run
Player: Add context menu on subtitle choice
2026-04-23 20:50:50 +03:00
Timothy Z.
881989a0e3
Merge pull request #1227 from Stremio/fix/video-scale-translations
Player: Fix video scale translations
2026-04-23 20:49:38 +03:00
Timothy Z.
0d1358d6cb fix: correctly use track for selection 2026-04-23 19:47:32 +02:00
Timothy Z.
3c417a3306 fix: correctly show the variant label instead 2026-04-23 19:40:37 +02:00
Timothy Z.
8758df2288 Merge branch 'fix/video-scale-translations' of https://github.com/Stremio/stremio-web into fix/video-scale-translations 2026-04-23 19:22:12 +02:00
Timothy Z.
08c7141e67 fix: use translation keys for video scale and hide indicator on initial load 2026-04-23 19:20:54 +02:00
Timothy Z.
c5d7cd53f1
Merge pull request #1221 from Stremio/feat/keyboard-media-key-support
Player: Add media key support
2026-04-23 20:11:36 +03:00
Timothy Z.
67ddc6228b
Merge pull request #1220 from Stremio/feat/player-add-video-scale-property
Player: Add video scale property
2026-04-23 17:22:56 +03:00