@dyteinternals/callstats
v7.2.7
Published
An internal toolkit to obtain call statistic for Dyte meetings.
Readme
Table of Contents
About The Project
An internal toolkit to obtain call statistic for Dyte meetings.
Built With
- Typescript
- W3C WebRTC Stats
Installation
Using a Published Version
Make sure you have .npmrc in your project with github token that can access @dyte-in/dyte-callstats-toolkit package.
You can then install this package using the following command.
npm install @dyte-in/dyte-callstats-toolkitor if using yarn:
yarn add @dyte-in/dyte-callstats-toolkitUsing a Local Version
If you want to use an unpublished local version, you need to reference it in your project's package.json using the file: protocol.
- Clone this repository
git clone [email protected]:dyte-in/dyte-callstats-toolkit.git- Install dependencies
npm install- Build a local version
npm run build- Modify your projects's
package.jsonto include this build:
"dependencies": {
"@dyte-in/dyte-callstats-toolkit": "file:../../path-to-this-repo"
}*ℹ️ Info You need to alter dependencies of your project and not THIS callstats-toolkit repo.
- Run the package manager in your project to install the dependency:
npm installor
yarn installGeting Started
- Clone the repo
git clone [email protected]:dyte-in/dyte-callstats-toolkit.git- Install NPM packages
npm install- Build the package
npm run buildTo see usage of this repo, please refer to web-core codebase and look for callstats text.
All methods of this repository are exposed through Callstats Wrapper file.
Usage
- Import this private package
import { globalCallStats as callStats } from '@dyte-in/dyte-callstats-toolkit';- Initialize callstats
await callStats.initialize({
peerId: 'UNIQUE_PEER_ID',
engineName: 'blink'// browserSpecs.getDeviceInfo().engineName,
env: 'prod', // context.getValue('env'),
iceServers: [
{
"url": "stun:global.stun.twilio.com:3478",
"urls": "stun:global.stun.twilio.com:3478"
},
]// await APIClient.getICEServers(),
apiBase: 'NOT_USED_ANYMORE', // context.getValue('apiBase'),
flags: {} // flagsmith.getAllFlags(), from https://github.com/dyte-in/dyte-utils
logger: console,
apiHostnames: {
location: 'location.dyte.io',
locationLegacy: 'location-legacy.dyte.io',
daCollector: 'da-collector.dyte.io',
},
skipConnectivityChecks: true,
});- Send the data to callstats-toolkit for it to relay eventually to da-callstats
callStats.audioOff();
callstats.audioOn();There are more methods available in Callstats.
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature') - Push to the Branch (
git push -u origin feature/AmazingFeature) - Open a Pull Request
You are requested to follow the contribution guidelines specified in CONTRIBUTING.md while contributing to the project :smile:.
License
Distributed under the Apache v2.0 License. See LICENSE for more information.
