p-stream/src/components/player
Pas 5bb28c02c7 add resume action page
asks what you want to do if your progress is greater than 80%
2025-08-10 13:27:32 -06:00
..
atoms add resume action page 2025-08-10 13:27:32 -06:00
base allow user to select subtitle text 2025-07-15 19:08:08 -06:00
display add more error handling 2025-08-03 21:05:14 -06:00
hooks add resume action page 2025-08-10 13:27:32 -06:00
internals fix speed boost for mobile 2025-08-05 11:14:01 -06:00
utils attempt to bruteforce fix utf8 subs 2025-08-01 15:23:19 -06:00
index.tsx
Player.tsx
README.md

Video player component

Video player is quite a complex component, so here is a rundown of all the parts

Composable parts

These parts can be used to build any shape of a video player.

  • /atoms- any ui element that controls the player. (Seekbar, Pause button, quality selection, etc)
  • /base - base components that are used to build a player. Like the main container

internal parts

These parts are internally used, they aren't exported. Do not use them outside of player internals.

/display

The display interface, abstraction on how to actually play the content (e.g Video element, chrome casting, etc)

  • It must be completely separate from any react code
  • It must not interact with state, pass async data back with events

/internals

Internal components that are always rendered on every player.

  • Only components that are always present on the player instance, they must never unmount

/utils

miscellaneous logic, put anything that is unique to the video player internals.

/hooks

Hooks only used for video player.

  • only exception is usePlayer, as its used outside of the player to control the player

~/src/stores/player

State for the video player.

  • Only parts related to the video player may utilize the state