Commit graph

5237 commits

Author SHA1 Message Date
Timothy Z.
4b92d9dd4f correct tab indexes for buttons 2026-04-28 23:38:59 +03:00
Timothy Z.
a9ff0f6365 add search route 2026-04-28 23:32:05 +03:00
Timothy Z.
0b601010e2 fix: tests + stale callbacks 2026-04-28 22:57:33 +03:00
Timothy Z.
f95273b8ce feat: add controller guide 2026-04-28 22:31:33 +03:00
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.
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.
233049cf6d fix: sidedrawer bug on webkit browsers 2026-04-27 14:55:17 +03:00
Timothy Z.
0925cb0939 Player: subtitle improvements 2026-04-27 14:50:06 +03: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.
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.
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
Timothy Z.
95ee640813 Player: fix subtitles size shortcut 2026-04-27 10:11:52 +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
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.
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.
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.
08c7141e67 fix: use translation keys for video scale and hide indicator on initial load 2026-04-23 19:20:54 +02:00
Timothy Z.
cdffeb4fdf
Merge branch 'development' into feat/player-add-video-scale-property 2026-04-23 17:20:58 +03:00
Timothy Z.
d1090032ea
Merge pull request #1219 from Stremio/feat/player-add-hdr-badge
Player: Add HDR badge
2026-04-23 17:20:17 +03:00
Timothy Z.
f579873e1b fix: don't restart stream on next-track media key when no next video
The 'next-track' media-key handler called video.setTime(0) before
checking whether a next video existed. onNextVideoRequested() no-ops
when player.nextVideo is null, but the unconditional setTime(0) had
already rewound the current stream — causing movies (which have no
next video) to restart from the beginning when the Windows next-track
media key was pressed.

Guard both calls with the same player.nextVideo check that the
navigator.mediaSession 'nexttrack' handler already uses.
2026-04-23 16:17:38 +02:00
FrigoDev
204d9afc8f feat: add styled tooltips to trailer and rating actions 2026-04-23 02:08:30 -05:00
Timothy Z.
d5b73f8dc2 refactor: simplify sub variant logic 2026-04-22 22:24:22 +03:00
Timothy Z.
b18df103fa refactor: simplify 2026-04-22 22:21:31 +03:00
Timothy Z.
e2d1654f49
Merge branch 'development' into feat/add-subtiles-menu-options-context-menu 2026-04-22 22:12:00 +03:00
Tim
c782303407 refactor: move media session logic to hook 2026-04-22 17:32:20 +02:00
Timothy Z.
17d823565a fix: correctly start next video from 0 2026-04-22 17:55:26 +03:00
Timothy Z.
45f8e31f1a feat: player add media key support 2026-04-22 17:42:56 +03:00
Timothy Z.
5fe4592be6 feat: player add video scale property 2026-04-22 15:31:31 +03:00
Timothy Z.
b4908574bf remove player control shadows 2026-04-22 12:47:44 +03:00
Timothy Z.
c8592d5610 feat: use an icon for hdr badge 2026-04-21 13:22:35 +03:00
Timothy Z.
e36d15eccf feat: add hdr badge 2026-04-21 00:26:52 +03:00
Timothy Z.
5580da8ecf fix: reselection loop 2026-04-20 16:57:45 +03:00
Timothy Z.
5bc74a9da4
Merge pull request #1199 from Stremio/fix/statistics-menu-handler
Some checks are pending
Build / build (push) Waiting to run
Player: Fix statistics menu shortcut handler
2026-04-20 12:20:55 +03:00
Timothy Z.
fe651a2cca
Merge pull request #1198 from Stremio/fix/blur-window-cancel-shortcut-events
Player: Fix cancel shortcut events on blur
2026-04-20 12:20:47 +03:00
Timothy Z.
965feed67b feat: impl context menu on subtitle choice 2026-04-20 12:17:52 +03:00
Timothy Z.
694fb833aa fix: statistics menu handler 2026-04-17 21:03:11 +03:00
Timothy Z.
f74f9aafa0 fix: on blue cancel shortcut events 2026-04-17 20:53:48 +03:00
Timothy Z.
bbfe25177b fix: prioritize embedded subs first 2026-04-17 17:38:31 +03:00
Timothy Z.
8fcffa2c3e Update Player.js 2026-04-16 12:17:22 +03:00
Timothy Z.
3e93afbe21 fix: space bar holding issues 2026-04-16 12:13:48 +03:00
Timothy Z.
a322de9093 fix: use set with map to avoid crash on older devices 2026-04-14 21:34:10 +03:00
Tim
35970825fa
Merge pull request #1179 from ignaciojsoler/feat/persist-subtitle-language
Some checks are pending
Build / build (push) Waiting to run
fix: persist subtitle language preference across streams
2026-04-14 13:16:39 +02:00
Timothy Z.
b058eb536e
Merge branch 'development' into feat/989/watched-on-discover-and-details 2026-04-13 17:19:53 +03: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
Ignacio
b69165e868 fix: pass track object to subtitle callbacks and fix lang fallback chain 2026-04-10 10:27:25 -03:00
Timothy Z.
3052a724f4 Merge branch 'development' into pr/1060 2026-04-08 13:48:17 +03:00
Timothy Z.
e860752f41 fix(player): cancel hold-to-speed-up timer when menus open (2) 2026-04-06 21:33:18 +03:00
Timothy Z.
b2d81c09ee fix(player): cancel hold-to-speed-up timer when menus open 2026-04-06 21:33:08 +03:00
Timothy Z.
49240a4e0f fix(player/statistics): prevent menu from closing on inside click 2026-04-06 21:31:36 +03:00
Timothy Z.
129f510047 fix(player): block mute and speed/subtitle shortcuts while a menu is open 2026-04-06 21:30:46 +03:00
Timothy Z.
33c3f6d9f0 refactor(player): fold nextVideoPopupOpen into menusOpen and gate playback shortcuts via onShortcut 2026-04-06 21:29:33 +03:00
Timothy Z.
117f932596 chore(shortcuts): add enabled param to onShortcut hook 2026-04-06 21:25:56 +03:00
Timothy Z.
aa76396a84 ContextMenu: align with transition usage 2026-04-06 21:14:57 +03:00
Timothy Z.
c99d7c5d82 use new action metaItemMarkAsWatched 2026-04-05 15:05:47 +03:00
Timothy Z.
4e735afacc
Merge pull request #1185 from mrcanelas/fix/windows-emoji-rendering
Some checks failed
Build / build (push) Has been cancelled
feat(ui): add Twemoji font fallback for country flags on Windows
2026-04-05 13:20:27 +03:00
Tim
6dfd0fcbde refactor(player): momoize menus
Some checks failed
Build / build (push) Has been cancelled
2026-04-02 09:56:21 +02:00
Tim
1b9e2a194f fix: cancel animation frame on cleanup for Transition 2026-04-02 09:54:19 +02:00
Tim
3f5dedd072 feat(player): add transitions to menus 2026-04-02 09:53:20 +02:00
mrcanelas
0e1d22d279 feat(ui): add font fallback for country flags on Windows 2026-04-01 18:52:22 -03:00
Tim
73409fff8c feat(player): sort subtitles menu languages by default language 2026-04-01 22:39:48 +02:00
Tim
70bcf339be
Merge pull request #1182 from Stremio/fix/shell-subtitles-menu-split-languages
Some checks are pending
Build / build (push) Waiting to run
Player: Fix multiple languages entries from player subtitles menu
2026-04-01 18:04:55 +02:00
Tim
50cd992f1c fix(Player): embedded track labels on subtitles menu 2026-04-01 18:03:36 +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
mrcanelas
c2c18bc4f6 feat: support line breaks in addon names to match TV app behavior 2026-03-30 13:26:36 -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
Ignacio
9fe7430bc7 fix: persist subtitle language preference across streams 2026-03-29 11:03:42 -03:00
Timothy Z.
9dd44a7ef1
Merge pull request #1177 from Stremio/fix/discover-deeplinks-crash
Some checks failed
Build / build (push) Has been cancelled
Fix crash when no extra option is selected in Discover
2026-03-27 15:34:35 +02:00
Timothy Z.
f2023c5a5a
Merge pull request #1176 from Stremio/fix/streams-list-loading-layout-shift
fix: move streams loading indicator below list to prevent layout shift
2026-03-27 15:32:58 +02:00
Timothy Z.
070807f148 Fix crash when no extra option is selected in Discover
Guard against `selectedExtra` being undefined when `options.find()`
returns no match, preventing "Cannot read properties of undefined
(reading 'deepLinks')" TypeError.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:00:21 +02:00
Timothy Z.
d2199e49f0 fix: add border radius to top corners of loading indicator
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:40:17 +02:00
Timothy Z.
2cc122ea1c fix: sticky loading indicator on mobile to keep it visible
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:33:54 +02:00
Timothy Z.
079d37cd77 fix: move streams loading indicator below the list to prevent layout shift
Closes Stremio/stremio-bugs#2187

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:29:01 +02:00
Timothy Z.
003ea9f2dc fix: prevent hold-to-speed-up when menus or popups are open
Closes Stremio/stremio-bugs#2440

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:56:09 +02:00
Timothy Z.
7ab75cfc88
Merge pull request #1120 from ArtificialSloth/fix/prevent-autoplay-when-using-external-player
Some checks are pending
Build / build (push) Waiting to run
Fix/Prevent autoplay when using an external player
2026-03-26 19:57:14 +02:00
Timothy Z.
504a3bb0be
Merge pull request #1173 from Stremio/fix/space-hold-reset-playback-speed
Player: Fix spacebar and left click hold behavior
2026-03-26 19:54:14 +02:00
Botzy
80e065778f chore: update translations 2026-03-26 18:27:52 +02:00