streamlit-webrtc 0.47.9__py3-none-any.whl → 0.48.0__py3-none-any.whl
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.
- streamlit_webrtc/_compat.py +8 -0
- streamlit_webrtc/component.py +9 -3
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/METADATA +3 -3
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/RECORD +6 -11
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/WHEEL +1 -1
- streamlit_webrtc/frontend/build/asset-manifest.json +0 -10
- streamlit_webrtc/frontend/build/index.html +0 -1
- streamlit_webrtc/frontend/build/static/js/main.ff279b83.js +0 -103
- streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.LICENSE.txt +0 -122
- streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.map +0 -1
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/LICENSE +0 -0
streamlit_webrtc/_compat.py
CHANGED
@@ -40,6 +40,14 @@ to abstract and improve the session behavior.
|
|
40
40
|
Ref: https://github.com/streamlit/streamlit/pull/5856
|
41
41
|
"""
|
42
42
|
|
43
|
+
VER_GTE_1_36_0 = ST_VERSION >= version.parse("1.36.0")
|
44
|
+
""" Since 1.36.0, the `on_change` handler on a custom component is supported.
|
45
|
+
Ref: https://github.com/streamlit/streamlit/issues/3977
|
46
|
+
Also, the `.components_callbacks.register_callback` hack no longer works since 1.39.0
|
47
|
+
where the registered callback via this hack is not called,
|
48
|
+
so we must use the new `on_change` handler.
|
49
|
+
"""
|
50
|
+
|
43
51
|
try:
|
44
52
|
from streamlit.runtime.app_session import AppSession, AppSessionState
|
45
53
|
except ModuleNotFoundError:
|
streamlit_webrtc/component.py
CHANGED
@@ -28,7 +28,7 @@ from streamlit_webrtc.models import (
|
|
28
28
|
VideoFrameCallback,
|
29
29
|
)
|
30
30
|
|
31
|
-
from ._compat import rerun
|
31
|
+
from ._compat import VER_GTE_1_36_0, rerun
|
32
32
|
from .components_callbacks import register_callback
|
33
33
|
from .config import (
|
34
34
|
DEFAULT_AUDIO_HTML_ATTRS,
|
@@ -481,8 +481,13 @@ def webrtc_streamer(
|
|
481
481
|
if on_change and old_state != new_state:
|
482
482
|
on_change()
|
483
483
|
|
484
|
-
|
485
|
-
|
484
|
+
if not VER_GTE_1_36_0:
|
485
|
+
register_callback(element_key=frontend_key, callback=callback)
|
486
|
+
kwargs = {}
|
487
|
+
else:
|
488
|
+
kwargs = {
|
489
|
+
"on_change": callback,
|
490
|
+
}
|
486
491
|
component_value_raw: Union[Dict, str, None] = _component_func(
|
487
492
|
key=frontend_key,
|
488
493
|
sdp_answer_json=sdp_answer_json,
|
@@ -494,6 +499,7 @@ def webrtc_streamer(
|
|
494
499
|
audio_html_attrs=audio_html_attrs,
|
495
500
|
translations=translations,
|
496
501
|
desired_playing_state=desired_playing_state,
|
502
|
+
**kwargs,
|
497
503
|
)
|
498
504
|
# HOTFIX: The return value from _component_func()
|
499
505
|
# is of type str with streamlit==0.84.0.
|
@@ -1,8 +1,7 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: streamlit-webrtc
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.48.0
|
4
4
|
Summary: Real-time video and audio processing on Streamlit
|
5
|
-
Home-page: https://github.com/whitphx/streamlit-webrtc
|
6
5
|
License: MIT
|
7
6
|
Author: Yuichiro Tachibana (Tsuchiya)
|
8
7
|
Author-email: t.yic.yt@gmail.com
|
@@ -14,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.10
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
16
15
|
Classifier: Programming Language :: Python :: 3.12
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
17
17
|
Requires-Dist: aiortc (>=1.9.0,<2.0.0)
|
18
18
|
Requires-Dist: packaging (>=20.0)
|
19
19
|
Requires-Dist: streamlit (>=0.84.1)
|
@@ -1,15 +1,10 @@
|
|
1
1
|
streamlit_webrtc/__init__.py,sha256=q5YB2Sx6amHctUMrZ76UqLgB5mrdR6ArRDK6eiKyKBo,2254
|
2
|
-
streamlit_webrtc/_compat.py,sha256=
|
3
|
-
streamlit_webrtc/component.py,sha256=
|
2
|
+
streamlit_webrtc/_compat.py,sha256=43RUwFoGdRBq8EkOdf6inWkl-qogs5lF8tc-sYrVd1s,4128
|
3
|
+
streamlit_webrtc/component.py,sha256=cyDH4YQbfJd8MWjV6hWpF9XQDoztLzYOXb1L31bLP6o,24182
|
4
4
|
streamlit_webrtc/components_callbacks.py,sha256=tdrj2TlV8qcexFEdjm4PVkz8JwHffo4A8imoXOtjNHA,2401
|
5
5
|
streamlit_webrtc/config.py,sha256=Yoppkv0aHFEpHp5IWPgy3tbohAsm-FGEtoH5Zbgwltw,4114
|
6
6
|
streamlit_webrtc/eventloop.py,sha256=AFmxGlRRxVdl0cTS9pKpRZR2Mnq6v6DgudVZZ425IVw,1333
|
7
7
|
streamlit_webrtc/factory.py,sha256=XeHefJ6d_aHE7Oy_oqz5dWsfVKuVxjtifilvs4cMBWs,6806
|
8
|
-
streamlit_webrtc/frontend/build/asset-manifest.json,sha256=4NkiKr1FEUv_5FCvWWCLE84L2uGEGr5itOy1hGk1-IE,221
|
9
|
-
streamlit_webrtc/frontend/build/index.html,sha256=Cp3X6AH856niw8ESeZUMMqBl94NfcAKrNKr8TX_zd7g,457
|
10
|
-
streamlit_webrtc/frontend/build/static/js/main.ff279b83.js,sha256=fUiXyvYwPjZsDu5g0cyXDk1VLhQ9AESQ40IyN4ft8Z4,557766
|
11
|
-
streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.LICENSE.txt,sha256=tFd79Iemf1ZVv96kX3gab39vXsPh-SFeKpfkk0rgyYE,4256
|
12
|
-
streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.map,sha256=LzaNuxQvqeDroTfpeK2kX2oakL8SKBKQbZUgkwmUM04,2319221
|
13
8
|
streamlit_webrtc/mix.py,sha256=Cd1a3bmJdCY_5Ita-bvW0Y5a0ydLHBANojBOqJ1Govo,8692
|
14
9
|
streamlit_webrtc/models.py,sha256=xhrz9OpNsOarlN30YpBqVQwkTs4NUk_PLI6a7fIv950,6184
|
15
10
|
streamlit_webrtc/process.py,sha256=_VzGmDA_q4XtReoM3tfF8RaxH44E_ZbCZLEOJdT-Thk,7782
|
@@ -21,7 +16,7 @@ streamlit_webrtc/session_info.py,sha256=pg_2RFexR18UfwpZT5ENcPfedEiWuAxBuXc2RRuF
|
|
21
16
|
streamlit_webrtc/shutdown.py,sha256=rbWMhOIrbOBZDlqqBTzCfs4MuHQ0UEhljkNvvXoeTz0,2171
|
22
17
|
streamlit_webrtc/source.py,sha256=haPqMZ50Xh8tg7Z1yN8Frfk8v7D3oOuKteaD59asbzs,2263
|
23
18
|
streamlit_webrtc/webrtc.py,sha256=grVZTC1wnL8ZpPO0vjABarvAzXzinTAWSSND-SdTAzc,27064
|
24
|
-
streamlit_webrtc-0.
|
25
|
-
streamlit_webrtc-0.
|
26
|
-
streamlit_webrtc-0.
|
27
|
-
streamlit_webrtc-0.
|
19
|
+
streamlit_webrtc-0.48.0.dist-info/LICENSE,sha256=pwccNHVA7r4rYofGlMU10aKEU90GLUlQr8uY80PR0NQ,1081
|
20
|
+
streamlit_webrtc-0.48.0.dist-info/METADATA,sha256=OFhFHKP6yjIJRX0U-ZERY3RIg3ybhgBhMPpv_XYFtAE,19104
|
21
|
+
streamlit_webrtc-0.48.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
22
|
+
streamlit_webrtc-0.48.0.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><title>Streamlit WebRTC Component</title><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Streamlit WebRTC Component"/><script defer="defer" src="./static/js/main.ff279b83.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|