p-stream/src/components/player
2024-02-27 23:30:00 +01:00
..
atoms feat: make volume scrollable with your mouse 2024-02-26 22:39:32 +02:00
base Fix some thumbnail scraping setting logic 2024-01-18 19:29:58 +01:00
display double map into one 2024-02-27 23:30:00 +01:00
hooks Check for extension in scrape logic 2024-01-23 21:44:53 +00:00
internals Style the settings onboarding card 2024-01-20 13:09:42 +01:00
utils prepare stream for all domains in a hls playlist 2024-02-27 23:19:40 +01:00
index.tsx move video to old and setup new video structure 2023-07-23 15:00:08 +02:00
Player.tsx caption rendering is back! 2023-10-18 14:30:52 +02:00
README.md Fix typo in player/README.md 2023-12-28 01:09:03 +09:00

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