video.pyi 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. """Stub file for reflex/components/react_player/video.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Optional, overload
  6. import reflex
  7. from reflex.components.react_player.react_player import ReactPlayer
  8. from reflex.event import EventType
  9. from reflex.style import Style
  10. from reflex.vars.base import Var
  11. class Video(ReactPlayer):
  12. pass
  13. @overload
  14. @classmethod
  15. def create( # type: ignore
  16. cls,
  17. *children,
  18. url: Var[str] | str | None = None,
  19. playing: Var[bool] | bool | None = None,
  20. loop: Var[bool] | bool | None = None,
  21. controls: Var[bool] | bool | None = None,
  22. light: Var[bool] | bool | None = None,
  23. volume: Var[float] | float | None = None,
  24. muted: Var[bool] | bool | None = None,
  25. width: Var[str] | str | None = None,
  26. height: Var[str] | str | None = None,
  27. style: Style | None = None,
  28. key: Any | None = None,
  29. id: Any | None = None,
  30. class_name: Any | None = None,
  31. autofocus: bool | None = None,
  32. custom_attrs: dict[str, Var | Any] | None = None,
  33. on_blur: Optional[EventType[()]] = None,
  34. on_buffer: Optional[EventType[()]] = None,
  35. on_buffer_end: Optional[EventType[()]] = None,
  36. on_click: Optional[EventType[()]] = None,
  37. on_click_preview: Optional[EventType[()]] = None,
  38. on_context_menu: Optional[EventType[()]] = None,
  39. on_disable_pip: Optional[EventType[()]] = None,
  40. on_double_click: Optional[EventType[()]] = None,
  41. on_duration: Optional[EventType[()] | EventType[float]] = None,
  42. on_enable_pip: Optional[EventType[()]] = None,
  43. on_ended: Optional[EventType[()]] = None,
  44. on_error: Optional[EventType[()]] = None,
  45. on_focus: Optional[EventType[()]] = None,
  46. on_mount: Optional[EventType[()]] = None,
  47. on_mouse_down: Optional[EventType[()]] = None,
  48. on_mouse_enter: Optional[EventType[()]] = None,
  49. on_mouse_leave: Optional[EventType[()]] = None,
  50. on_mouse_move: Optional[EventType[()]] = None,
  51. on_mouse_out: Optional[EventType[()]] = None,
  52. on_mouse_over: Optional[EventType[()]] = None,
  53. on_mouse_up: Optional[EventType[()]] = None,
  54. on_pause: Optional[EventType[()]] = None,
  55. on_play: Optional[EventType[()]] = None,
  56. on_playback_quality_change: Optional[EventType[()]] = None,
  57. on_playback_rate_change: Optional[EventType[()]] = None,
  58. on_progress: Optional[
  59. EventType[()]
  60. | EventType[reflex.components.react_player.react_player.Progress]
  61. ] = None,
  62. on_ready: Optional[EventType[()]] = None,
  63. on_scroll: Optional[EventType[()]] = None,
  64. on_seek: Optional[EventType[()] | EventType[float]] = None,
  65. on_start: Optional[EventType[()]] = None,
  66. on_unmount: Optional[EventType[()]] = None,
  67. **props,
  68. ) -> "Video":
  69. """Create the component.
  70. Args:
  71. *children: The children of the component.
  72. url: The url of a video or song to play
  73. playing: Set to true or false to pause or play the media
  74. loop: Set to true or false to loop the media
  75. controls: Set to true or false to display native player controls.
  76. light: Set to true to show just the video thumbnail, which loads the full player on click
  77. volume: Set the volume of the player, between 0 and 1
  78. muted: Mutes the player
  79. width: Set the width of the player: ex:640px
  80. height: Set the height of the player: ex:640px
  81. on_ready: Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
  82. on_start: Called when media starts playing.
  83. on_play: Called when media starts or resumes playing after pausing or buffering.
  84. on_progress: Callback containing played and loaded progress as a fraction, and playedSeconds and loadedSeconds in seconds. eg { played: 0.12, playedSeconds: 11.3, loaded: 0.34, loadedSeconds: 16.7 }
  85. on_duration: Callback containing duration of the media, in seconds.
  86. on_pause: Called when media is paused.
  87. on_buffer: Called when media starts buffering.
  88. on_buffer_end: Called when media has finished buffering. Works for files, YouTube and Facebook.
  89. on_seek: Called when media seeks with seconds parameter.
  90. on_playback_rate_change: Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
  91. on_playback_quality_change: Called when playback quality of the player changed. Only supported by YouTube (if enabled).
  92. on_ended: Called when media finishes playing. Does not fire when loop is set to true.
  93. on_error: Called when an error occurs whilst attempting to play media.
  94. on_click_preview: Called when user clicks the light mode preview.
  95. on_enable_pip: Called when picture-in-picture mode is enabled.
  96. on_disable_pip: Called when picture-in-picture mode is disabled.
  97. style: The style of the component.
  98. key: A unique key for the component.
  99. id: The id for the component.
  100. class_name: The class name for the component.
  101. autofocus: Whether the component should take the focus once the page is loaded
  102. custom_attrs: custom attribute
  103. **props: The props of the component.
  104. Returns:
  105. The component.
  106. """
  107. ...