react_player.pyi 4.1 KB

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