streamlit-webrtc 0.47.8__tar.gz → 0.48.0__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.
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/PKG-INFO +5 -6
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/pyproject.toml +6 -10
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/_compat.py +8 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/component.py +12 -12
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/config.py +1 -6
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/factory.py +1 -6
- streamlit_webrtc-0.48.0/streamlit_webrtc/frontend/build/asset-manifest.json +10 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/frontend/build/index.html +1 -1
- streamlit_webrtc-0.48.0/streamlit_webrtc/frontend/build/static/js/main.39438811.js +103 -0
- streamlit_webrtc-0.48.0/streamlit_webrtc/frontend/build/static/js/main.39438811.js.LICENSE.txt +69 -0
- streamlit_webrtc-0.48.0/streamlit_webrtc/frontend/build/static/js/main.39438811.js.map +1 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/webrtc.py +3 -8
- streamlit_webrtc-0.47.8/streamlit_webrtc/frontend/build/asset-manifest.json +0 -10
- streamlit_webrtc-0.47.8/streamlit_webrtc/frontend/build/static/js/main.ff279b83.js +0 -103
- streamlit_webrtc-0.47.8/streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.LICENSE.txt +0 -122
- streamlit_webrtc-0.47.8/streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.map +0 -1
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/LICENSE +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/README.md +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/__init__.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/components_callbacks.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/eventloop.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/mix.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/models.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/process.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/py.typed +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/receive.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/relay.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/server.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/session_info.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/shutdown.py +0 -0
- {streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/source.py +0 -0
@@ -1,10 +1,9 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: streamlit-webrtc
|
3
|
-
Version: 0.
|
4
|
-
Summary:
|
5
|
-
Home-page: https://github.com/whitphx/streamlit-webrtc
|
3
|
+
Version: 0.48.0
|
4
|
+
Summary: Real-time video and audio processing on Streamlit
|
6
5
|
License: MIT
|
7
|
-
Author: Yuichiro Tsuchiya
|
6
|
+
Author: Yuichiro Tachibana (Tsuchiya)
|
8
7
|
Author-email: t.yic.yt@gmail.com
|
9
8
|
Requires-Python: >=3.8, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
|
10
9
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -14,10 +13,10 @@ 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)
|
20
|
-
Requires-Dist: typing_extensions (>=3.7.4,<5.0.0) ; python_version < "3.8"
|
21
20
|
Project-URL: Repository, https://github.com/whitphx/streamlit-webrtc
|
22
21
|
Description-Content-Type: text/markdown
|
23
22
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "streamlit-webrtc"
|
3
|
-
version = "0.
|
4
|
-
description = ""
|
5
|
-
authors = ["Yuichiro Tsuchiya <t.yic.yt@gmail.com>"]
|
3
|
+
version = "0.48.0"
|
4
|
+
description = "Real-time video and audio processing on Streamlit"
|
5
|
+
authors = ["Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>"]
|
6
6
|
license = "MIT"
|
7
7
|
readme = "README.md"
|
8
8
|
repository = "https://github.com/whitphx/streamlit-webrtc"
|
@@ -15,12 +15,11 @@ python = ">=3.8,<4,!=3.9.7" # 3.9.7 is excluded due to https://github.com/strea
|
|
15
15
|
# 0.84.0 has an error at marshalling component values.
|
16
16
|
streamlit = ">=0.84.1"
|
17
17
|
aiortc = "^1.9.0" # aiortc<1.4.0 causes an error with cryptography>=39.0.0. See https://github.com/whitphx/streamlit-webrtc/issues/1164. The fix was introduced into aiortc in https://github.com/aiortc/aiortc/commit/08b0a7e9f5030a9f7e5617382e92560d4ae763a2 that 1.4.0 included.
|
18
|
-
typing_extensions = { version = ">=3.7.4,<5.0.0", python = "<3.8" }
|
19
18
|
packaging = ">=20.0"
|
20
19
|
|
21
20
|
[tool.poetry.group.dev.dependencies]
|
22
|
-
click = ">=7.0,<
|
23
|
-
ruff = ">=0.3,<0.
|
21
|
+
click = ">=7.0,<9.0" # We must specify the click version because we install older versions of Streamlit in the CI process and their depending click version is different from the newer releases.
|
22
|
+
ruff = ">=0.3,<0.8"
|
24
23
|
mypy = "^1.11.2"
|
25
24
|
pydub = "^0.25.1"
|
26
25
|
matplotlib = "^3.5.1"
|
@@ -30,10 +29,7 @@ pytest = ">=7.1.2,<9.0.0"
|
|
30
29
|
opencv-python-headless = "^4.5.4.58"
|
31
30
|
# It is necessary to specify numpy and pandas versions for Poetry to resolve the package versions correctly and avoid errors.
|
32
31
|
numpy = "^1.21.0"
|
33
|
-
pandas =
|
34
|
-
{version = "1.1.5", python = ">=3.7,<3.8"},
|
35
|
-
{version = "^1.4.0", python = ">=3.8,<3.11"},
|
36
|
-
]
|
32
|
+
pandas = "^2.0.3"
|
37
33
|
streamlit = "^1.13.0"
|
38
34
|
twilio = ">=8.1,<10.0"
|
39
35
|
|
@@ -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:
|
@@ -10,11 +10,14 @@ from typing import (
|
|
10
10
|
Generic,
|
11
11
|
NamedTuple,
|
12
12
|
Optional,
|
13
|
+
TypedDict,
|
13
14
|
Union,
|
14
15
|
cast,
|
15
16
|
overload,
|
16
17
|
)
|
17
18
|
|
19
|
+
import streamlit as st
|
20
|
+
import streamlit.components.v1 as components
|
18
21
|
from aiortc.mediastreams import MediaStreamTrack
|
19
22
|
|
20
23
|
from streamlit_webrtc.models import (
|
@@ -25,16 +28,7 @@ from streamlit_webrtc.models import (
|
|
25
28
|
VideoFrameCallback,
|
26
29
|
)
|
27
30
|
|
28
|
-
|
29
|
-
from typing import TypedDict
|
30
|
-
except ImportError:
|
31
|
-
# Python < 3.8
|
32
|
-
from typing_extensions import TypedDict
|
33
|
-
|
34
|
-
import streamlit as st
|
35
|
-
import streamlit.components.v1 as components
|
36
|
-
|
37
|
-
from ._compat import rerun
|
31
|
+
from ._compat import VER_GTE_1_36_0, rerun
|
38
32
|
from .components_callbacks import register_callback
|
39
33
|
from .config import (
|
40
34
|
DEFAULT_AUDIO_HTML_ATTRS,
|
@@ -487,8 +481,13 @@ def webrtc_streamer(
|
|
487
481
|
if on_change and old_state != new_state:
|
488
482
|
on_change()
|
489
483
|
|
490
|
-
|
491
|
-
|
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
|
+
}
|
492
491
|
component_value_raw: Union[Dict, str, None] = _component_func(
|
493
492
|
key=frontend_key,
|
494
493
|
sdp_answer_json=sdp_answer_json,
|
@@ -500,6 +499,7 @@ def webrtc_streamer(
|
|
500
499
|
audio_html_attrs=audio_html_attrs,
|
501
500
|
translations=translations,
|
502
501
|
desired_playing_state=desired_playing_state,
|
502
|
+
**kwargs,
|
503
503
|
)
|
504
504
|
# HOTFIX: The return value from _component_func()
|
505
505
|
# is of type str with streamlit==0.84.0.
|
@@ -1,9 +1,4 @@
|
|
1
|
-
from typing import Optional, Union, overload
|
2
|
-
|
3
|
-
try:
|
4
|
-
from typing import Literal
|
5
|
-
except ImportError:
|
6
|
-
from typing_extensions import Literal # type: ignore
|
1
|
+
from typing import Literal, Optional, Union, overload
|
7
2
|
|
8
3
|
import streamlit as st
|
9
4
|
from aiortc import MediaStreamTrack
|
{streamlit_webrtc-0.47.8 → streamlit_webrtc-0.48.0}/streamlit_webrtc/frontend/build/index.html
RENAMED
@@ -1 +1 @@
|
|
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.
|
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.39438811.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|