-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.xml
1230 lines (1015 loc) · 42.7 KB
/
config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<config>
<option id="NTGCALLS_VERSION">1.2.2</option>
<option id="PYTGCALLS_VERSION">2.0.3</option>
<option id="PYPI_PACKAGE">py-tgcalls</option>
<!--REDIRECTS - they are case-insensitive -->
<redirects>
<redirect path="/changelog">/PyTgCalls/Changelogs</redirect>
<redirect path="/changelogs">/PyTgCalls/Changelogs</redirect>
</redirects>
<!--MACRO-->
<!--exceptions-->
<option id="BASE_EXCEPTIONS">
<config id="BASE_MTPROTO"/>
<category-title>exception <ref>pytgcalls.exceptions.<sb>NotInCallError</sb></ref></category-title>
<subtext><text>This error occurs when attempting to execute an action on a call that you have not joined.</text></subtext>
</option>
<option id="BASE_MTPROTO">
<category-title>exception <ref>pytgcalls.exceptions.<sb>NoMTProtoClient</sb></ref></category-title>
<subtext><text>This method can only be called with a valid MTProto client set.</text></subtext>
<category-title>exception <ref>pytgcalls.exceptions.<sb>ClientNotStarted</sb></ref></category-title>
<subtext>
<text>
Ensure you have started the process with <docs-ref link="/PyTgCalls/Basic Methods/Start">start()</docs-ref> before calling this method.
</text>
</subtext>
</option>
<option id="CONNECTION_EXCEPTIONS">
<config id="BASE_EXCEPTIONS"/>
<config id="GROUP_CALL_EXCEPTIONS"/>
</option>
<option id="GROUP_CALL_EXCEPTIONS">
<category-title>exception <ref>pytgcalls.exceptions.<sb>NoActiveGroupCall</sb></ref></category-title>
<subtext><text>You cannot edit a group call that hasn't been initiated.</text></subtext>
</option>
<option id="BASE_SYNC_C_EXCEPTION">
<category-title><ref><sb><shi language="c">#NTG_INVALID_UID</shi></sb></ref> <shi>-2</shi></category-title>
<subtext><text>The provided UID is invalid.</text></subtext>
</option>
<option id="BASE_C_EXCEPTIONS">
<category-title><ref><sb><shi language="c">#NTG_UNKNOWN_EXCEPTION</shi></sb></ref> <shi>-1</shi></category-title>
<subtext><text>An unknown exception occurred.</text></subtext>
</option>
<option id="BASE_CONNECTION_EXCEPTIONS">
<config id="BASE_C_EXCEPTIONS"/>
<category-title><ref><sb><shi language="c">#NTG_CONNECTION_NOT_FOUND</shi></sb></ref> <shi>-101</shi></category-title>
<subtext><text>The specified connection was not found.</text></subtext>
</option>
<option id="STREAM_C_EXCEPTIONS">
<category-title><ref><sb><shi language="c">#NTG_FILE_NOT_FOUND</shi></sb></ref> <shi>-200</shi></category-title>
<subtext><text>The specified file was not found.</text></subtext>
<category-title><ref><sb><shi language="c">#NTG_ENCODER_NOT_FOUND</shi></sb></ref> <shi>-201</shi></category-title>
<subtext><text>The required encoder was not found.</text></subtext>
<category-title><ref><sb><shi language="c">#NTG_FFMPEG_NOT_FOUND</shi></sb></ref> <shi>-202</shi></category-title>
<subtext><text>FFmpeg is not found in the system.</text></subtext>
<category-title><ref><sb><shi language="c">#NTG_SHELL_ERROR</shi></sb></ref> <shi>-203</shi></category-title>
<subtext><text>An error occurred while executing a shell command.</text></subtext>
</option>
<option id="SHELL_EXCEPTION">
<category-title>exception <ref>ntgcalls.<sb>ShellError</sb></ref></category-title>
<subtext><text>Error while executing the shell script.</text></subtext>
</option>
<option id="NTG_STREAM_EXCEPTIONS">
<category-title>exception <ref>ntgcalls.<sb>InvalidParams</sb></ref></category-title>
<subtext><text>This error occurs when attempting to send an invalid InputMode.</text></subtext>
<category-title>exception <ref>ntgcalls.<sb>FileError</sb></ref></category-title>
<config id="FILE_EXCEPTION_DESC"/>
<config id="SHELL_EXCEPTION"/>
</option>
<option id="STREAM_EXCEPTIONS">
<category-title>exception <ref><sb>FileNotFoundError</sb></ref></category-title>
<config id="FILE_EXCEPTION_DESC"/>
<category-title>exception <ref>ntgcalls.<sb>FFmpegError</sb></ref></category-title>
<subtext><text>To use Piped input stream, make sure you have FFmpeg installed.</text></subtext>
<config id="SHELL_EXCEPTION"/>
<category-title>exception <ref>pytgcalls.exceptions.<sb>NoAudioSourceFound</sb></ref></category-title>
<subtext><text>The audio file you're trying to play has no audio.</text></subtext>
<category-title>exception <ref>pytgcalls.exceptions.<sb>NoVideoSourceFound</sb></ref></category-title>
<subtext><text>The video file you're trying to play has no video.</text></subtext>
<category-title>exception <ref>pytgcalls.exceptions.<sb>InvalidVideoProportion</sb></ref></category-title>
<subtext><text>Playing a video with incorrect proportions is not supported.</text></subtext>
<category-title>exception <ref>pytgcalls.exceptions.<sb>YtDlpError</sb></ref></category-title>
<subtext><text>This error occurs when yt-dlp encounters an error.</text></subtext>
</option>
<option id="GROUPCALL_NOT_FOUND_EXCEPTION">
<category-title>exception <ref>pytgcalls.exceptions.<sb>GroupCallNotFound</sb></ref></category-title>
<config id="NO_GROUP_CALL_EXCEPTION_DESC"/>
</option>
<option id="NTG_NO_GROUP_CALL">
<category-title>exception <ref>ntgcalls.<sb>ConnectionError</sb></ref></category-title>
<config id="NO_GROUP_CALL_EXCEPTION_DESC"/>
</option>
<option id="TELEGRAM_EXCEPTION">
<category-title>exception <ref>ntgcalls.<sb>TelegramServerError</sb></ref></category-title>
<subtext>
<text>
This error occurs when the connection between Telegram and the WebRTC service fails.
</text>
</subtext>
</option>
<option id="RUNNING_EXCEPTION">
<category-title>exception <ref>pytgcalls.exceptions.<sb>PyTgCallsAlreadyRunning</sb></ref></category-title>
<subtext><text>This error occurs when attempting to start a client that is already running.</text></subtext>
</option>
<option id="CONNECTION_EXCEPTION">
<category-title>exception <ref>ntgcalls.<sb>ConnectionError</sb></ref></category-title>
<subtext><text>This error occurs when attempting to execute an action on a non-existent Group Call.</text></subtext>
</option>
<option id="RTMP_EXCEPTION">
<category-title>exception <ref>ntgcalls.<sb>RTMPNeeded</sb></ref></category-title>
<subtext><text>This error occurs when attempting to use NTgCalls to enter an RTMP stream.</text></subtext>
</option>
<option id="SMALL_BUFF_EXCEPTION">
<category-title><ref><sb><shi language="c">#NTG_ERR_TOO_SMALL</shi></sb></ref> <shi>-3</shi></category-title>
<subtext>
<text>
The provided buffer is too small to store the parameters.
You should allocate a larger buffer and try again.
</text>
</subtext>
</option>
<option id="CRYPTO_ERROR_C">
<category-title><ref><sb><shi language="c">#NTG_CRYPTO_ERROR</shi></sb></ref> <shi>-102</shi></category-title>
<subtext><config id="CRYPTO_ERROR_DESC"/></subtext>
</option>
<option id="INVALID_TRANSPORT_C">
<category-title><ref><sb><shi language="c">#NTG_INVALID_TRANSPORT</shi></sb></ref> <shi>-301</shi></category-title>
<subtext><text>The specified transport is invalid.</text></subtext>
</option>
<option id="CRYPTO_ERROR">
<category-title>exception <ref>ntgcalls.<sb>CryptoError</sb></ref></category-title>
<subtext><config id="CRYPTO_ERROR_DESC"/></subtext>
</option>
<option id="P2P_CONN_ERROR">
<category-title>exception <ref>ntgcalls.<sb>ConnectionError</sb></ref></category-title>
<subtext><text>A connection with the specified ID is already established or does not exist.</text></subtext>
</option>
<option id="CONN_ALREADY_EXISTS_C">
<category-title><ref><sb><shi language="c">#NTG_CONNECTION_ALREADY_EXISTS</shi></sb></ref> <shi>-100</shi></category-title>
<subtext><text>A connection with the specified ID already exists.</text></subtext>
</option>
<!--end exceptions-->
<!--descriptions-->
<option id="CHANGE_STREAM_DESC">
<text>This method allows changing the streaming file in a Group Call.</text>
</option>
<option id="CHANGE_STREAM_DESC_2">
<text>Change the streaming file.</text>
</option>
<option id="TIME_DESC">
<text>This method allows getting the played time of the stream.</text>
</option>
<option id="TIME_DESC_2">
<text>Get the played time of the stream</text>
</option>
<option id="LIST_CALLS_DESC">
<subtext><text>Get a list of all calls.</text></subtext>
</option>
<option id="AUDIO_CONFIG_DESC">
<text>Stream’s Audio Configuration</text>
</option>
<option id="AUDIO_SAMPLE_DESC">
<subtext><text>Audio sample rate (0-96000, max allowed by PCM16L).</text></subtext>
</option>
<option id="AUDIO_CHAN_DESC">
<subtext><text>Audio channel count (1-2, max allowed by PCM16L).</text></subtext>
</option>
<option id="VIDEO_CONFIG_DESC">
<text>Stream’s Video Configuration</text>
</option>
<option id="VIDEO_FPS_DESC">
<subtext><text>Frames per second (FPS) for video playback.</text></subtext>
</option>
<option id="FILE_EXCEPTION_DESC">
<subtext><text>The specified file does not exist.</text></subtext>
</option>
<option id="NO_GROUP_CALL_EXCEPTION_DESC">
<subtext><text>This error occurs when attempting to access a group call that does not exist.</text></subtext>
</option>
<option id="ARG_AUDIO_PARAMS_DESC">
<subtext>
<text>
Stream’s audio parameters.
</text>
</subtext>
</option>
<option id="ARG_VIDEO_PARAMS_DESC">
<subtext>
<text>
Stream’s video parameters.
</text>
</subtext>
</option>
<option id="CONNECT_DESC">
<text>
This method allows connecting to Telegram Group Calls with the output params from Telegram method
<a href="https://core.telegram.org/method/phone.joinGroupCall">JoinGroupCall</a>.
</text>
</option>
<option id="CONNECT_DESC2">
<text>Set connection params for WebRTC obtained from Telegram.</text>
</option>
<option id="CREATE_DESC">
<text>This method allows getting connection params for Telegram WebRTC connection.</text>
</option>
<option id="CREATE_DESC2">
<text>Get connection params for Telegram.</text>
</option>
<option id="STOP_DESC">
<text>This method allow stopping a WebRTC connection.</text>
</option>
<option id="STOP_DESC2">
<text>Stop a WebRTC connection.</text>
</option>
<option id="MUTE_DESC">
<text>This method allows you to mute the WebRTC stream.</text>
</option>
<option id="MUTE_DESC2">
<text>Mute the WebRTC stream.</text>
</option>
<option id="UNMUTE_DESC">
<text>This method allows you to unmute the WebRTC stream.</text>
</option>
<option id="UNMUTE_DESC2">
<text>UnMute the WebRTC stream.</text>
</option>
<option id="PAUSE_DESC">
<text>This method allows you to pause the WebRTC stream.</text>
</option>
<option id="PAUSE_DESC2">
<text>Pause the WebRTC stream.</text>
</option>
<option id="RESUME_DESC">
<text>This method allows you to resume the WebRTC stream.</text>
</option>
<option id="RESUME_DESC2">
<text>Resume the WebRTC stream.</text>
</option>
<option id="CHAT_ID_DESC">
<subtext><text>Unique identifier of a chat.</text></subtext>
</option>
<option id="TG_PARAMS_DESC">
<subtext><text>Connection params obtained from Telegram.</text></subtext>
</option>
<option id="ARG_MEDIA_DESC">
<subtext><text>Media parameters of the stream.</text></subtext>
</option>
<option id="INPUT_MODE_DESC">
<subtext><text>The input mode for audio or video.</text></subtext>
</option>
<option id="ARG_INPUT_MEDIA_DESC">
<subtext><text>The input media source.</text></subtext>
</option>
<option id="AUDIO_BPS_DESC">
<subtext><text>Audio bits per sample (8 or 16).</text></subtext>
</option>
<option id="VIDEO_WIDTH_DESC">
<subtext><text>Video width in pixels.</text></subtext>
</option>
<option id="VIDEO_HEIGHT_DESC">
<subtext><text>Video height in pixels.</text></subtext>
</option>
<option id="MEDIA_DESC">
<text>Media Configuration for the Stream.</text>
</option>
<option id="AUDIO_DESC">
<subtext><text>Audio configuration for the stream.</text></subtext>
</option>
<option id="VIDEO_DESC">
<subtext><text>Video configuration for the stream.</text></subtext>
</option>
<option id="MEDIA_STATE_DESC">
<text>GroupCall MTProto Configurations.</text>
</option>
<option id="MEDIA_MUTED_DESC">
<subtext><text>Indicates whether the media stream is muted.</text></subtext>
</option>
<option id="MEDIA_PAUSED_DESC">
<subtext><text>Indicates whether the video stream is paused.</text></subtext>
</option>
<option id="MEDIA_STOPPED_DESC">
<subtext><text>Indicates whether the video stream is stopped.</text></subtext>
</option>
<option id="INPUT_MODE_DESC2">
<text>Enumeration of input modes for audio and video streams.</text>
</option>
<option id="MODE_FILE_DESC">
<subtext><text>Input mode using a file source.</text></subtext>
</option>
<option id="MODE_SHELL_DESC">
<subtext><text>Input mode using a shell command.</text></subtext>
</option>
<option id="MODE_FFMPEG_DESC">
<subtext><text>Input mode using FFmpeg.</text></subtext>
</option>
<option id="MODE_NO_LATENCY_DESC">
<subtext><text>Input mode with no latency.</text></subtext>
</option>
<option id="STREAM_STATUS_DESC">
<text>Enumeration of stream status values.</text>
</option>
<option id="STATUS_PLAYING_DESC">
<subtext><text>Indicates that the stream is currently playing.</text></subtext>
</option>
<option id="STATUS_PAUSED_DESC">
<subtext><text>Indicates that the stream is currently paused.</text></subtext>
</option>
<option id="STATUS_IDLING_DESC">
<subtext><text>Indicates that the stream is currently idling (neither playing nor paused).</text></subtext>
</option>
<option id="STREAM_TYPE_DESC">
<text>Enumeration of stream type values.</text>
</option>
<option id="TYPE_AUDIO_DESC">
<subtext><text>Indicates that the stream type is audio.</text></subtext>
</option>
<option id="TYPE_VIDEO_DESC">
<subtext><text>Indicates that the stream type is video.</text></subtext>
</option>
<option id="CALLBACK_END_DESC">
<text>
Callback for handling when a stream playback ends. When a stream ends, this callback will be triggered.
</text>
</option>
<option id="CALLBACK_UPGRADE_DESC">
<text>
Callback for handling when is needed to update GroupCall MTProto Configurations.
</text>
</option>
<option id="CALLBACK_CONN_CHANGE_DESC">
<text>
Callback to listen for when the WebRTC connection has changed his state.
</text>
</option>
<option id="CALLBACK_SIGNALING_DESC">
<text>
Callback for handling when a signaling message is received.
</text>
</option>
<option id="GET_STATE_DESC">
<text>
This method allows retrieving GroupCall MTProto Configurations for
<a href="https://core.telegram.org/method/phone.editGroupCallParticipant">EditGroupCallParticipant</a>.
</text>
</option>
<option id="GET_STATE_DESC2">
<text>
Retrieve GroupCall MTProto Configurations.
</text>
</option>
<option id="CALL_DESC">
<text>Call Descriptor for a Group Call or Private Call.</text>
</option>
<option id="STREAM_STATUS_DESC2">
<subtext><text>Stream’s Status.</text></subtext>
</option>
<option id="BUG_FIX_CHANGELOGS">
<item><text><b>Bug Fixes:</b> Addressed various bugs for a more stable experience.</text></item>
</option>
<option id="CREATE_P2P_DESC">
<text>
This method allows creating a Private Call connection with the output params from Telegram method
<a href="https://core.telegram.org/method/messages.getDhConfig">GetDhConfig</a> and <a href="https://core.telegram.org/constructor/phoneCallRequested">PhoneCallRequested</a> when is an incoming call
and then use the output params for <a href="https://core.telegram.org/method/phone.acceptCall">AcceptCall</a> (When is an incoming call) or <a href="https://core.telegram.org/method/phone.requestCall">RequestCall</a> with <a href="https://core.telegram.org/constructor/phoneCallProtocol">Protocol</a>.
</text>
</option>
<option id="CREATE_P2P_DESC2">
<text>Create a connection for a Private Call.</text>
</option>
<option id="EXCHANGE_KEYS_DESC">
<text>
This method allows exchanging keys for a Private Call connection with the output params from
<a href="https://core.telegram.org/constructor/phoneCallAccepted">PhoneCallAccepted</a> when is an outgoing call or <a href="https://core.telegram.org/constructor/phoneCall">PhoneCall</a> when is an incoming call.
</text>
</option>
<option id="EXCHANGE_KEYS_DESC2">
<text>Exchange keys for a Private Call connection.</text>
</option>
<option id="DH_CONFIG_DESC">
<text>Diffie-Hellman configuration for key exchange.</text>
</option>
<option id="G_DESC">
<subtext><text>New value prime, see <a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange">Wikipedia</a>.</text></subtext>
</option>
<option id="P_DESC">
<subtext><text>New value primitive root, see <a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange">Wikipedia</a>.</text></subtext>
</option>
<option id="R_DESC">
<subtext><text>Random sequence of bytes of assigned length.</text></subtext>
</option>
<option id="G_A_HASH_DESC">
<subtext><text>Parameter for key exchange (Only when is incoming call).</text></subtext>
</option>
<option id="G_A_OR_B_DESC">
<subtext><text>Parameter for key exchange.</text></subtext>
</option>
<option id="FINGERPRINT_DESC">
<subtext><text>Fingerprint for the connection (Optional when is an outgoing call).</text></subtext>
</option>
<option id="KEY_FINGERPRINT_DESC">
<text>Fingerprint for the connection.</text>
</option>
<option id="AUTH_PARAMS_DESC">
<text>Authentication parameters for the connection.</text>
</option>
<option id="CONNECT_P2P_DESC">
<text>
This method allows connecting to a Private Call with the output params from Telegram method
<a href="https://core.telegram.org/method/phone.confirmCall">ConfirmCall</a> when is an outgoing call or <a href="https://core.telegram.org/constructor/phoneCall">PhoneCall</a> when is an incoming call.
</text>
</option>
<option id="CONNECT_P2P_DESC2">
<text>Set connection params for a Private Call obtained from Telegram.</text>
</option>
<option id="RTC_SERVERS_DESC">
<subtext><text>List of endpoints the user can connect to exchange call data.</text></subtext>
</option>
<option id="RTC_SERVER_DESC">
<text>Identifies an endpoint that can be used to connect to the other user in a phone call.</text>
</option>
<option id="GET_PROTOCOL_DESC">
<text>
This method allows getting the protocol for a Private Call connection with the output params for Telegram constructor
<a href="https://core.telegram.org/constructor/phoneCallProtocol">PhoneCallProtocol</a>.
</text>
</option>
<option id="GET_PROTOCOL_DESC2">
<text>Get the protocol for a Private Call connection.</text>
</option>
<option id="PROTOCOL_DESC">
<text>Protocol for a Private Call connection.</text>
</option>
<option id="MIN_LAYER_DESC">
<subtext><text>Minimum layer for remote connection.</text></subtext>
</option>
<option id="MAX_LAYER_DESC">
<subtext><text>Maximum layer for remote connection.</text></subtext>
</option>
<option id="UDP_P2P_DESC">
<subtext><text>Whether to allow P2P connection to the other participant.</text></subtext>
</option>
<option id="UDP_REFLECTOR_DESC">
<subtext><text>Whether to allow connection to the other participants through the reflector servers.</text></subtext>
</option>
<option id="LIBRARY_VERSIONS_DESC">
<subtext>
<text>
When using <a href="https://core.telegram.org/method/phone.requestCall">RequestCall</a> and <a href="https://core.telegram.org/method/phone.acceptCall">AcceptCall</a>,
specify all library versions supported by the client.
The server will merge and choose the best library version supported by both peers, returning only the best
value in the result of the call's <a href="https://core.telegram.org/method/phone.acceptCall">AcceptCall</a> and in the <a href="https://core.telegram.org/constructor/phoneCallAccepted">PhoneCallAccepted</a> update received by the caller.
</text>
</subtext>
</option>
<option id="P2P_ALLOWED_DESC">
<subtext><text>Whether to allow P2P connection to the other participant.</text></subtext>
</option>
<option id="SEND_SIGNALING_DATA_DESC">
<text>
This method allows sending signaling data to the WebRTC connection.
</text>
</option>
<option id="SEND_SIGNALING_DATA_DESC2">
<text>Send signaling data to the WebRTC connection.</text>
</option>
<option id="SIGNALING_DATA_DESC">
<text>Signaling payload.</text>
</option>
<option id="CPU_USAGE_DESC">
<text>Get an estimate of the CPU usage of the current process.</text>
</option>
<option id="CPU_USAGE_DESC2">
<text>Get the CPU usage of the current process.</text>
</option>
<option id="CPU_USAGE_DESC3">
<text>Buffer to store the CPU usage.</text>
</option>
<option id="REGISTER_LOGGER_DESC">
<text>Register a logger for the library, this logger will be used for all instances.</text>
</option>
<option id="LOGGER_DESC">
<text>Callback for logging messages.</text>
</option>
<option id="LOG_MESSAGE_STRUCT_DESC">
<text>Log message structure.</text>
</option>
<option id="LOG_LEVEL_DESC">
<text>Log level.</text>
</option>
<option id="LOG_SOURCE_DESC">
<text>Log source.</text>
</option>
<option id="LOG_FILE_DESC">
<text>File name where the log was generated.</text>
</option>
<option id="LOG_LINE_DESC">
<text>Line number where the log was generated.</text>
</option>
<option id="LOG_MESSAGE_DESC">
<text>Log message.</text>
</option>
<option id="NTG_LOG_DEBUG_DESC">
<text>Debug log level.</text>
</option>
<option id="LOG_LEVEL_INFO_DESC">
<text>Info log level.</text>
</option>
<option id="LOG_LEVEL_WARNING_DESC">
<text>Warning log level.</text>
</option>
<option id="LOG_LEVEL_ERROR_DESC">
<text>Error log level.</text>
</option>
<option id="LOG_LEVEL_UNKNOWN_DESC">
<text>Unknown log level.</text>
</option>
<option id="NTG_LOG_WEBRTC_DESC">
<text>WebRTC log level.</text>
</option>
<option id="NTG_LOG_SELF_DESC">
<text>NTgCalls log level.</text>
</option>
<option id="CRYPTO_ERROR_DESC">
<text>An error occurred while encrypting or decrypting data.</text>
</option>
<option id="SIGNALING_ERROR_DESC">
<text>An error occurred during signaling</text>
</option>
<option id="SIGNALING_UNSUPPORTED_DESC">
<text>The current protocol is not supported by the signaling server.</text>
</option>
<option id="MISSING_FINGERPRINT_DESC">
<text>The fingerprint is missing (Happens only on outgoing calls)</text>
</option>
<option id="RTC_ID_DESC">
<subtext><text>Endpoint ID</text></subtext>
</option>
<option id="RTC_IPV4_DESC">
<subtext><text>IPv4 address of endpoint</text></subtext>
</option>
<option id="RTC_IPV6_DESC">
<subtext><text>IPv6 address of endpoint</text></subtext>
</option>
<option id="RTC_USERNAME_DESC">
<subtext><text>Username of endpoint</text></subtext>
</option>
<option id="RTC_PASSWORD_DESC">
<subtext><text>Password of endpoint</text></subtext>
</option>
<option id="RTC_PORT_DESC">
<subtext><text>Port ID</text></subtext>
</option>
<option id="RTC_TURN_DESC">
<subtext><text>Whether the endpoint is a TURN server</text></subtext>
</option>
<option id="RTC_STUN_DESC">
<subtext><text>Whether the endpoint is a STUN server</text></subtext>
</option>
<option id="RTC_TCP_DESC">
<subtext><text>Whether TCP should be used</text></subtext>
</option>
<option id="RTC_PEER_TAG_DESC">
<subtext><text>Our peer tag</text></subtext>
</option>
<option id="CONNECTION_STATE_DESC">
<text>Enumeration of connection state values.</text>
</option>
<option id="NTG_STATE_CONNECTING_DESC">
<subtext><text>Indicates that the connection is in the process of being established.</text></subtext>
</option>
<option id="NTG_STATE_CONNECTED_DESC">
<subtext><text>Indicates that the connection has been established.</text></subtext>
</option>
<option id="NTG_STATE_TIMEOUT_DESC">
<subtext><text>Indicates that the connection has timed out.</text></subtext>
</option>
<option id="NTG_STATE_FAILED_DESC">
<subtext><text>Indicates that the connection has failed.</text></subtext>
</option>
<option id="NTG_STATE_CLOSED_DESC">
<subtext><text>Indicates that the connection has been closed.</text></subtext>
</option>
<!--end descriptions-->
<!--parameters-->
<option id="ARG_CHAT_ID">
<category-title><ref>chat_id</ref>: Union[<shi>int</shi>, <shi>str</shi>]</category-title>
<subtext><text>Can be direct id or a username</text></subtext>
</option>
<option id="ARG_UNION_PEER">
Union[<a href="https://docs.pyrogram.org/telegram/base/input-peer">pyrogram.InputPeer</a>, <a href="https://tl.telethon.dev/types/input_peer.html">telethon.InputPeer</a>, <a href="https://hydrogram.amanoteam.com/en/latest/telegram/base/input-peer.html">hydrogram.InputPeer</a>]
</option>
<option id="ARG_INPUT_STREAM">
<category-title><ref>stream</ref>: Optional[Union[<docs-ref link="/PyTgCalls/Stream Descriptors/Stream">pytgcalls.types.raw.Stream</docs-ref>, <docs-ref link="/PyTgCalls/Stream Descriptors/MediaStream">pytgcalls.types.MediaStream</docs-ref>]]</category-title>
<subtext><text>Input Streams base descriptor</text></subtext>
</option>
<option id="RET_INT_ID">
<category-title><ref><sb>chat_id</sb></ref> <shi>-> int</shi></category-title>
<config id="CHAT_ID_DESC"/>
</option>
<option id="ARG_INT_ID">
<category-title><ref><sb>chat_id</sb></ref>: <shi>int</shi></category-title>
<config id="CHAT_ID_DESC"/>
</option>
<option id="ARG_C_CHAT_ID">
<category-title><shi language="c">int64_t</shi> <ref><sb>chatID</sb></ref></category-title>
<config id="CHAT_ID_DESC"/>
</option>
<option id="ARG_C_UID">
<category-title><shi language="c">uint32_t</shi> <ref><sb>uid</sb></ref></category-title>
<subtext><text>The unique identifier for the NTgCalls instance.</text></subtext>
</option>
<option id="ARG_PARTICIPANT">
<category-title><ref><sb>participant</sb></ref> <shi>-></shi> <docs-ref link="/PyTgCalls/Advanced Types/GroupCallParticipant">pytgcalls.GroupCallParticipant</docs-ref></category-title>
<subtext><text>Info about a group call participant.</text></subtext>
</option>
<option id="ARG_AUDIO_PARAMS">
<category-title><ref>audio_parameters</ref>: Optional[<docs-ref link="/PyTgCalls/Stream Descriptors/AudioParameters">pytgcalls.types.raw.AudioParameters</docs-ref>]</category-title>
<config id="ARG_AUDIO_PARAMS_DESC"/>
</option>
<option id="ARG_AUDIO_PARAMSv2">
<category-title><ref>audio_parameters</ref>: Optional[Union[<docs-ref link="/PyTgCalls/Stream Descriptors/AudioParameters">pytgcalls.types.raw.AudioParameters</docs-ref>, <docs-ref link="/PyTgCalls/Available Enums/AudioQuality">pytgcalls.types.AudioQuality</docs-ref>]]</category-title>
<config id="ARG_AUDIO_PARAMS_DESC"/>
</option>
<option id="ARG_VIDEO_PARAMS">
<category-title><ref>video_parameters</ref>: Optional[<docs-ref link="/PyTgCalls/Stream Descriptors/VideoParameters">pytgcalls.types.raw.VideoParameters</docs-ref>]</category-title>
<config id="ARG_VIDEO_PARAMS_DESC"/>
</option>
<option id="ARG_VIDEO_PARAMSv2">
<category-title><ref>video_parameters</ref>: Optional[Union[<docs-ref link="/PyTgCalls/Stream Descriptors/VideoParameters">pytgcalls.types.raw.VideoParameters</docs-ref>, <docs-ref link="/PyTgCalls/Available Enums/VideoQuality">pytgcalls.types.VideoQuality</docs-ref>]]</category-title>
<config id="ARG_VIDEO_PARAMS_DESC"/>
</option>
<option id="ARG_FFMPEG_PARAMS">
<config id="ARG_HTTP_PARAMS"/>
<category-title><ref>additional_ffmpeg_parameters</ref>: Optional[<shi>str</shi>]</category-title>
<subtext><text>FFmpeg additional parameters.</text></subtext>
</option>
<option id="ARG_HTTP_PARAMS">
<category-title><ref>headers</ref>: Optional[<shi>dict</shi>[<shi>str</shi>, <shi>str</shi>]]</category-title>
<subtext><text>HTTP connection’s headers.</text></subtext>
</option>
<option id="ARG_STREAM_PARAMS">
<category-title><ref><sb>media</sb></ref>: <docs-ref href="">ntgcalls.MediaDescription</docs-ref></category-title>
<config id="ARG_MEDIA_DESC"/>
</option>
<option id="ARG_VIDEO_CONFIG">
<category-title><ref>width</ref>: <shi>int</shi></category-title>
<config id="VIDEO_WIDTH_DESC"/>
<category-title><ref>height</ref>: <shi>int</shi></category-title>
<config id="VIDEO_HEIGHT_DESC"/>
</option>
<option id="ARG_INPUT_MODE">
<category-title><ref>input_mode</ref>: <docs-ref link="/NTgCalls/Available Enums/InputMode">ntgcalls.InputMode</docs-ref></category-title>
<config id="INPUT_MODE_DESC"/>
</option>
<option id="ARG_C_INPUT_MODE">
<category-title><docs-ref link="/NTgCalls/Available Enums/ntg_input_mode_enum">ntg_input_mode_enum</docs-ref> <ref>inputMode</ref></category-title>
<config id="INPUT_MODE_DESC"/>
</option>
<option id="ARG_MEDIA_C">
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_media_description_struct">ntg_media_description_struct</docs-ref> <ref><sb>desc</sb></ref></category-title>
<config id="ARG_MEDIA_DESC"/>
</option>
<option id="ARG_BUF_SIZE">
<category-title><shi language="c">int</shi> <ref><sb>size</sb></ref></category-title>
<subtext><text>The size of the provided buffer.</text></subtext>
</option>
<option id="ARG_INPUT_MEDIA">
<category-title><ref>input</ref>: <shi>str</shi></category-title>
<config id="ARG_INPUT_MEDIA_DESC"/>
</option>
<option id="ARG_C_INPUT_MEDIA">
<category-title><shi language="c">char*</shi> <ref>input</ref></category-title>
<config id="ARG_INPUT_MEDIA_DESC"/>
</option>
<option id="ARG_AUDIO_PATH">
<category-title><ref>audio_path</ref>: <shi>str</shi></category-title>
<subtext><text>The audio file path.</text></subtext>
</option>
<option id="ARG_AUDIO_DEVICE">
<category-title><ref>audio_info</ref>: <code>pytgcalls.DeviceInfo</code></category-title>
<subtext><text>The audio media device.</text></subtext>
</option>
<option id="ARG_SCREEN_DEVICE">
<category-title><ref>screen_info</ref>: <code>pytgcalls.ScreenInfo</code></category-title>
<subtext><text>The video media device.</text></subtext>
</option>
<option id="ARG_CUSTOM_DATA">
<category-title><shi language="c">void*</shi> <ref><sb>userData</sb></ref></category-title>
<subtext><text>Custom data that can be passed to the callback function.</text></subtext>
</option>
<option id="ARG_ASYNC_STRUCT">
<category-title><docs-ref link="/NTgCalls/Using Async">ntg_async_struct</docs-ref><shi language="c">*</shi> <ref><sb>future</sb></ref></category-title>
<subtext><text>The <code>ntg_async_struct</code> instance that will be used to track the async operation.</text></subtext>
</option>
<option id="ARG_MEDIA">
<category-title><docs-ref link="/NTgCalls/Available Structs/ntg_media_description_struct">ntg_media_description_struct</docs-ref> <ref>desc</ref></category-title>
<config id="ARG_MEDIA_DESC"/>
</option>
<!--end parameters-->
<homepage-config>
<pres-items>
<file title="pytgcalls.py">
<syntax-highlight>
from pytgcalls import PyTgCalls
from pytgcalls import idle
from pytgcalls.types import MediaStream
...
app = PyTgCalls(client)
app.start()
app.play(
-1001185324811,
MediaStream(
'http://docs.evostream.com/sample_content/assets/sintel1m720p.mp4',
)
)
idle()
</syntax-highlight>
</file>
<file title="ntgcalls.c">
<syntax-highlight language="c">
#include <stdint.h>
#include "ntgcalls.h"
int main() {
uint32_t uid = ntg_init();
int64_t chatID = ...; // Obtain the chat ID
char* params = ...; // Obtain connection parameters
int result = ntg_connect(uid, chatID, params);
if (result == 0) {
// Successfully connected to the WebRTC
...
} else {
printf("Failed to connect: %d\n", result);
}
...
return 0;
}
</syntax-highlight>
</file>
<file title="ntgcalls.go">
<syntax-highlight language="go">
package main
//#cgo LDFLAGS: -L . -lntgcalls -Wl,-rpath=./
import "C"
import (
"fmt"
...
"example/ntgcalls"
)
func main() {
client := ntgcalls.NTgCalls()
defer client.Free()
chatID := ... // Obtain the chat ID
params := ... // Obtain connection parameters
err := ntgcalls.Connect(uid, chatID, params)
if err == nil {
// Successfully connected to the WebRTC
...
} else {
fmt.Printf("Failed to connect: %d\n", err)
}
...
}
</syntax-highlight>
</file>
</pres-items>
<numeric-pres-points>
<item
title="20 MLN+"
description="Total downloads from PyPi or Github"
/>
<item
title="30,000+"
description="Projects that have adopted PyTgCalls or NTgCalls"
origin="Available NTgCalls since 2023"
/>
<item
title="78,9%"
description="Developer preference for PyTgCalls"
origin="Based on Github stats 2024"
/>
</numeric-pres-points>
<citation>
<value>
Our mission is to make Telegram calls effortless for developers of all backgrounds, from complex class to seamless integration.<br/>
No prior WebRTC or C++ experience is required.
</value>
</citation>
<team>
<member owner="true">
<name>Laky</name>
<role>DevOps Engineer, Software Architect</role>
<github-username>Laky-64</github-username>
<telegram-username>Laky64</telegram-username>
</member>
<member>