ntgcalls_flutter 1.0.0 copy "ntgcalls_flutter: ^1.0.0" to clipboard
ntgcalls_flutter: ^1.0.0 copied to clipboard

PlatformAndroid

Transport-only Flutter binding to the ntgcalls media engine for 1:1 Telegram-style P2P voice and video calls. Pair it with a signaling layer (e.g. TDLib) that performs call setup and Diffie-Hellman ke [...]

ntgcalls_flutter #

Transport-only Flutter binding to the ntgcalls media engine for 1:1 Telegram-style P2P voice and video calls. It runs only the media/RTC transport: you supply a signaling layer - typically TDLib - that creates/accepts the call and performs the Diffie-Hellman key exchange, then hand this plugin the servers, encryption key and protocol versions and it carries the audio/video.

Android only.

Usage #

import 'package:ntgcalls_flutter/tgcalls.dart';
import 'package:ntgcalls_flutter/tgcalls_method_channel.dart';

final engine = MethodChannelTgCalls();
await engine.warmUp(); // load the engine's real supported protocol versions

// When your signaling layer reaches the "ready" state, build a config from it:
final session = await engine.start(TgCallConfig(
  isOutgoing: true,
  isVideo: false,
  servers: servers,          // from CallStateReady.servers
  encryptionKey: key,        // from CallStateReady.encryptionKey
  config: config,
  customParameters: customParameters,
  maxLayer: 92,
  allowP2p: true,
));

// Pump signaling both ways:
session.outgoingSignaling.listen((bytes) => sendToPeerViaTdlib(bytes));
session.pushSignaling(incomingBytes); // on each inbound signaling update

// Controls:
await session.setMuted(true);
await session.setVideoEnabled(true);
await session.stop();

supportedVersions is the list you advertise to the signaling protocol so the peer negotiates a version the bundled engine can actually run.

Channel contract #

  • tgcalls/methods (MethodChannel): supportedVersions, start, push, setMuted, setVideoEnabled, switchCamera, setAudioRoute, stop.
  • tgcalls/events (EventChannel): signaling (outgoing bytes), state, audioLevel, texture.

See example/ for a minimal app, or nullgram for a real-world client wiring this plugin to TDLib signaling.

1
likes
150
points
9
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Transport-only Flutter binding to the ntgcalls media engine for 1:1 Telegram-style P2P voice and video calls. Pair it with a signaling layer (e.g. TDLib) that performs call setup and Diffie-Hellman key exchange.

Homepage
Repository (GitHub)
View/report issues

Topics

#telegram #calls #webrtc #voip #ntgcalls

License

MIT (license)

Dependencies

flutter

More

Packages that depend on ntgcalls_flutter

Packages that implement ntgcalls_flutter