streamlit-webrtc 0.63.0__py3-none-any.whl → 0.63.2__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/frontend/dist/assets/index-4jnSNRmM.js +258 -0
- streamlit_webrtc/frontend/dist/index.html +1 -1
- streamlit_webrtc/mix.py +6 -7
- streamlit_webrtc/process.py +17 -15
- {streamlit_webrtc-0.63.0.dist-info → streamlit_webrtc-0.63.2.dist-info}/METADATA +2 -2
- {streamlit_webrtc-0.63.0.dist-info → streamlit_webrtc-0.63.2.dist-info}/RECORD +8 -8
- streamlit_webrtc/frontend/dist/assets/index-Cn4hJFys.js +0 -258
- {streamlit_webrtc-0.63.0.dist-info → streamlit_webrtc-0.63.2.dist-info}/WHEEL +0 -0
- {streamlit_webrtc-0.63.0.dist-info → streamlit_webrtc-0.63.2.dist-info}/licenses/LICENSE +0 -0
@@ -6,7 +6,7 @@
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
7
|
<meta name="theme-color" content="#000000" />
|
8
8
|
<meta name="description" content="Streamlit WebRTC Component" />
|
9
|
-
<script type="module" crossorigin src="./assets/index-
|
9
|
+
<script type="module" crossorigin src="./assets/index-4jnSNRmM.js"></script>
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
streamlit_webrtc/mix.py
CHANGED
@@ -2,10 +2,8 @@ import asyncio
|
|
2
2
|
import fractions
|
3
3
|
import functools
|
4
4
|
import logging
|
5
|
-
import sys
|
6
5
|
import threading
|
7
6
|
import time
|
8
|
-
import traceback
|
9
7
|
import weakref
|
10
8
|
from collections import OrderedDict
|
11
9
|
from typing import Callable, Generic, List, NamedTuple, Optional, Union, cast
|
@@ -106,11 +104,12 @@ async def mix_coro(mix_track: "MediaStreamMixTrack"):
|
|
106
104
|
output_frame.pts = int(timestamp * AUDIO_SAMPLE_RATE)
|
107
105
|
output_frame.time_base = AUDIO_TIME_BASE
|
108
106
|
|
109
|
-
except Exception:
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
107
|
+
except Exception as exc:
|
108
|
+
LOGGER.error(
|
109
|
+
"Error occurred in the WebRTC mixer task: %s", exc, exc_info=True
|
110
|
+
)
|
111
|
+
raise exc
|
112
|
+
|
114
113
|
mix_track._queue.put_nowait(output_frame)
|
115
114
|
|
116
115
|
wait = this_iter_start_time + mix_track.mixer_output_interval - time.monotonic()
|
streamlit_webrtc/process.py
CHANGED
@@ -2,10 +2,8 @@ import asyncio
|
|
2
2
|
import itertools
|
3
3
|
import logging
|
4
4
|
import queue
|
5
|
-
import sys
|
6
5
|
import threading
|
7
6
|
import time
|
8
|
-
import traceback
|
9
7
|
from collections import deque
|
10
8
|
from typing import Generic, List, Optional, Union
|
11
9
|
|
@@ -84,6 +82,15 @@ class AsyncMediaProcessTrack(MediaStreamTrack, Generic[ProcessorT, FrameT]):
|
|
84
82
|
|
85
83
|
self._thread: Optional[threading.Thread] = None
|
86
84
|
|
85
|
+
self._worker_exception_lock = threading.Lock()
|
86
|
+
self._worker_exception: Optional[Exception] = None
|
87
|
+
|
88
|
+
def on_input_track_ended():
|
89
|
+
logger.debug("Input track %s ended. Stop self %s", self.track, self)
|
90
|
+
self.stop()
|
91
|
+
|
92
|
+
self.track.on("ended", on_input_track_ended)
|
93
|
+
|
87
94
|
def _start(self) -> None:
|
88
95
|
if self._thread:
|
89
96
|
return
|
@@ -99,22 +106,13 @@ class AsyncMediaProcessTrack(MediaStreamTrack, Generic[ProcessorT, FrameT]):
|
|
99
106
|
)
|
100
107
|
self._thread.start()
|
101
108
|
|
102
|
-
def on_input_track_ended():
|
103
|
-
logger.debug("Input track %s ended. Stop self %s", self.track, self)
|
104
|
-
self.stop()
|
105
|
-
|
106
|
-
self.track.on("ended", on_input_track_ended)
|
107
|
-
|
108
109
|
def _run_worker_thread(self):
|
109
110
|
try:
|
110
111
|
self._worker_thread()
|
111
|
-
except Exception:
|
112
|
-
logger.error("Error occurred in the WebRTC thread:")
|
113
|
-
|
114
|
-
|
115
|
-
for tb in traceback.format_exception(exc_type, exc_value, exc_traceback):
|
116
|
-
for tbline in tb.rstrip().splitlines():
|
117
|
-
logger.error(tbline.rstrip())
|
112
|
+
except Exception as exc:
|
113
|
+
logger.error("Error occurred in the WebRTC thread: %s", exc, exc_info=True)
|
114
|
+
with self._worker_exception_lock:
|
115
|
+
self._worker_exception = exc
|
118
116
|
|
119
117
|
async def _fallback_recv_queued(self, frames: List[FrameT]) -> List[FrameT]:
|
120
118
|
"""
|
@@ -224,6 +222,10 @@ class AsyncMediaProcessTrack(MediaStreamTrack, Generic[ProcessorT, FrameT]):
|
|
224
222
|
if self.readyState != "live":
|
225
223
|
raise MediaStreamError
|
226
224
|
|
225
|
+
with self._worker_exception_lock:
|
226
|
+
if self._worker_exception:
|
227
|
+
raise self._worker_exception
|
228
|
+
|
227
229
|
self._start()
|
228
230
|
|
229
231
|
frame = await self.track.recv()
|
@@ -1,13 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: streamlit-webrtc
|
3
|
-
Version: 0.63.
|
3
|
+
Version: 0.63.2
|
4
4
|
Summary: Real-time video and audio processing on Streamlit
|
5
5
|
Project-URL: Repository, https://github.com/whitphx/streamlit-webrtc
|
6
6
|
Author-email: "Yuichiro Tachibana (Tsuchiya)" <t.yic.yt@gmail.com>
|
7
7
|
License-Expression: MIT
|
8
8
|
License-File: LICENSE
|
9
9
|
Requires-Python: !=3.9.7,>=3.9
|
10
|
-
Requires-Dist: aioice>=0.10.
|
10
|
+
Requires-Dist: aioice>=0.10.1
|
11
11
|
Requires-Dist: aiortc>=1.11.0
|
12
12
|
Requires-Dist: packaging>=20.0
|
13
13
|
Requires-Dist: streamlit>=0.89.0
|
@@ -6,9 +6,9 @@ streamlit_webrtc/config.py,sha256=yKFIVjIoX2F62_G2qcDrNYm2Qe_qx1E9E0YqAnAibMo,55
|
|
6
6
|
streamlit_webrtc/credentials.py,sha256=fTs-DhUhScK8m7OEfkgTMw7pKXnS9QNpjtJAvR9oIzs,4619
|
7
7
|
streamlit_webrtc/eventloop.py,sha256=AFmxGlRRxVdl0cTS9pKpRZR2Mnq6v6DgudVZZ425IVw,1333
|
8
8
|
streamlit_webrtc/factory.py,sha256=4iKhb_g0wBO1YRoyCmdqIYwkNXODt4f9KbKxni5mQ0s,7927
|
9
|
-
streamlit_webrtc/mix.py,sha256=
|
9
|
+
streamlit_webrtc/mix.py,sha256=8uQXCJvC3FISU4jRpPAnXXEXFgeMPGk3wKI6p4WfIHQ,8643
|
10
10
|
streamlit_webrtc/models.py,sha256=3sKVjCFgX-eQ7nlMHGWxzR9ohdstxUSZaiOHjyDAHVQ,6308
|
11
|
-
streamlit_webrtc/process.py,sha256=
|
11
|
+
streamlit_webrtc/process.py,sha256=sz-jo3od2yjVWLEO89zVRhXKKiYxrjcMA-McNz7lzhQ,7956
|
12
12
|
streamlit_webrtc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
streamlit_webrtc/receive.py,sha256=gzv1uZDTAlxJ0hyJ5LweTr0lVuoisrH5xRevGnYkWwo,2922
|
14
14
|
streamlit_webrtc/relay.py,sha256=2K2h0uNz50ARUOScYZPYlEmZb0uAi0agaYxI9z3mLeI,896
|
@@ -17,9 +17,9 @@ streamlit_webrtc/session_info.py,sha256=V1EdzD2I8dWANXdC84EKSz8XgPM-zugtkYsb4hJm
|
|
17
17
|
streamlit_webrtc/shutdown.py,sha256=PUjMoNZcTRGzZCooCmjWARpeVs5EG_9JXAf1Iay7dBM,2353
|
18
18
|
streamlit_webrtc/source.py,sha256=-bcvQYMyXcrhnsQNL3VlHwLT4KGjJ4jIZcPLKrbczZM,4215
|
19
19
|
streamlit_webrtc/webrtc.py,sha256=WzgydYm3Xhoi5c1QHNLc_GiF_E0aGC5ynzmxeAbtJCw,29900
|
20
|
-
streamlit_webrtc/frontend/dist/index.html,sha256=
|
21
|
-
streamlit_webrtc/frontend/dist/assets/index-
|
22
|
-
streamlit_webrtc-0.63.
|
23
|
-
streamlit_webrtc-0.63.
|
24
|
-
streamlit_webrtc-0.63.
|
25
|
-
streamlit_webrtc-0.63.
|
20
|
+
streamlit_webrtc/frontend/dist/index.html,sha256=68D6PDNx0C4SAHnTcjTbJXf7rUFKm8SFhU9gu5xsRyA,527
|
21
|
+
streamlit_webrtc/frontend/dist/assets/index-4jnSNRmM.js,sha256=JaUM7ss0KLDvThxYulCxA16l5OMlXOHjD84yi2B5hY8,586448
|
22
|
+
streamlit_webrtc-0.63.2.dist-info/METADATA,sha256=VOPRi6SSYbFXAGfhIC3_4O9PnCvAu_vimOOajSu3aP8,18288
|
23
|
+
streamlit_webrtc-0.63.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
24
|
+
streamlit_webrtc-0.63.2.dist-info/licenses/LICENSE,sha256=pwccNHVA7r4rYofGlMU10aKEU90GLUlQr8uY80PR0NQ,1081
|
25
|
+
streamlit_webrtc-0.63.2.dist-info/RECORD,,
|