react_player.pyi 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from reflex.components.component import NoSSRComponent
  10. from reflex.vars import Var
  11. class ReactPlayer(NoSSRComponent):
  12. @overload
  13. @classmethod
  14. def create( # type: ignore
  15. cls,
  16. *children,
  17. url: Optional[Union[Var[str], str]] = None,
  18. playing: Optional[Union[Var[bool], bool]] = None,
  19. loop: Optional[Union[Var[bool], bool]] = None,
  20. controls: Optional[Union[Var[bool], bool]] = None,
  21. light: Optional[Union[Var[bool], bool]] = None,
  22. volume: Optional[Union[Var[float], float]] = None,
  23. muted: Optional[Union[Var[bool], bool]] = None,
  24. width: Optional[Union[Var[str], str]] = None,
  25. height: Optional[Union[Var[str], str]] = None,
  26. style: Optional[Style] = None,
  27. key: Optional[Any] = None,
  28. id: Optional[Any] = None,
  29. class_name: Optional[Any] = None,
  30. autofocus: Optional[bool] = None,
  31. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  32. on_blur: Optional[
  33. Union[EventHandler, EventSpec, list, function, BaseVar]
  34. ] = None,
  35. on_click: Optional[
  36. Union[EventHandler, EventSpec, list, function, BaseVar]
  37. ] = None,
  38. on_context_menu: Optional[
  39. Union[EventHandler, EventSpec, list, function, BaseVar]
  40. ] = None,
  41. on_double_click: Optional[
  42. Union[EventHandler, EventSpec, list, function, BaseVar]
  43. ] = None,
  44. on_focus: Optional[
  45. Union[EventHandler, EventSpec, list, function, BaseVar]
  46. ] = None,
  47. on_mount: Optional[
  48. Union[EventHandler, EventSpec, list, function, BaseVar]
  49. ] = None,
  50. on_mouse_down: Optional[
  51. Union[EventHandler, EventSpec, list, function, BaseVar]
  52. ] = None,
  53. on_mouse_enter: Optional[
  54. Union[EventHandler, EventSpec, list, function, BaseVar]
  55. ] = None,
  56. on_mouse_leave: Optional[
  57. Union[EventHandler, EventSpec, list, function, BaseVar]
  58. ] = None,
  59. on_mouse_move: Optional[
  60. Union[EventHandler, EventSpec, list, function, BaseVar]
  61. ] = None,
  62. on_mouse_out: Optional[
  63. Union[EventHandler, EventSpec, list, function, BaseVar]
  64. ] = None,
  65. on_mouse_over: Optional[
  66. Union[EventHandler, EventSpec, list, function, BaseVar]
  67. ] = None,
  68. on_mouse_up: Optional[
  69. Union[EventHandler, EventSpec, list, function, BaseVar]
  70. ] = None,
  71. on_scroll: Optional[
  72. Union[EventHandler, EventSpec, list, function, BaseVar]
  73. ] = None,
  74. on_unmount: Optional[
  75. Union[EventHandler, EventSpec, list, function, BaseVar]
  76. ] = None,
  77. **props
  78. ) -> "ReactPlayer":
  79. """Create the component.
  80. Args:
  81. *children: The children of the component.
  82. url: The url of a video or song to play
  83. playing: Set to true or false to pause or play the media
  84. loop: Set to true or false to loop the media
  85. controls: Set to true or false to display native player controls.
  86. light: Set to true to show just the video thumbnail, which loads the full player on click
  87. volume: Set the volume of the player, between 0 and 1
  88. muted: Mutes the player
  89. width: Set the width of the player: ex:640px
  90. height: Set the height of the player: ex:640px
  91. style: The style of the component.
  92. key: A unique key for the component.
  93. id: The id for the component.
  94. class_name: The class name for the component.
  95. autofocus: Whether the component should take the focus once the page is loaded
  96. custom_attrs: custom attribute
  97. **props: The props of the component.
  98. Returns:
  99. The component.
  100. """
  101. ...