streamlit-webrtc 0.56.0__py3-none-any.whl → 0.60.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 +7 -0
- streamlit_webrtc/credentials.py +10 -1
- streamlit_webrtc/frontend/dist/assets/{index-DQOpN3ny.js → index-DV2u3ooX.js} +36 -36
- streamlit_webrtc/frontend/dist/index.html +1 -1
- streamlit_webrtc/webrtc.py +19 -4
- {streamlit_webrtc-0.56.0.dist-info → streamlit_webrtc-0.60.0.dist-info}/METADATA +3 -2
- {streamlit_webrtc-0.56.0.dist-info → streamlit_webrtc-0.60.0.dist-info}/RECORD +9 -9
- {streamlit_webrtc-0.56.0.dist-info → streamlit_webrtc-0.60.0.dist-info}/WHEEL +0 -0
- {streamlit_webrtc-0.56.0.dist-info → streamlit_webrtc-0.60.0.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-DV2u3ooX.js"></script>
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
streamlit_webrtc/webrtc.py
CHANGED
@@ -106,6 +106,7 @@ async def _process_offer_coro(
|
|
106
106
|
sendback_video: bool,
|
107
107
|
sendback_audio: bool,
|
108
108
|
on_track_created: Callable[[TrackType, MediaStreamTrack], None],
|
109
|
+
remote_description_set_event: asyncio.Event,
|
109
110
|
):
|
110
111
|
AudioTrack = AsyncAudioProcessTrack if async_processing else AudioProcessTrack
|
111
112
|
VideoTrack = AsyncVideoProcessTrack if async_processing else VideoProcessTrack
|
@@ -256,6 +257,8 @@ async def _process_offer_coro(
|
|
256
257
|
await in_recorder.stop()
|
257
258
|
|
258
259
|
await pc.setRemoteDescription(offer)
|
260
|
+
remote_description_set_event.set()
|
261
|
+
|
259
262
|
if mode == WebRtcMode.RECVONLY:
|
260
263
|
for t in pc.getTransceivers():
|
261
264
|
output_track: Optional[MediaStreamTrack] = None
|
@@ -380,6 +383,7 @@ class WebRtcWorker(Generic[VideoProcessorT, AudioProcessorT]):
|
|
380
383
|
) -> None:
|
381
384
|
self._process_offer_thread: Union[threading.Thread, None] = None
|
382
385
|
self.pc = RTCPeerConnection(rtc_configuration)
|
386
|
+
self._remote_description_set: asyncio.Event = asyncio.Event()
|
383
387
|
self._answer_queue: queue.Queue = queue.Queue()
|
384
388
|
|
385
389
|
self.mode = mode
|
@@ -559,6 +563,7 @@ class WebRtcWorker(Generic[VideoProcessorT, AudioProcessorT]):
|
|
559
563
|
sendback_video=self.sendback_video,
|
560
564
|
sendback_audio=self.sendback_audio,
|
561
565
|
on_track_created=on_track_created,
|
566
|
+
remote_description_set_event=self._remote_description_set,
|
562
567
|
),
|
563
568
|
loop=loop,
|
564
569
|
)
|
@@ -618,13 +623,23 @@ class WebRtcWorker(Generic[VideoProcessorT, AudioProcessorT]):
|
|
618
623
|
candidate.sdpMLineIndex = candidate_dict.get("sdpMLineIndex")
|
619
624
|
# candidate.usernameFragment = candidate_dict.get("usernameFragment")
|
620
625
|
|
621
|
-
self.
|
626
|
+
self.add_ice_candidate(candidate)
|
622
627
|
self._added_ice_candidate_ids.add(candidate_id)
|
623
628
|
|
624
|
-
def
|
625
|
-
logger.info("Adding ICE candidate
|
629
|
+
def add_ice_candidate(self, candidate: RTCIceCandidate):
|
630
|
+
logger.info("Adding ICE candidate: %s", candidate)
|
626
631
|
loop = get_global_event_loop()
|
627
|
-
asyncio.run_coroutine_threadsafe(self.
|
632
|
+
asyncio.run_coroutine_threadsafe(self._add_ice_candidate(candidate), loop=loop)
|
633
|
+
|
634
|
+
async def _add_ice_candidate(self, candidate: RTCIceCandidate):
|
635
|
+
# Wait until `setRemoteDescription` is called which sets up the transceiver
|
636
|
+
# that `addIceCandidate` will add an ICE candidate to.
|
637
|
+
try:
|
638
|
+
await asyncio.wait_for(self._remote_description_set.wait(), timeout=10)
|
639
|
+
except asyncio.TimeoutError:
|
640
|
+
logger.error("Timeout while waiting for the remote description to be set.")
|
641
|
+
raise
|
642
|
+
await self.pc.addIceCandidate(candidate)
|
628
643
|
|
629
644
|
def update_video_callbacks(
|
630
645
|
self,
|
@@ -1,15 +1,16 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: streamlit-webrtc
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.60.0
|
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.9.0
|
10
11
|
Requires-Dist: aiortc>=1.11.0
|
11
12
|
Requires-Dist: packaging>=20.0
|
12
|
-
Requires-Dist: streamlit>=0.
|
13
|
+
Requires-Dist: streamlit>=0.89.0
|
13
14
|
Description-Content-Type: text/markdown
|
14
15
|
|
15
16
|
# streamlit-webrtc
|
@@ -1,9 +1,9 @@
|
|
1
1
|
streamlit_webrtc/__init__.py,sha256=jMWwXoQ9hVyYXPD4Vrps7MyiR9goyC-n7LtkZNFBOxU,2273
|
2
|
-
streamlit_webrtc/_compat.py,sha256=
|
2
|
+
streamlit_webrtc/_compat.py,sha256=AVRcUGdgWDQcCE7-ufhGr6Hb5P6EHLgejUAA72ArJmg,4384
|
3
3
|
streamlit_webrtc/component.py,sha256=1RHnnoGdWkEoKUWyvVTMe-oAa0h0kF93y29jNn_jg9M,26378
|
4
4
|
streamlit_webrtc/components_callbacks.py,sha256=tdrj2TlV8qcexFEdjm4PVkz8JwHffo4A8imoXOtjNHA,2401
|
5
5
|
streamlit_webrtc/config.py,sha256=yKFIVjIoX2F62_G2qcDrNYm2Qe_qx1E9E0YqAnAibMo,5544
|
6
|
-
streamlit_webrtc/credentials.py,sha256=
|
6
|
+
streamlit_webrtc/credentials.py,sha256=3IOk7w1JLQ2Qs6XFP9dxsF81lpjLL2kdRe2ZIhHvaj4,4562
|
7
7
|
streamlit_webrtc/eventloop.py,sha256=AFmxGlRRxVdl0cTS9pKpRZR2Mnq6v6DgudVZZ425IVw,1333
|
8
8
|
streamlit_webrtc/factory.py,sha256=T35kCwNU8Vm4KL6KJ5HbNVtaouNw13Ilew49XSnm6X8,6820
|
9
9
|
streamlit_webrtc/mix.py,sha256=Uh9gJviP3VLxwBQ-i3RftJ8GQ5qDPGqJKgm2M-vQYo4,8775
|
@@ -16,10 +16,10 @@ streamlit_webrtc/server.py,sha256=5o9E2MRIPoS18lfGPJkyhbd23RWyTwblNVVuAA2kKrA,14
|
|
16
16
|
streamlit_webrtc/session_info.py,sha256=V1EdzD2I8dWANXdC84EKSz8XgPM-zugtkYsb4hJm8Qo,2313
|
17
17
|
streamlit_webrtc/shutdown.py,sha256=PUjMoNZcTRGzZCooCmjWARpeVs5EG_9JXAf1Iay7dBM,2353
|
18
18
|
streamlit_webrtc/source.py,sha256=haPqMZ50Xh8tg7Z1yN8Frfk8v7D3oOuKteaD59asbzs,2263
|
19
|
-
streamlit_webrtc/webrtc.py,sha256=
|
20
|
-
streamlit_webrtc/frontend/dist/index.html,sha256=
|
21
|
-
streamlit_webrtc/frontend/dist/assets/index-
|
22
|
-
streamlit_webrtc-0.
|
23
|
-
streamlit_webrtc-0.
|
24
|
-
streamlit_webrtc-0.
|
25
|
-
streamlit_webrtc-0.
|
19
|
+
streamlit_webrtc/webrtc.py,sha256=etDct0ONUDe-A02tv1la2VV2eqViafwuk3JPy1gALsk,29406
|
20
|
+
streamlit_webrtc/frontend/dist/index.html,sha256=Iw2ulM_HTlCdchAUJLCBiZQk6FboupXx3g-5Zf4MrUQ,527
|
21
|
+
streamlit_webrtc/frontend/dist/assets/index-DV2u3ooX.js,sha256=HpCe_touce0s9XRRQEB9PvmcIz5705ePMym6FB8sLFg,583792
|
22
|
+
streamlit_webrtc-0.60.0.dist-info/METADATA,sha256=4_ZLBC8eJWAgyEZFV4B0KZFjkfOyaHuTPFM9NEFSGx8,18670
|
23
|
+
streamlit_webrtc-0.60.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
24
|
+
streamlit_webrtc-0.60.0.dist-info/licenses/LICENSE,sha256=pwccNHVA7r4rYofGlMU10aKEU90GLUlQr8uY80PR0NQ,1081
|
25
|
+
streamlit_webrtc-0.60.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|