UNPKG

naruto-run

Version:

A simple React component for running Vonage's Network Precall Test.

72 lines (52 loc) 1.51 kB
# Naruto Run [![npm downloads](https://img.shields.io/npm/dt/naruto-run.svg?maxAge=2592000)](http://npmjs.com/package/naruto-run) [![version](https://img.shields.io/npm/v/naruto-run.svg)]() A simple React component for running Vonage's Network Precall Test. The pre-call test is comprehensive and tests the following: * Connectivity to all Vonage Video API servers. * Bitrate and packet loss statistics * Hardware and software setup on the client (camera, microphone, browser) #### Technical Documentation - [Installing](#installing) - [Usage](#usage) ### Installing You can install naruto-run into your project by using both npm or yarn following the below commands. ```bash #NPM $ npm install naruto-run #YARN $ yarn add naruto-run ``` ### Usage ```js import { NetworkTest } from "naruto-run" <NetworkTest apiKey='ABRACADABRA' apiSecret='ABRACADABRA' onSuccess={(results)=>console.log("Network Test Results : ",results)} onFailure={(error)=>console.log("Something went wrong",error)} /> ``` #### `<NetworkTest>` Props: ```js { //API Secret apiKey: string, //API Secret apiSecret:string, //Called if the network test runs completely onSuccess: (result) => void, //Called if there is any error while running the test onFailure: (error) => void } ``` ### Contributing - Fork the project - Run the project in development mode: `$ yarn start` - Make changes. - Update README with appropriate docs. - Commit and PR ### Release checklist - Update CHANGELOG ### License MIT