streamlit-webrtc 0.51.1__py3-none-any.whl → 0.51.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.
@@ -11,8 +11,8 @@ RTCIceServer = TypedDict(
11
11
  )
12
12
 
13
13
 
14
- class RTCConfiguration(TypedDict):
15
- iceServers: List[RTCIceServer]
14
+ class RTCConfiguration(TypedDict, total=False):
15
+ iceServers: Optional[List[RTCIceServer]]
16
16
 
17
17
 
18
18
  Number = Union[int, float]
@@ -27,10 +27,12 @@ import json
27
27
  import os
28
28
  import urllib.error
29
29
  import urllib.request
30
- from typing import Optional
30
+ from typing import List, Optional
31
31
 
32
+ from .config import RTCIceServer
32
33
 
33
- def get_hf_ice_servers(token: Optional[str] = None):
34
+
35
+ def get_hf_ice_servers(token: Optional[str] = None) -> List[RTCIceServer]:
34
36
  if token is None:
35
37
  token = os.getenv("HF_TOKEN")
36
38
 
@@ -46,7 +48,7 @@ def get_hf_ice_servers(token: Optional[str] = None):
46
48
  if response.status != 200:
47
49
  raise ValueError("Failed to get credentials from HF turn server")
48
50
  credentials = json.loads(response.read())
49
- [
51
+ return [
50
52
  {
51
53
  "urls": "turn:gradio-turn.com:80",
52
54
  **credentials,
@@ -58,7 +60,7 @@ def get_hf_ice_servers(token: Optional[str] = None):
58
60
 
59
61
  def get_twilio_ice_servers(
60
62
  twilio_sid: Optional[str] = None, twilio_token: Optional[str] = None
61
- ):
63
+ ) -> List[RTCIceServer]:
62
64
  try:
63
65
  from twilio.rest import Client
64
66
  except ImportError:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamlit-webrtc
3
- Version: 0.51.1
3
+ Version: 0.51.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>
@@ -2,8 +2,8 @@ streamlit_webrtc/__init__.py,sha256=4ZU3c3Ov634jPAJCFRAV_pmKi0LWDOrESL48q4m70yY,
2
2
  streamlit_webrtc/_compat.py,sha256=43RUwFoGdRBq8EkOdf6inWkl-qogs5lF8tc-sYrVd1s,4128
3
3
  streamlit_webrtc/component.py,sha256=vEKBBVoFMc7IDivZ3m2V2Oly2zkT_FvkdRIXoOmjvoY,26748
4
4
  streamlit_webrtc/components_callbacks.py,sha256=tdrj2TlV8qcexFEdjm4PVkz8JwHffo4A8imoXOtjNHA,2401
5
- streamlit_webrtc/config.py,sha256=Yoppkv0aHFEpHp5IWPgy3tbohAsm-FGEtoH5Zbgwltw,4114
6
- streamlit_webrtc/credentials.py,sha256=PgweC8bUVAjd6kfrjGQ1vxUDCquLGkVY_VNC_vrqSuw,2650
5
+ streamlit_webrtc/config.py,sha256=YaOQtsE66XkoN5yGGLvkcgtugC6gs2K5M-igqSh7-g8,4137
6
+ streamlit_webrtc/credentials.py,sha256=B5PXAdMX65m0UGHuUVtzuRqAaFbaoa7WiyByNgRNWvU,2741
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
@@ -19,7 +19,7 @@ streamlit_webrtc/source.py,sha256=haPqMZ50Xh8tg7Z1yN8Frfk8v7D3oOuKteaD59asbzs,22
19
19
  streamlit_webrtc/webrtc.py,sha256=LXsvwpqZw6up5DU2FoJkiM5yfd50Vb988ormK92xfxM,27188
20
20
  streamlit_webrtc/frontend/dist/index.html,sha256=1iOx-PsDxdqWKzx6SFPeQH17DsdM8NJSkfOm-XjFl5Q,527
21
21
  streamlit_webrtc/frontend/dist/assets/index-1ywg1u80.js,sha256=6DS5LiYVHfQac1QqoUOdw2ALfo86UUrpvdn4Cdz-GaY,582648
22
- streamlit_webrtc-0.51.1.dist-info/METADATA,sha256=9C3tbtZyhPI3lniaF60z8MYObvnPA9L63KYGaCPI224,18640
23
- streamlit_webrtc-0.51.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
- streamlit_webrtc-0.51.1.dist-info/licenses/LICENSE,sha256=pwccNHVA7r4rYofGlMU10aKEU90GLUlQr8uY80PR0NQ,1081
25
- streamlit_webrtc-0.51.1.dist-info/RECORD,,
22
+ streamlit_webrtc-0.51.2.dist-info/METADATA,sha256=EsAMX1U64Z7Nw0std4dcibX_lcgpgREbO0PA-hhIVRQ,18640
23
+ streamlit_webrtc-0.51.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
+ streamlit_webrtc-0.51.2.dist-info/licenses/LICENSE,sha256=pwccNHVA7r4rYofGlMU10aKEU90GLUlQr8uY80PR0NQ,1081
25
+ streamlit_webrtc-0.51.2.dist-info/RECORD,,