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
//! Telegram voice/video calls on top of `ntgcalls` and `ferogram`.
//!
//! Two layers, pick based on how much control you need:
//!
//! - [`Call`] - one chat, you own it. Manual join/leave, direct access to
//! every ntgcalls operation (screen share, external frames, broadcast
//! parts, raw participant updates). Use this when you're managing calls
//! yourself or need something [`Calls`] doesn't expose.
//! - [`Calls`] - one manager, every chat your bot is in. `play`, `pause`,
//! `seek`, `record`, `status` - chat_id-keyed, auto-starts voice chats,
//! auto-subscribes video, runs each call on its own thread so you never
//! have to think about `ntgcalls`' threading constraints. Register it
//! once with your `Dispatcher` and most bots never touch [`Call`] at all.
//!
//! [`Media`] builds the ffmpeg-backed (or device-backed) sources both
//! layers stream. [`P2PCall`] is the separate private (1:1) call flow.
//!
//! # What's not here
//!
//! - **Conference calls** - Telegram's newer E2E-encrypted call type isn't
//! supported. It's a genuinely different join/signaling flow (block
//! chains, not participant updates), not a missing corner of what's
//! already here - a real scope of its own.
//! - **Automatic reconnection** - if the network degrades, [`Call`] doesn't
//! silently retry or fall back to a relay for you. [`Call::connection_mode`]
//! tells you if you've dropped to relay mode so you can react; this
//! crate won't do it for you. Worth noting: pytgcalls doesn't do this
//! either, so this was never actually a parity gap - just a limit worth
//! knowing about either way.
use Instant;
pub use ;
pub use ;
pub use TgCallsError;
pub use ;
pub use ;
pub use ;
/// Round-trip time to the native ntgcalls layer, in milliseconds. A basic
/// health check, not network latency.