py-tgcalls 2.1.2b2__py3-none-any.whl → 2.1.2b3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-tgcalls
3
- Version: 2.1.2b2
3
+ Version: 2.1.2b3
4
4
  Summary: Async client API for the Telegram Calls.
5
5
  Author-email: Laky-64 <iraci.matteo@gmail.com>
6
6
  Project-URL: Homepage, https://pytgcalls.github.io/
@@ -20,7 +20,7 @@ Requires-Python: >=3.9
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
22
  Requires-Dist: aiohttp>=3.9.3
23
- Requires-Dist: ntgcalls<1.4.0,>=1.3.5b3
23
+ Requires-Dist: ntgcalls<1.4.0,>=1.3.5b5
24
24
  Requires-Dist: deprecation
25
25
  Provides-Extra: pyrogram
26
26
  Requires-Dist: pyrogram>=1.2.20; extra == "pyrogram"
@@ -1,8 +1,8 @@
1
- py_tgcalls-2.1.2b2.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
1
+ py_tgcalls-2.1.2b3.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
2
2
  pytgcalls/__init__.py,sha256=qbfwN7rYwIdCegMOzdcbvwazeNjDzgmowgcqLFNqKIM,308
3
- pytgcalls/__version__.py,sha256=FprLafBuvz-hzBW23aNWsGkjU3pSVyK0rnV3nOorhlc,24
3
+ pytgcalls/__version__.py,sha256=jIltsC16890jgPh8YRlK5nMNGzaAe5P19p3v0qdpUyM,24
4
4
  pytgcalls/environment.py,sha256=ctCHACvG6l8SdpPewSBhOvc70kbwpv18maC0TwLvZ08,1924
5
- pytgcalls/exceptions.py,sha256=Rijc-8T93WEWJxNW9jncU8_M6mYZZZcs8F2bqitEIeI,3787
5
+ pytgcalls/exceptions.py,sha256=yezms8JiO7aGEkUrvTkR9QHhXtVOIXmm1Q4nQbx9tm0,3958
6
6
  pytgcalls/ffmpeg.py,sha256=tm6DBxyNfPh3h3an-b2s9x1UyX-cvkCdov9prlXxVZY,8649
7
7
  pytgcalls/filters.py,sha256=qTFDlt-23xnMh_Ug2WmmOUf13JPX6_yacrv7c3F9Pp0,6125
8
8
  pytgcalls/mtproto_required.py,sha256=6B-31p5qH_6oekUgypV4nK3hqPS6Nr-pA8S81wjnbaY,630
@@ -35,7 +35,7 @@ pytgcalls/methods/decorators/on_update.py,sha256=ZTL4YcQk0N4Ru56a5WItUvkSN5SAqr6
35
35
  pytgcalls/methods/internal/__init__.py,sha256=fcgIxUJKT6QJD30ltnOfzKsLhzTTTklD2qxKlwCvyv0,1057
36
36
  pytgcalls/methods/internal/clear_cache.py,sha256=qgG-oubmdtnefnXSiHSPHyBTyXypiLDC7G8l3FzjNw8,236
37
37
  pytgcalls/methods/internal/clear_call.py,sha256=yElvn3i6_j14Q7n9kcLSl-muYAGcaIZaEFHdp6MrN0g,549
38
- pytgcalls/methods/internal/connect_call.py,sha256=2DRmsILPyGNxV2880tVsQ2XUwd89iSIqVWHl5AkgEaE,5393
38
+ pytgcalls/methods/internal/connect_call.py,sha256=s4R-74sLippqPy1hpQasUaxwiJnZ9GVx6lgcaPqex8M,5900
39
39
  pytgcalls/methods/internal/emit_sig_data.py,sha256=ucIsknhJHB-0x7lcymXvwQ647AJQ852zH2W6MdlC3ws,216
40
40
  pytgcalls/methods/internal/handle_connection_changed.py,sha256=_1u3J6_Pjl1Gs1u_WkhG2FAUl_hxlHUiflaMkKkJDsc,866
41
41
  pytgcalls/methods/internal/handle_mtproto_updates.py,sha256=Ev2Jake6Z_SrBodnjO5N16YiYaEY3Ti4tkU1pKOsJVM,7747
@@ -115,7 +115,7 @@ pytgcalls/types/stream/record_stream.py,sha256=RWeD9U-sqUmb_PuZQxYnExZyoibepU_8o
115
115
  pytgcalls/types/stream/stream_ended.py,sha256=xR_kZwFf03hA6rw_nvI7Be7GwoCKzQf_1MKaGpPDXqY,716
116
116
  pytgcalls/types/stream/stream_frames.py,sha256=028ZhNV-mN3BGqMlmxusAV1xDQpXRYCeM0WXBZhRUhA,446
117
117
  pytgcalls/types/stream/video_quality.py,sha256=HBfWq005kh-D19MaVE9VzVdnODzrXf4IJUimCfslfiU,231
118
- py_tgcalls-2.1.2b2.dist-info/METADATA,sha256=GxtcdfoQ7YJZWo5rwwvc1IDUdK4dR7teugIeXM80NLQ,5284
119
- py_tgcalls-2.1.2b2.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
120
- py_tgcalls-2.1.2b2.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
121
- py_tgcalls-2.1.2b2.dist-info/RECORD,,
118
+ py_tgcalls-2.1.2b3.dist-info/METADATA,sha256=wzJ9y03r_nlZyBHgX4lM7sPk03_7diECvlHeM_gpp6E,5284
119
+ py_tgcalls-2.1.2b3.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
120
+ py_tgcalls-2.1.2b3.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
121
+ py_tgcalls-2.1.2b3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.1.0)
2
+ Generator: setuptools (80.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
pytgcalls/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '2.1.2b2'
1
+ __version__ = '2.1.2b3'
pytgcalls/exceptions.py CHANGED
@@ -169,3 +169,10 @@ class UnsupportedMethod(Exception):
169
169
  super().__init__(
170
170
  'Unsupported method for this kind of call',
171
171
  )
172
+
173
+
174
+ class RTMPStreamingUnsupported(Exception):
175
+ def __init__(self):
176
+ super().__init__(
177
+ 'Streaming into an RTMP connection is not supported',
178
+ )
@@ -1,4 +1,5 @@
1
1
  import asyncio
2
+ import json
2
3
  from typing import Optional
3
4
  from typing import Union
4
5
 
@@ -7,6 +8,7 @@ from ntgcalls import ConnectionNotFound
7
8
  from ntgcalls import MediaDescription
8
9
  from ntgcalls import TelegramServerError
9
10
 
11
+ from ...exceptions import RTMPStreamingUnsupported
10
12
  from ...exceptions import TimedOutAnswer
11
13
  from ...scaffold import Scaffold
12
14
  from ...types import CallConfig
@@ -41,6 +43,15 @@ class ConnectCall(Scaffold):
41
43
  media_description.screen is None,
42
44
  self._cache_user_peer.get(chat_id),
43
45
  )
46
+ is_rtmp = json.loads(result_params).get('rtmp')
47
+ if (
48
+ media_description.camera is not None or
49
+ media_description.microphone is not None or
50
+ media_description.screen is not None or
51
+ media_description.speaker is not None
52
+ ) and is_rtmp:
53
+ raise RTMPStreamingUnsupported()
54
+
44
55
  await self._binding.connect(
45
56
  chat_id,
46
57
  result_params,