p-stream/src/components/player
Pas c7dcec2560 Improve autoplay handling after PiP and fullscreen on iOS
Adds logic to attempt autoplay when entering Picture-in-Picture or fullscreen modes, particularly to address autoplay restrictions on iOS. Introduces a flag to track if autoplay should be retried after loading, and ensures the UI updates appropriately if autoplay remains blocked.
2025-11-09 13:48:28 -07:00
..
atoms include delay in copy/paste subtitle feature 2025-11-09 10:50:53 -07:00
base Remove word override "i" 2025-11-09 12:53:23 -07:00
display Improve autoplay handling after PiP and fullscreen on iOS 2025-11-09 13:48:28 -07:00
hooks fix native subtitle streaming 2025-11-09 12:21:12 -07:00
internals Merge branch 'production' into dev 2025-11-07 16:36:57 -07:00
utils revert to old captions/sub handling 2025-10-24 22:34:44 -06:00
index.tsx move video to old and setup new video structure 2023-07-23 15:00:08 +02:00
Player.tsx let me hold to widescreen on bigger screens 2025-11-02 11:38:41 -07:00
README.md prettier 2025-11-07 16:50:35 -07: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