1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-23 15:07:43 +01:00
smov/src/components/player
mrjvs f2266bff6b HLS support and some styling fixes for context menus
Co-authored-by: Jip Frijlink <JipFr@users.noreply.github.com>
2023-10-14 16:32:54 +02:00
..
atoms HLS support and some styling fixes for context menus 2023-10-14 16:32:54 +02:00
base settings menu styling + fix shows + fix back link and double redirects 2023-10-12 23:05:47 +02:00
display HLS support and some styling fixes for context menus 2023-10-14 16:32:54 +02:00
hooks quality selection, context menu style fully implemented 2023-10-14 16:06:25 +02:00
internals HLS support and some styling fixes for context menus 2023-10-14 16:32:54 +02:00
utils quality selection, context menu style fully implemented 2023-10-14 16:06:25 +02:00
index.tsx move video to old and setup new video structure 2023-07-23 15:00:08 +02:00
Player.tsx volume storage fixed, title cleanup, settings cog start, touch controls start 2023-10-11 23:04:41 +02:00
README.md fundementals for video player rewrite 2023-09-30 20:57:00 +02: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 seperate 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