react_player.pyi 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. """Stub file for reflex/components/react_player/react_player.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Optional, Union, overload
  6. from typing_extensions import TypedDict
  7. from reflex.components.component import NoSSRComponent
  8. from reflex.event import EventType
  9. from reflex.style import Style
  10. from reflex.vars.base import Var
  11. class Progress(TypedDict):
  12. played: float
  13. playedSeconds: float
  14. loaded: float
  15. loadedSeconds: float
  16. class ReactPlayer(NoSSRComponent):
  17. @overload
  18. @classmethod
  19. def create( # type: ignore
  20. cls,
  21. *children,
  22. url: Optional[Union[Var[str], str]] = None,
  23. playing: Optional[Union[Var[bool], bool]] = None,
  24. loop: Optional[Union[Var[bool], bool]] = None,
  25. controls: Optional[Union[Var[bool], bool]] = None,
  26. light: Optional[Union[Var[bool], bool]] = None,
  27. volume: Optional[Union[Var[float], float]] = None,
  28. muted: Optional[Union[Var[bool], bool]] = None,
  29. width: Optional[Union[Var[str], str]] = None,
  30. height: Optional[Union[Var[str], str]] = None,
  31. style: Optional[Style] = None,
  32. key: Optional[Any] = None,
  33. id: Optional[Any] = None,
  34. class_name: Optional[Any] = None,
  35. autofocus: Optional[bool] = None,
  36. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  37. on_blur: Optional[EventType[[]]] = None,
  38. on_buffer: Optional[EventType[[]]] = None,
  39. on_buffer_end: Optional[EventType[[]]] = None,
  40. on_click: Optional[EventType[[]]] = None,
  41. on_click_preview: Optional[EventType[[]]] = None,
  42. on_context_menu: Optional[EventType[[]]] = None,
  43. on_disable_pip: Optional[EventType[[]]] = None,
  44. on_double_click: Optional[EventType[[]]] = None,
  45. on_duration: Optional[EventType[float]] = None,
  46. on_enable_pip: Optional[EventType[[]]] = None,
  47. on_ended: Optional[EventType[[]]] = None,
  48. on_error: Optional[EventType[[]]] = None,
  49. on_focus: Optional[EventType[[]]] = None,
  50. on_mount: Optional[EventType[[]]] = None,
  51. on_mouse_down: Optional[EventType[[]]] = None,
  52. on_mouse_enter: Optional[EventType[[]]] = None,
  53. on_mouse_leave: Optional[EventType[[]]] = None,
  54. on_mouse_move: Optional[EventType[[]]] = None,
  55. on_mouse_out: Optional[EventType[[]]] = None,
  56. on_mouse_over: Optional[EventType[[]]] = None,
  57. on_mouse_up: Optional[EventType[[]]] = None,
  58. on_pause: Optional[EventType[[]]] = None,
  59. on_play: Optional[EventType[[]]] = None,
  60. on_playback_quality_change: Optional[EventType[[]]] = None,
  61. on_playback_rate_change: Optional[EventType[[]]] = None,
  62. on_progress: Optional[EventType[Progress]] = None,
  63. on_ready: Optional[EventType[[]]] = None,
  64. on_scroll: Optional[EventType[[]]] = None,
  65. on_seek: Optional[EventType[float]] = None,
  66. on_start: Optional[EventType[[]]] = None,
  67. on_unmount: Optional[EventType[[]]] = None,
  68. **props,
  69. ) -> "ReactPlayer":
  70. """Create the component.
  71. Args:
  72. *children: The children of the component.
  73. url: The url of a video or song to play
  74. playing: Set to true or false to pause or play the media
  75. loop: Set to true or false to loop the media
  76. controls: Set to true or false to display native player controls.
  77. light: Set to true to show just the video thumbnail, which loads the full player on click
  78. volume: Set the volume of the player, between 0 and 1
  79. muted: Mutes the player
  80. width: Set the width of the player: ex:640px
  81. height: Set the height of the player: ex:640px
  82. style: The style of the component.
  83. key: A unique key for the component.
  84. id: The id for the component.
  85. class_name: The class name for the component.
  86. autofocus: Whether the component should take the focus once the page is loaded
  87. custom_attrs: custom attribute
  88. **props: The props of the component.
  89. Returns:
  90. The component.
  91. """
  92. ...