reflex-components-react-player 0.9.0a1__tar.gz → 0.9.0a2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (14) hide show
  1. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/PKG-INFO +1 -1
  2. reflex_components_react_player-0.9.0a2/src/reflex_components_react_player/audio.pyi +137 -0
  3. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/src/reflex_components_react_player/react_player.py +2 -2
  4. reflex_components_react_player-0.9.0a2/src/reflex_components_react_player/react_player.pyi +157 -0
  5. reflex_components_react_player-0.9.0a2/src/reflex_components_react_player/video.pyi +137 -0
  6. reflex_components_react_player-0.9.0a1/src/reflex_components_react_player/audio.pyi +0 -89
  7. reflex_components_react_player-0.9.0a1/src/reflex_components_react_player/react_player.pyi +0 -109
  8. reflex_components_react_player-0.9.0a1/src/reflex_components_react_player/video.pyi +0 -89
  9. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/.gitignore +0 -0
  10. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/README.md +0 -0
  11. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/pyproject.toml +0 -0
  12. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/src/reflex_components_react_player/__init__.py +0 -0
  13. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/src/reflex_components_react_player/audio.py +0 -0
  14. {reflex_components_react_player-0.9.0a1 → reflex_components_react_player-0.9.0a2}/src/reflex_components_react_player/video.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reflex-components-react-player
3
- Version: 0.9.0a1
3
+ Version: 0.9.0a2
4
4
  Summary: Reflex react-player components.
5
5
  Author-email: Khaleel Al-Adhami <khaleel@reflex.dev>
6
6
  Maintainer-email: Khaleel Al-Adhami <khaleel@reflex.dev>
@@ -0,0 +1,137 @@
1
+ """Stub file for reflex_components_react_player/audio.py"""
2
+
3
+ # ------------------- DO NOT EDIT ----------------------
4
+ # This file was generated by `reflex/utils/pyi_generator.py`!
5
+ # ------------------------------------------------------
6
+ from collections.abc import Mapping, Sequence
7
+ from typing import Any
8
+
9
+ from reflex_base.event import EventType, PointerEventInfo
10
+ from reflex_base.vars.base import Var
11
+ from reflex_components_core.core.breakpoints import Breakpoints
12
+
13
+ from reflex_components_react_player.react_player import ReactPlayer
14
+
15
+ class Audio(ReactPlayer):
16
+ @classmethod
17
+ def create(
18
+ cls,
19
+ *children,
20
+ src: Var[list[dict[str, str]] | list[str] | str]
21
+ | list[dict[str, str]]
22
+ | list[str]
23
+ | str
24
+ | None = None,
25
+ playing: Var[bool] | bool | None = None,
26
+ loop: Var[bool] | bool | None = None,
27
+ controls: Var[bool] | bool | None = None,
28
+ light: Var[bool] | bool | None = None,
29
+ volume: Var[float] | float | None = None,
30
+ muted: Var[bool] | bool | None = None,
31
+ config: Var[dict[str, Any]] | dict[str, Any] | None = None,
32
+ disable_remote_playback: Var[bool] | bool | None = None,
33
+ style: Sequence[Mapping[str, Any]]
34
+ | Mapping[str, Any]
35
+ | Var[Mapping[str, Any]]
36
+ | Breakpoints
37
+ | None = None,
38
+ key: Any | None = None,
39
+ id: Any | None = None,
40
+ ref: Var | None = None,
41
+ class_name: Any | None = None,
42
+ custom_attrs: dict[str, Any | Var] | None = None,
43
+ on_blur: EventType[()] | None = None,
44
+ on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
45
+ on_click_preview: EventType[()] | None = None,
46
+ on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
47
+ on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
48
+ on_duration_change: EventType[Any] | None = None,
49
+ on_ended: EventType[()] | None = None,
50
+ on_enter_picture_in_picture: EventType[()] | None = None,
51
+ on_error: EventType[()] | None = None,
52
+ on_focus: EventType[()] | None = None,
53
+ on_leave_picture_in_picture: EventType[()] | None = None,
54
+ on_mount: EventType[()] | None = None,
55
+ on_mouse_down: EventType[()] | None = None,
56
+ on_mouse_enter: EventType[()] | None = None,
57
+ on_mouse_leave: EventType[()] | None = None,
58
+ on_mouse_move: EventType[()] | None = None,
59
+ on_mouse_out: EventType[()] | None = None,
60
+ on_mouse_over: EventType[()] | None = None,
61
+ on_mouse_up: EventType[()] | None = None,
62
+ on_pause: EventType[()] | None = None,
63
+ on_play: EventType[()] | None = None,
64
+ on_playing: EventType[()] | None = None,
65
+ on_progress: EventType[Any] | None = None,
66
+ on_rate_change: EventType[Any] | None = None,
67
+ on_ready: EventType[()] | None = None,
68
+ on_scroll: EventType[()] | None = None,
69
+ on_scroll_end: EventType[()] | None = None,
70
+ on_seeked: EventType[Any] | None = None,
71
+ on_seeking: EventType[()] | None = None,
72
+ on_start: EventType[()] | None = None,
73
+ on_time_update: EventType[Any] | None = None,
74
+ on_unmount: EventType[()] | None = None,
75
+ on_waiting: EventType[()] | None = None,
76
+ **props,
77
+ ) -> Audio:
78
+ """Create a component.
79
+
80
+ Args:
81
+ *children: The children of the component.
82
+ src: 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
+ config: Player-specific configuration parameters.
90
+ disable_remote_playback: Set to true to disable the default remote playback option on supported devices.
91
+ style: The style of the component.
92
+ key: A unique key for the component.
93
+ id: The id for the component.
94
+ ref: The Var to pass as the ref to the component.
95
+ class_name: The class name for the component.
96
+ custom_attrs: Attributes passed directly to the component.
97
+ on_focus: Fired when the element (or some element inside of it) receives focus. For example, it is called when the user clicks on a text input.
98
+ on_blur: Fired when focus has left the element (or left some element inside of it). For example, it is called when the user clicks outside of a focused text input.
99
+ on_click: Fired when the user clicks on an element. For example, it's called when the user clicks on a button.
100
+ on_context_menu: Fired when the user right-clicks on an element.
101
+ on_double_click: Fired when the user double-clicks on an element.
102
+ on_mouse_down: Fired when the user presses a mouse button on an element.
103
+ on_mouse_enter: Fired when the mouse pointer enters the element.
104
+ on_mouse_leave: Fired when the mouse pointer leaves the element.
105
+ on_mouse_move: Fired when the mouse pointer moves over the element.
106
+ on_mouse_out: Fired when the mouse pointer moves out of the element.
107
+ on_mouse_over: Fired when the mouse pointer moves onto the element.
108
+ on_mouse_up: Fired when the user releases a mouse button on an element.
109
+ on_scroll: Fired when the user scrolls the element.
110
+ on_scroll_end: Fired when scrolling ends on the element.
111
+ on_mount: Fired when the component is mounted to the page.
112
+ on_unmount: Fired when the component is removed from the page. Only called during navigation, not on page refresh.
113
+ on_ready: Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
114
+ on_start: Called when media starts playing.
115
+ on_play: Called when playing is set to true.
116
+ on_playing: Called when media starts or resumes playing after pausing or buffering.
117
+ on_progress: Called while the video is loading only. Contains 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 }
118
+ on_time_update: Called when the media's current time changes (~4Hz, use .throttle to limit calls to backend).
119
+ on_duration_change: Callback containing duration of the media, in seconds.
120
+ on_pause: Called when media is paused.
121
+ on_waiting: Called when media starts buffering.
122
+ on_seeking: Called when the media is seeking.
123
+ on_seeked: Called when media seeks with seconds parameter.
124
+ on_rate_change: Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
125
+ on_ended: Called when media finishes playing. Does not fire when loop is set to true.
126
+ on_error: Called when an error occurs whilst attempting to play media.
127
+ on_click_preview: Called when user clicks the light mode preview.
128
+ on_enter_picture_in_picture: Called when picture-in-picture mode is enabled.
129
+ on_leave_picture_in_picture: Called when picture-in-picture mode is disabled.
130
+ **props: The props of the component.
131
+
132
+ Returns:
133
+ The created component.
134
+
135
+ Raises:
136
+ ValueError: If both a deprecated prop and its replacement are both passed.
137
+ """
@@ -236,8 +236,8 @@ class ReactPlayer(Component):
236
236
  """Create a component.
237
237
 
238
238
  Args:
239
- children: The children of the component.
240
- props: The props of the component.
239
+ *children: The children of the component.
240
+ **props: The props of the component.
241
241
 
242
242
  Returns:
243
243
  The created component.
@@ -0,0 +1,157 @@
1
+ """Stub file for reflex_components_react_player/react_player.py"""
2
+
3
+ # ------------------- DO NOT EDIT ----------------------
4
+ # This file was generated by `reflex/utils/pyi_generator.py`!
5
+ # ------------------------------------------------------
6
+ from collections.abc import Mapping, Sequence
7
+ from typing import Any, TypedDict
8
+
9
+ from reflex_base.components.component import Component
10
+ from reflex_base.event import EventType, PointerEventInfo
11
+ from reflex_base.vars.base import Var
12
+ from reflex_base.vars.object import ObjectVar
13
+ from reflex_components_core.core.breakpoints import Breakpoints
14
+
15
+ ReactPlayerEvent = ObjectVar[dict[str, dict[str, dict[str, Any]]]]
16
+
17
+ class Progress(TypedDict):
18
+ played: float
19
+ playedSeconds: float
20
+ loaded: float
21
+ loadedSeconds: float
22
+ duration: float
23
+
24
+ _DEPRECATED_PROP_MAP = {
25
+ "url": "src",
26
+ "on_duration": "on_duration_change",
27
+ "on_playback_rate_change": "on_rate_change",
28
+ "on_seek": "on_seeked",
29
+ "on_buffer": "on_waiting",
30
+ "on_buffer_end": "on_playing",
31
+ "on_enable_pip": "on_enter_picture_in_picture",
32
+ "on_disable_pip": "on_leave_picture_in_picture",
33
+ }
34
+
35
+ class ReactPlayer(Component):
36
+ @classmethod
37
+ def create(
38
+ cls,
39
+ *children,
40
+ src: Var[list[dict[str, str]] | list[str] | str]
41
+ | list[dict[str, str]]
42
+ | list[str]
43
+ | str
44
+ | None = None,
45
+ playing: Var[bool] | bool | None = None,
46
+ loop: Var[bool] | bool | None = None,
47
+ controls: Var[bool] | bool | None = None,
48
+ light: Var[bool] | bool | None = None,
49
+ volume: Var[float] | float | None = None,
50
+ muted: Var[bool] | bool | None = None,
51
+ config: Var[dict[str, Any]] | dict[str, Any] | None = None,
52
+ disable_remote_playback: Var[bool] | bool | None = None,
53
+ style: Sequence[Mapping[str, Any]]
54
+ | Mapping[str, Any]
55
+ | Var[Mapping[str, Any]]
56
+ | Breakpoints
57
+ | None = None,
58
+ key: Any | None = None,
59
+ id: Any | None = None,
60
+ ref: Var | None = None,
61
+ class_name: Any | None = None,
62
+ custom_attrs: dict[str, Any | Var] | None = None,
63
+ on_blur: EventType[()] | None = None,
64
+ on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
65
+ on_click_preview: EventType[()] | None = None,
66
+ on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
67
+ on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
68
+ on_duration_change: EventType[Any] | None = None,
69
+ on_ended: EventType[()] | None = None,
70
+ on_enter_picture_in_picture: EventType[()] | None = None,
71
+ on_error: EventType[()] | None = None,
72
+ on_focus: EventType[()] | None = None,
73
+ on_leave_picture_in_picture: EventType[()] | None = None,
74
+ on_mount: EventType[()] | None = None,
75
+ on_mouse_down: EventType[()] | None = None,
76
+ on_mouse_enter: EventType[()] | None = None,
77
+ on_mouse_leave: EventType[()] | None = None,
78
+ on_mouse_move: EventType[()] | None = None,
79
+ on_mouse_out: EventType[()] | None = None,
80
+ on_mouse_over: EventType[()] | None = None,
81
+ on_mouse_up: EventType[()] | None = None,
82
+ on_pause: EventType[()] | None = None,
83
+ on_play: EventType[()] | None = None,
84
+ on_playing: EventType[()] | None = None,
85
+ on_progress: EventType[Any] | None = None,
86
+ on_rate_change: EventType[Any] | None = None,
87
+ on_ready: EventType[()] | None = None,
88
+ on_scroll: EventType[()] | None = None,
89
+ on_scroll_end: EventType[()] | None = None,
90
+ on_seeked: EventType[Any] | None = None,
91
+ on_seeking: EventType[()] | None = None,
92
+ on_start: EventType[()] | None = None,
93
+ on_time_update: EventType[Any] | None = None,
94
+ on_unmount: EventType[()] | None = None,
95
+ on_waiting: EventType[()] | None = None,
96
+ **props,
97
+ ) -> ReactPlayer:
98
+ """Create a component.
99
+
100
+ Args:
101
+ *children: The children of the component.
102
+ src: The url of a video or song to play
103
+ playing: Set to true or false to pause or play the media
104
+ loop: Set to true or false to loop the media
105
+ controls: Set to true or false to display native player controls.
106
+ light: Set to true to show just the video thumbnail, which loads the full player on click
107
+ volume: Set the volume of the player, between 0 and 1
108
+ muted: Mutes the player
109
+ config: Player-specific configuration parameters.
110
+ disable_remote_playback: Set to true to disable the default remote playback option on supported devices.
111
+ style: The style of the component.
112
+ key: A unique key for the component.
113
+ id: The id for the component.
114
+ ref: The Var to pass as the ref to the component.
115
+ class_name: The class name for the component.
116
+ custom_attrs: Attributes passed directly to the component.
117
+ on_focus: Fired when the element (or some element inside of it) receives focus. For example, it is called when the user clicks on a text input.
118
+ on_blur: Fired when focus has left the element (or left some element inside of it). For example, it is called when the user clicks outside of a focused text input.
119
+ on_click: Fired when the user clicks on an element. For example, it's called when the user clicks on a button.
120
+ on_context_menu: Fired when the user right-clicks on an element.
121
+ on_double_click: Fired when the user double-clicks on an element.
122
+ on_mouse_down: Fired when the user presses a mouse button on an element.
123
+ on_mouse_enter: Fired when the mouse pointer enters the element.
124
+ on_mouse_leave: Fired when the mouse pointer leaves the element.
125
+ on_mouse_move: Fired when the mouse pointer moves over the element.
126
+ on_mouse_out: Fired when the mouse pointer moves out of the element.
127
+ on_mouse_over: Fired when the mouse pointer moves onto the element.
128
+ on_mouse_up: Fired when the user releases a mouse button on an element.
129
+ on_scroll: Fired when the user scrolls the element.
130
+ on_scroll_end: Fired when scrolling ends on the element.
131
+ on_mount: Fired when the component is mounted to the page.
132
+ on_unmount: Fired when the component is removed from the page. Only called during navigation, not on page refresh.
133
+ on_ready: Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
134
+ on_start: Called when media starts playing.
135
+ on_play: Called when playing is set to true.
136
+ on_playing: Called when media starts or resumes playing after pausing or buffering.
137
+ on_progress: Called while the video is loading only. Contains 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 }
138
+ on_time_update: Called when the media's current time changes (~4Hz, use .throttle to limit calls to backend).
139
+ on_duration_change: Callback containing duration of the media, in seconds.
140
+ on_pause: Called when media is paused.
141
+ on_waiting: Called when media starts buffering.
142
+ on_seeking: Called when the media is seeking.
143
+ on_seeked: Called when media seeks with seconds parameter.
144
+ on_rate_change: Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
145
+ on_ended: Called when media finishes playing. Does not fire when loop is set to true.
146
+ on_error: Called when an error occurs whilst attempting to play media.
147
+ on_click_preview: Called when user clicks the light mode preview.
148
+ on_enter_picture_in_picture: Called when picture-in-picture mode is enabled.
149
+ on_leave_picture_in_picture: Called when picture-in-picture mode is disabled.
150
+ **props: The props of the component.
151
+
152
+ Returns:
153
+ The created component.
154
+
155
+ Raises:
156
+ ValueError: If both a deprecated prop and its replacement are both passed.
157
+ """
@@ -0,0 +1,137 @@
1
+ """Stub file for reflex_components_react_player/video.py"""
2
+
3
+ # ------------------- DO NOT EDIT ----------------------
4
+ # This file was generated by `reflex/utils/pyi_generator.py`!
5
+ # ------------------------------------------------------
6
+ from collections.abc import Mapping, Sequence
7
+ from typing import Any
8
+
9
+ from reflex_base.event import EventType, PointerEventInfo
10
+ from reflex_base.vars.base import Var
11
+ from reflex_components_core.core.breakpoints import Breakpoints
12
+
13
+ from reflex_components_react_player.react_player import ReactPlayer
14
+
15
+ class Video(ReactPlayer):
16
+ @classmethod
17
+ def create(
18
+ cls,
19
+ *children,
20
+ src: Var[list[dict[str, str]] | list[str] | str]
21
+ | list[dict[str, str]]
22
+ | list[str]
23
+ | str
24
+ | None = None,
25
+ playing: Var[bool] | bool | None = None,
26
+ loop: Var[bool] | bool | None = None,
27
+ controls: Var[bool] | bool | None = None,
28
+ light: Var[bool] | bool | None = None,
29
+ volume: Var[float] | float | None = None,
30
+ muted: Var[bool] | bool | None = None,
31
+ config: Var[dict[str, Any]] | dict[str, Any] | None = None,
32
+ disable_remote_playback: Var[bool] | bool | None = None,
33
+ style: Sequence[Mapping[str, Any]]
34
+ | Mapping[str, Any]
35
+ | Var[Mapping[str, Any]]
36
+ | Breakpoints
37
+ | None = None,
38
+ key: Any | None = None,
39
+ id: Any | None = None,
40
+ ref: Var | None = None,
41
+ class_name: Any | None = None,
42
+ custom_attrs: dict[str, Any | Var] | None = None,
43
+ on_blur: EventType[()] | None = None,
44
+ on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
45
+ on_click_preview: EventType[()] | None = None,
46
+ on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
47
+ on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
48
+ on_duration_change: EventType[Any] | None = None,
49
+ on_ended: EventType[()] | None = None,
50
+ on_enter_picture_in_picture: EventType[()] | None = None,
51
+ on_error: EventType[()] | None = None,
52
+ on_focus: EventType[()] | None = None,
53
+ on_leave_picture_in_picture: EventType[()] | None = None,
54
+ on_mount: EventType[()] | None = None,
55
+ on_mouse_down: EventType[()] | None = None,
56
+ on_mouse_enter: EventType[()] | None = None,
57
+ on_mouse_leave: EventType[()] | None = None,
58
+ on_mouse_move: EventType[()] | None = None,
59
+ on_mouse_out: EventType[()] | None = None,
60
+ on_mouse_over: EventType[()] | None = None,
61
+ on_mouse_up: EventType[()] | None = None,
62
+ on_pause: EventType[()] | None = None,
63
+ on_play: EventType[()] | None = None,
64
+ on_playing: EventType[()] | None = None,
65
+ on_progress: EventType[Any] | None = None,
66
+ on_rate_change: EventType[Any] | None = None,
67
+ on_ready: EventType[()] | None = None,
68
+ on_scroll: EventType[()] | None = None,
69
+ on_scroll_end: EventType[()] | None = None,
70
+ on_seeked: EventType[Any] | None = None,
71
+ on_seeking: EventType[()] | None = None,
72
+ on_start: EventType[()] | None = None,
73
+ on_time_update: EventType[Any] | None = None,
74
+ on_unmount: EventType[()] | None = None,
75
+ on_waiting: EventType[()] | None = None,
76
+ **props,
77
+ ) -> Video:
78
+ """Create a component.
79
+
80
+ Args:
81
+ *children: The children of the component.
82
+ src: 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
+ config: Player-specific configuration parameters.
90
+ disable_remote_playback: Set to true to disable the default remote playback option on supported devices.
91
+ style: The style of the component.
92
+ key: A unique key for the component.
93
+ id: The id for the component.
94
+ ref: The Var to pass as the ref to the component.
95
+ class_name: The class name for the component.
96
+ custom_attrs: Attributes passed directly to the component.
97
+ on_focus: Fired when the element (or some element inside of it) receives focus. For example, it is called when the user clicks on a text input.
98
+ on_blur: Fired when focus has left the element (or left some element inside of it). For example, it is called when the user clicks outside of a focused text input.
99
+ on_click: Fired when the user clicks on an element. For example, it's called when the user clicks on a button.
100
+ on_context_menu: Fired when the user right-clicks on an element.
101
+ on_double_click: Fired when the user double-clicks on an element.
102
+ on_mouse_down: Fired when the user presses a mouse button on an element.
103
+ on_mouse_enter: Fired when the mouse pointer enters the element.
104
+ on_mouse_leave: Fired when the mouse pointer leaves the element.
105
+ on_mouse_move: Fired when the mouse pointer moves over the element.
106
+ on_mouse_out: Fired when the mouse pointer moves out of the element.
107
+ on_mouse_over: Fired when the mouse pointer moves onto the element.
108
+ on_mouse_up: Fired when the user releases a mouse button on an element.
109
+ on_scroll: Fired when the user scrolls the element.
110
+ on_scroll_end: Fired when scrolling ends on the element.
111
+ on_mount: Fired when the component is mounted to the page.
112
+ on_unmount: Fired when the component is removed from the page. Only called during navigation, not on page refresh.
113
+ on_ready: Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
114
+ on_start: Called when media starts playing.
115
+ on_play: Called when playing is set to true.
116
+ on_playing: Called when media starts or resumes playing after pausing or buffering.
117
+ on_progress: Called while the video is loading only. Contains 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 }
118
+ on_time_update: Called when the media's current time changes (~4Hz, use .throttle to limit calls to backend).
119
+ on_duration_change: Callback containing duration of the media, in seconds.
120
+ on_pause: Called when media is paused.
121
+ on_waiting: Called when media starts buffering.
122
+ on_seeking: Called when the media is seeking.
123
+ on_seeked: Called when media seeks with seconds parameter.
124
+ on_rate_change: Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
125
+ on_ended: Called when media finishes playing. Does not fire when loop is set to true.
126
+ on_error: Called when an error occurs whilst attempting to play media.
127
+ on_click_preview: Called when user clicks the light mode preview.
128
+ on_enter_picture_in_picture: Called when picture-in-picture mode is enabled.
129
+ on_leave_picture_in_picture: Called when picture-in-picture mode is disabled.
130
+ **props: The props of the component.
131
+
132
+ Returns:
133
+ The created component.
134
+
135
+ Raises:
136
+ ValueError: If both a deprecated prop and its replacement are both passed.
137
+ """
@@ -1,89 +0,0 @@
1
- """Stub file for reflex_components_react_player/audio.py"""
2
-
3
- # ------------------- DO NOT EDIT ----------------------
4
- # This file was generated by `reflex/utils/pyi_generator.py`!
5
- # ------------------------------------------------------
6
- from collections.abc import Mapping, Sequence
7
- from typing import Any
8
-
9
- from reflex_base.event import EventType, PointerEventInfo
10
- from reflex_base.vars.base import Var
11
- from reflex_components_core.core.breakpoints import Breakpoints
12
-
13
- from reflex_components_react_player.react_player import ReactPlayer
14
-
15
- class Audio(ReactPlayer):
16
- @classmethod
17
- def create(
18
- cls,
19
- *children,
20
- src: Var[list[dict[str, str]] | list[str] | str]
21
- | list[dict[str, str]]
22
- | list[str]
23
- | str
24
- | None = None,
25
- playing: Var[bool] | bool | None = None,
26
- loop: Var[bool] | bool | None = None,
27
- controls: Var[bool] | bool | None = None,
28
- light: Var[bool] | bool | None = None,
29
- volume: Var[float] | float | None = None,
30
- muted: Var[bool] | bool | None = None,
31
- config: Var[dict[str, Any]] | dict[str, Any] | None = None,
32
- disable_remote_playback: Var[bool] | bool | None = None,
33
- style: Sequence[Mapping[str, Any]]
34
- | Mapping[str, Any]
35
- | Var[Mapping[str, Any]]
36
- | Breakpoints
37
- | None = None,
38
- key: Any | None = None,
39
- id: Any | None = None,
40
- ref: Var | None = None,
41
- class_name: Any | None = None,
42
- custom_attrs: dict[str, Var | Any] | None = None,
43
- on_blur: EventType[()] | None = None,
44
- on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
45
- on_click_preview: EventType[()] | None = None,
46
- on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
47
- on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
48
- on_duration_change: EventType[Any] | None = None,
49
- on_ended: EventType[()] | None = None,
50
- on_enter_picture_in_picture: EventType[()] | None = None,
51
- on_error: EventType[()] | None = None,
52
- on_focus: EventType[()] | None = None,
53
- on_leave_picture_in_picture: EventType[()] | None = None,
54
- on_mount: EventType[()] | None = None,
55
- on_mouse_down: EventType[()] | None = None,
56
- on_mouse_enter: EventType[()] | None = None,
57
- on_mouse_leave: EventType[()] | None = None,
58
- on_mouse_move: EventType[()] | None = None,
59
- on_mouse_out: EventType[()] | None = None,
60
- on_mouse_over: EventType[()] | None = None,
61
- on_mouse_up: EventType[()] | None = None,
62
- on_pause: EventType[()] | None = None,
63
- on_play: EventType[()] | None = None,
64
- on_playing: EventType[()] | None = None,
65
- on_progress: EventType[Any] | None = None,
66
- on_rate_change: EventType[Any] | None = None,
67
- on_ready: EventType[()] | None = None,
68
- on_scroll: EventType[()] | None = None,
69
- on_scroll_end: EventType[()] | None = None,
70
- on_seeked: EventType[Any] | None = None,
71
- on_seeking: EventType[()] | None = None,
72
- on_start: EventType[()] | None = None,
73
- on_time_update: EventType[Any] | None = None,
74
- on_unmount: EventType[()] | None = None,
75
- on_waiting: EventType[()] | None = None,
76
- **props,
77
- ) -> Audio:
78
- """Create a component.
79
-
80
- Args:
81
- children: The children of the component.
82
- props: The props of the component.
83
-
84
- Returns:
85
- The created component.
86
-
87
- Raises:
88
- ValueError: If both a deprecated prop and its replacement are both passed.
89
- """
@@ -1,109 +0,0 @@
1
- """Stub file for reflex_components_react_player/react_player.py"""
2
-
3
- # ------------------- DO NOT EDIT ----------------------
4
- # This file was generated by `reflex/utils/pyi_generator.py`!
5
- # ------------------------------------------------------
6
- from collections.abc import Mapping, Sequence
7
- from typing import Any, TypedDict
8
-
9
- from reflex_base.components.component import Component
10
- from reflex_base.event import EventType, PointerEventInfo
11
- from reflex_base.vars.base import Var
12
- from reflex_base.vars.object import ObjectVar
13
- from reflex_components_core.core.breakpoints import Breakpoints
14
-
15
- ReactPlayerEvent = ObjectVar[dict[str, dict[str, dict[str, Any]]]]
16
-
17
- class Progress(TypedDict):
18
- played: float
19
- playedSeconds: float
20
- loaded: float
21
- loadedSeconds: float
22
- duration: float
23
-
24
- _DEPRECATED_PROP_MAP = {
25
- "url": "src",
26
- "on_duration": "on_duration_change",
27
- "on_playback_rate_change": "on_rate_change",
28
- "on_seek": "on_seeked",
29
- "on_buffer": "on_waiting",
30
- "on_buffer_end": "on_playing",
31
- "on_enable_pip": "on_enter_picture_in_picture",
32
- "on_disable_pip": "on_leave_picture_in_picture",
33
- }
34
-
35
- class ReactPlayer(Component):
36
- @classmethod
37
- def create(
38
- cls,
39
- *children,
40
- src: Var[list[dict[str, str]] | list[str] | str]
41
- | list[dict[str, str]]
42
- | list[str]
43
- | str
44
- | None = None,
45
- playing: Var[bool] | bool | None = None,
46
- loop: Var[bool] | bool | None = None,
47
- controls: Var[bool] | bool | None = None,
48
- light: Var[bool] | bool | None = None,
49
- volume: Var[float] | float | None = None,
50
- muted: Var[bool] | bool | None = None,
51
- config: Var[dict[str, Any]] | dict[str, Any] | None = None,
52
- disable_remote_playback: Var[bool] | bool | None = None,
53
- style: Sequence[Mapping[str, Any]]
54
- | Mapping[str, Any]
55
- | Var[Mapping[str, Any]]
56
- | Breakpoints
57
- | None = None,
58
- key: Any | None = None,
59
- id: Any | None = None,
60
- ref: Var | None = None,
61
- class_name: Any | None = None,
62
- custom_attrs: dict[str, Var | Any] | None = None,
63
- on_blur: EventType[()] | None = None,
64
- on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
65
- on_click_preview: EventType[()] | None = None,
66
- on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
67
- on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
68
- on_duration_change: EventType[Any] | None = None,
69
- on_ended: EventType[()] | None = None,
70
- on_enter_picture_in_picture: EventType[()] | None = None,
71
- on_error: EventType[()] | None = None,
72
- on_focus: EventType[()] | None = None,
73
- on_leave_picture_in_picture: EventType[()] | None = None,
74
- on_mount: EventType[()] | None = None,
75
- on_mouse_down: EventType[()] | None = None,
76
- on_mouse_enter: EventType[()] | None = None,
77
- on_mouse_leave: EventType[()] | None = None,
78
- on_mouse_move: EventType[()] | None = None,
79
- on_mouse_out: EventType[()] | None = None,
80
- on_mouse_over: EventType[()] | None = None,
81
- on_mouse_up: EventType[()] | None = None,
82
- on_pause: EventType[()] | None = None,
83
- on_play: EventType[()] | None = None,
84
- on_playing: EventType[()] | None = None,
85
- on_progress: EventType[Any] | None = None,
86
- on_rate_change: EventType[Any] | None = None,
87
- on_ready: EventType[()] | None = None,
88
- on_scroll: EventType[()] | None = None,
89
- on_scroll_end: EventType[()] | None = None,
90
- on_seeked: EventType[Any] | None = None,
91
- on_seeking: EventType[()] | None = None,
92
- on_start: EventType[()] | None = None,
93
- on_time_update: EventType[Any] | None = None,
94
- on_unmount: EventType[()] | None = None,
95
- on_waiting: EventType[()] | None = None,
96
- **props,
97
- ) -> ReactPlayer:
98
- """Create a component.
99
-
100
- Args:
101
- children: The children of the component.
102
- props: The props of the component.
103
-
104
- Returns:
105
- The created component.
106
-
107
- Raises:
108
- ValueError: If both a deprecated prop and its replacement are both passed.
109
- """
@@ -1,89 +0,0 @@
1
- """Stub file for reflex_components_react_player/video.py"""
2
-
3
- # ------------------- DO NOT EDIT ----------------------
4
- # This file was generated by `reflex/utils/pyi_generator.py`!
5
- # ------------------------------------------------------
6
- from collections.abc import Mapping, Sequence
7
- from typing import Any
8
-
9
- from reflex_base.event import EventType, PointerEventInfo
10
- from reflex_base.vars.base import Var
11
- from reflex_components_core.core.breakpoints import Breakpoints
12
-
13
- from reflex_components_react_player.react_player import ReactPlayer
14
-
15
- class Video(ReactPlayer):
16
- @classmethod
17
- def create(
18
- cls,
19
- *children,
20
- src: Var[list[dict[str, str]] | list[str] | str]
21
- | list[dict[str, str]]
22
- | list[str]
23
- | str
24
- | None = None,
25
- playing: Var[bool] | bool | None = None,
26
- loop: Var[bool] | bool | None = None,
27
- controls: Var[bool] | bool | None = None,
28
- light: Var[bool] | bool | None = None,
29
- volume: Var[float] | float | None = None,
30
- muted: Var[bool] | bool | None = None,
31
- config: Var[dict[str, Any]] | dict[str, Any] | None = None,
32
- disable_remote_playback: Var[bool] | bool | None = None,
33
- style: Sequence[Mapping[str, Any]]
34
- | Mapping[str, Any]
35
- | Var[Mapping[str, Any]]
36
- | Breakpoints
37
- | None = None,
38
- key: Any | None = None,
39
- id: Any | None = None,
40
- ref: Var | None = None,
41
- class_name: Any | None = None,
42
- custom_attrs: dict[str, Var | Any] | None = None,
43
- on_blur: EventType[()] | None = None,
44
- on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
45
- on_click_preview: EventType[()] | None = None,
46
- on_context_menu: EventType[()] | EventType[PointerEventInfo] | None = None,
47
- on_double_click: EventType[()] | EventType[PointerEventInfo] | None = None,
48
- on_duration_change: EventType[Any] | None = None,
49
- on_ended: EventType[()] | None = None,
50
- on_enter_picture_in_picture: EventType[()] | None = None,
51
- on_error: EventType[()] | None = None,
52
- on_focus: EventType[()] | None = None,
53
- on_leave_picture_in_picture: EventType[()] | None = None,
54
- on_mount: EventType[()] | None = None,
55
- on_mouse_down: EventType[()] | None = None,
56
- on_mouse_enter: EventType[()] | None = None,
57
- on_mouse_leave: EventType[()] | None = None,
58
- on_mouse_move: EventType[()] | None = None,
59
- on_mouse_out: EventType[()] | None = None,
60
- on_mouse_over: EventType[()] | None = None,
61
- on_mouse_up: EventType[()] | None = None,
62
- on_pause: EventType[()] | None = None,
63
- on_play: EventType[()] | None = None,
64
- on_playing: EventType[()] | None = None,
65
- on_progress: EventType[Any] | None = None,
66
- on_rate_change: EventType[Any] | None = None,
67
- on_ready: EventType[()] | None = None,
68
- on_scroll: EventType[()] | None = None,
69
- on_scroll_end: EventType[()] | None = None,
70
- on_seeked: EventType[Any] | None = None,
71
- on_seeking: EventType[()] | None = None,
72
- on_start: EventType[()] | None = None,
73
- on_time_update: EventType[Any] | None = None,
74
- on_unmount: EventType[()] | None = None,
75
- on_waiting: EventType[()] | None = None,
76
- **props,
77
- ) -> Video:
78
- """Create a component.
79
-
80
- Args:
81
- children: The children of the component.
82
- props: The props of the component.
83
-
84
- Returns:
85
- The created component.
86
-
87
- Raises:
88
- ValueError: If both a deprecated prop and its replacement are both passed.
89
- """