react_player.pyi 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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.event import EventHandler
  11. from reflex.vars import Var
  12. class ReactPlayer(NoSSRComponent):
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. url: Optional[Union[Var[str], str]] = None,
  19. playing: Optional[Union[Var[bool], bool]] = None,
  20. loop: Optional[Union[Var[bool], bool]] = None,
  21. controls: Optional[Union[Var[bool], bool]] = None,
  22. light: Optional[Union[Var[bool], bool]] = None,
  23. volume: Optional[Union[Var[float], float]] = None,
  24. muted: Optional[Union[Var[bool], bool]] = None,
  25. width: Optional[Union[Var[str], str]] = None,
  26. height: Optional[Union[Var[str], str]] = None,
  27. style: Optional[Style] = None,
  28. key: Optional[Any] = None,
  29. id: Optional[Any] = None,
  30. class_name: Optional[Any] = None,
  31. autofocus: Optional[bool] = None,
  32. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  33. on_blur: Optional[
  34. Union[EventHandler, EventSpec, list, function, BaseVar]
  35. ] = None,
  36. on_buffer: Optional[
  37. Union[EventHandler, EventSpec, list, function, BaseVar]
  38. ] = None,
  39. on_buffer_end: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_click: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_click_preview: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_context_menu: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_disable_pip: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_double_click: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_duration: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_enable_pip: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_ended: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_error: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_focus: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_mount: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_mouse_down: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_mouse_enter: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. on_mouse_leave: Optional[
  82. Union[EventHandler, EventSpec, list, function, BaseVar]
  83. ] = None,
  84. on_mouse_move: Optional[
  85. Union[EventHandler, EventSpec, list, function, BaseVar]
  86. ] = None,
  87. on_mouse_out: Optional[
  88. Union[EventHandler, EventSpec, list, function, BaseVar]
  89. ] = None,
  90. on_mouse_over: Optional[
  91. Union[EventHandler, EventSpec, list, function, BaseVar]
  92. ] = None,
  93. on_mouse_up: Optional[
  94. Union[EventHandler, EventSpec, list, function, BaseVar]
  95. ] = None,
  96. on_pause: Optional[
  97. Union[EventHandler, EventSpec, list, function, BaseVar]
  98. ] = None,
  99. on_play: Optional[
  100. Union[EventHandler, EventSpec, list, function, BaseVar]
  101. ] = None,
  102. on_playback_quality_change: Optional[
  103. Union[EventHandler, EventSpec, list, function, BaseVar]
  104. ] = None,
  105. on_playback_rate_change: Optional[
  106. Union[EventHandler, EventSpec, list, function, BaseVar]
  107. ] = None,
  108. on_progress: Optional[
  109. Union[EventHandler, EventSpec, list, function, BaseVar]
  110. ] = None,
  111. on_ready: Optional[
  112. Union[EventHandler, EventSpec, list, function, BaseVar]
  113. ] = None,
  114. on_scroll: Optional[
  115. Union[EventHandler, EventSpec, list, function, BaseVar]
  116. ] = None,
  117. on_seek: Optional[
  118. Union[EventHandler, EventSpec, list, function, BaseVar]
  119. ] = None,
  120. on_start: Optional[
  121. Union[EventHandler, EventSpec, list, function, BaseVar]
  122. ] = None,
  123. on_unmount: Optional[
  124. Union[EventHandler, EventSpec, list, function, BaseVar]
  125. ] = None,
  126. **props
  127. ) -> "ReactPlayer":
  128. """Create the component.
  129. Args:
  130. *children: The children of the component.
  131. url: The url of a video or song to play
  132. playing: Set to true or false to pause or play the media
  133. loop: Set to true or false to loop the media
  134. controls: Set to true or false to display native player controls.
  135. light: Set to true to show just the video thumbnail, which loads the full player on click
  136. volume: Set the volume of the player, between 0 and 1
  137. muted: Mutes the player
  138. width: Set the width of the player: ex:640px
  139. height: Set the height of the player: ex:640px
  140. style: The style of the component.
  141. key: A unique key for the component.
  142. id: The id for the component.
  143. class_name: The class name for the component.
  144. autofocus: Whether the component should take the focus once the page is loaded
  145. custom_attrs: custom attribute
  146. **props: The props of the component.
  147. Returns:
  148. The component.
  149. """
  150. ...