npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

agora-rtm-sdk

v2.2.0

Published

JavaScript SDK for Agora RTM

Downloads

38,438

Readme

Agora Signaling SDK

Agora Signaling provides low-latency, high-concurrency signaling and synchronization capabilities for real-time systems. Agora’s Signaling SDK enables developers to apply low-latency event notifications and real-time changes to user, device, and channel attributes in applications. Signaling can be used to enhance the experience for Voice Calling, Video Calling, and Interactive Live Steaming.

Features

  • Message channels - Real-time messaging that enables asynchronous pub-sum message transmission without the need for immediate response. Publishers send messages to the channel, subscribers receive messages from the channels they sign up to. Depending on your business needs, send string or binary payloads

  • Stream channels - A real-time data pipeline that enables the uninterrupted flow of data from one point to another without delay or latency. Depending on your business needs, send string or binary payloads

  • Topics - Facilitate effective data stream management and communication between users in real time in Stream channels. Enable users to subscribe to, distribute, and notify users subscribed to a topic. Publishers send messages to a topic, subscribers receive messages in the topics they sign up to.

  • Presence - In online collaboration apps, enable users to see the availability of their contacts. Presence information is typically displayed as a status message or with an icon next to a user's name. It helps users determine the availability of others for communication or collaboration.

  • Storage - Persist and managing data that is exchanged between different clients or devices in real-time. Ensure that messages are not lost or dropped during transmission and enable quick and reliable message delivery to any number of clients.

  • Lock - Critical resource management mechanism to prevent mutual interference. Ensure that messages are processed in a specific order and prevent concurrent access to the same data. When your app accesses a resource, it can lock on that resource to prevent other clients from accessing it.

With Signaling you can build chat, in-game chat, collaborations apps and more.

Prerequisites

  • A supported browser
  • Node LTS & Npm
  • An Agora account and project
  • A computer with Internet access

Contact [email protected] and enable Signaling v2.x for your project.

Install

Install the Signaling SDK using npm:

npm install agora-rtm-sdk

Initialize

// Import the SDK
import AgoraRTM from 'agora-rtm-sdk';

// Create a client instance 
const signalingEngine = new AgoraRTM.RTM('app-id', 'user-id', { token: 'temporary-token' });

// Listen for events
signalingEngine.addEventListener('message', (eventArgs) => {
  console.log(`${eventArgs.publisher}: ${eventArgs.message}`);
})

// Login 
try { 
  await signalingEngine.login(); 
} catch (err) {
  console.log({ err }, 'error occurs at login.');
}

// Send channel message
try { 
  await signalingEngine.publish('channel', 'hello world');
} catch (err) {
  console.log({ err }, 'error occurs at publish message');
}

Support

For any support related questions, head to our support page to get assistance.