TGCallsJs 
An operative library for Telegram calls and a tgcalls helper.
Features
- Super light & easy-to-use.
- Smart stream function.
- Smartest streamAudio function.
- Native controls: pause, resume, mute, unmute.
- Call helpers: join, edit, leave.
Installation
npm i tgcallsjs
Example usage with audio
First install ffmpeg in your system otherwise it will generate errors
For windows:
download ffmpeg and set its path in environment variable
https://telegram.me/logicbots/180
for ubuntu:
sudo apt install ffmpeg
like this you can install on other os
Example usase:
const { TGCallsJs, gramjs } = require("tgcallsjs");
const apiId = 123456;
const apiHash = "392ykiyourhashhere";
const stringSession = "";
(async () => {
const client = await gramjs(apiId, apiHash, stringSession);
console.log(client.session.save());
let tg = new TGCallsJs(client, "groupusername");
tg.streamAudio("./audio.mp3");
})();
Docs
The docs can be found here.
Credits
inherited: tgcalls -> gram-tgcalls -> tgcallsjs