1.3.7 • Published 2 years ago

@agent-walrus/agent-walrus v1.3.7

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Agent Walrus

The official JavaScript SDK for Agent Walrus.

Agent Walrus lets engineering teams visualize, analyze and troubleshoot their video conferencing software. Improve uptime, performance and scalability of your product without the need for WebRTC expertise.

Contents

  1. Installation
  2. Example Usage
  3. API
  4. Platform Integration
  5. License

Installation

Just the good old:

npm install --save @agent-walrus/agent-walrus

Example Usage

import { AgentWalrus } from  "@agent-walrus/agent-walrus";  

// Start data collection
AgentWalrus.init("<Your app token>");

// Identify the user with unique id and optional traits
AgentWalrus.identify({
    id:  "Your app unique user id",
    yourCustomAttribute:  "customValue",
});  

// Add more traits later
AgentWalrus.identify({
    name:  "Example User",
    email:  "user@example.com",
});

API

All the methods are called on the main AgentWalrus object.

.init(token: string, config?: AgentWalrusConfig)

Starts the data collection. Must be run before the local media acquisition and WebRTC connection setup.

  • token - String identificator for your app. You'll find it in Agent Walrus' Settings/App Setup page.
  • config - Optional object with the following properties: - gatewayUrl? - URL where the data should be reported to. Change only if running a custom Agent Walrus deployment.
    • logLevel? - Level of collected console logs. One of: error, warning, info, debug. Defaults to warning.

.terminate()

Stops the data collection.

.identify(traits: Record<string, string | number>)

Used to add user-related traits to the session. You will be able to see the traits in Agent Walrus interface and search sessions by trait type and value.

Special traits: - id - Unique user identifier. Used to group same user's sessions together. - name - User's name or nickname. Will be displayed in the UI instead of the id. - email - User's email. Will be displayed next to the user's name or id.

.submitUserFeedback(score: number, description?: string)

Add user feedback to the session. - score - 1 - 5 numeric score - description - Optional textual feedback

Platform integration

Extra steps to get the most data out of your platform or media servers.

Twilio

import { AgentWalrus } from "@agent-walrus/agent-walrus";  

// Line below is just an example; you might be creating the room differently
const room = await Video.connect(token, { name: room, tracks: localParticipant.tracks });

AgentWalrus.monitorPlatform("twilio", room);

Other

If your platform is not fully supported by Agent Walrus, let us know. We're happy to add the support to our SDK.

License

MIT

1.1.0

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.2.1

2 years ago

1.0.0

2 years ago