Skip to content

Commit 6a1f83a

Browse files
committed
ReactPlayer: NoSSRComponent -> Component
Update comments describing props for typo/accuracy
1 parent 02715b6 commit 6a1f83a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"reflex/components/radix/themes/typography/link.pyi": "85d50a3c89a8b3b019289d20d85e9960",
109109
"reflex/components/radix/themes/typography/text.pyi": "5397e5691b5f0b324378f2fcb6bf0f1f",
110110
"reflex/components/react_player/audio.pyi": "9de7d9830534c6ec1f305434c4d8abd8",
111-
"reflex/components/react_player/react_player.pyi": "c7dd02e62b26b51344a3fc26e10f08bb",
111+
"reflex/components/react_player/react_player.pyi": "7a7a29a64a0d127c12c8131abcd012d1",
112112
"reflex/components/react_player/video.pyi": "e946b4915b41326d4e4b39381349d152",
113113
"reflex/components/react_router/dom.pyi": "ea17a16e817523009e30fb049b1cf9dc",
114114
"reflex/components/recharts/__init__.pyi": "6ee7f1ca2c0912f389ba6f3251a74d99",

reflex/components/react_player/react_player.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from typing import Any, TypedDict
66

7-
from reflex.components.component import NoSSRComponent
7+
from reflex.components.component import Component
88
from reflex.components.core.cond import cond
99
from reflex.event import EventHandler, no_args_event_spec
1010
from reflex.utils import console
@@ -125,7 +125,7 @@ def _on_rate_change_signature(event: ReactPlayerEvent) -> list[Var[float]]:
125125
}
126126

127127

128-
class ReactPlayer(NoSSRComponent):
128+
class ReactPlayer(Component):
129129
"""Using react-player and not implement all props and callback yet.
130130
reference: https://github.com/cookpete/react-player.
131131
"""
@@ -172,10 +172,10 @@ class ReactPlayer(NoSSRComponent):
172172
# Called when media starts or resumes playing after pausing or buffering.
173173
on_playing: EventHandler[no_args_event_spec]
174174

175-
# Called while the video is loading. 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 }
175+
# 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 }
176176
on_progress: EventHandler[_on_progress_signature]
177177

178-
# Called when the media's current time changes.
178+
# Called when the media's current time changes (~4Hz, use .throttle to limit calls to backend).
179179
on_time_update: EventHandler[_on_time_update_signature]
180180

181181
# Callback containing duration of the media, in seconds.
@@ -187,7 +187,7 @@ class ReactPlayer(NoSSRComponent):
187187
# Called when media starts buffering.
188188
on_waiting: EventHandler[no_args_event_spec]
189189

190-
# Callend when the media is seeking.
190+
# Called when the media is seeking.
191191
on_seeking: EventHandler[no_args_event_spec]
192192

193193
# Called when media seeks with seconds parameter.

0 commit comments

Comments
 (0)