1.3.0 • Published 6 months ago

@superviz/realtime v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

SuperViz Real-time

SuperViz Real-time is a powerful package that enables real-time communication and collaboration in JavaScript-based applications. It provides a simple yet flexible API for creating channels, publishing events, and subscribing to real-time updates.

Features

  • Easy integration with JavaScript and Node.js projects
  • Real-time communication between participants
  • Flexible event publishing and subscription system
  • Support for both package manager and CDN installation methods

Installation

Using a package manager

npm install --save @superviz/realtime

Using CDN

Add the following script tag to your HTML file:

<script type="module" src="https://unpkg.com/@superviz/realtime@latest/dist/browser/index.js"></script>

Quick Start

JavaScript

import { Realtime } from '@superviz/realtime';

// Initialize Real-time
const realtime = new Realtime('DEVELOPER_KEY', {
  participant: {
    id: 'PARTICIPANT_ID',
  },
});

// Connect to a channel
const channel = await realtime.connect("my-channel");

// Publish an event
channel.publish("test", { message: "Hello, world!" });

// Subscribe to events
channel.subscribe("test", (event) => {
  console.log("Received test event:", event);
});

Node.js

import { Realtime } from '@superviz/realtime';

// Initialize Real-time
const realtime = new Realtime(
  {
    clientId: 'YOUR_CLIENT_ID',
    secret: 'YOUR_SECRET',
  },
  {
    participant: {
      id: 'PARTICIPANT_ID',
    },
  }
);

// Connect to a channel
const channel = await realtime.connect("my-channel");

// Publish an event
channel.publish("test", { message: "Hello, world!" });

// Subscribe to events
channel.subscribe("test", (event) => {
  console.log("Received test event:", event);
});

Documentation

For more detailed information on how to use SuperViz Real-time, please refer to our official documentation.

Getting Started

To start using SuperViz Real-time, you'll need to create an account to retrieve your Developer Key or Client ID and Secret.

Support

If you have any questions or need assistance, please join our Discord community or open an issue on our GitHub repository.

License

SuperViz Real-Time is licensed under the BSD 2-Clause License.

1.2.5-beta.1

7 months ago

1.2.4-beta.1

7 months ago

1.2.3-beta.1

7 months ago

1.2.5

7 months ago

1.2.4

7 months ago

1.2.3

7 months ago

1.3.0

6 months ago

1.2.3-lab.1

7 months ago

1.3.0-beta.1

6 months ago

1.2.5-lab.1

7 months ago

1.3.0-lab.1

7 months ago

1.3.0-lab.2

7 months ago

1.3.0-lab.3

6 months ago

1.2.4-lab.1

7 months ago

1.2.2-beta.1

8 months ago

1.2.2

8 months ago

1.2.2-lab.2

8 months ago

1.2.2-lab.1

8 months ago

1.2.0

8 months ago

1.2.1

8 months ago

1.2.1-beta.1

8 months ago

1.2.0-beta.4

8 months ago

1.2.0-lab.9

8 months ago

1.2.0-lab.8

8 months ago

1.2.0-lab.7

8 months ago

1.2.0-lab.6

8 months ago

1.2.0-lab.5

9 months ago

1.2.0-lab.4

9 months ago

1.2.0-lab.3

9 months ago

1.2.0-lab.2

9 months ago

1.2.0-lab.1

9 months ago

1.2.0-beta.1

9 months ago

1.2.0-beta.3

9 months ago

1.2.0-beta.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.1.0-lab.4

10 months ago

1.1.0-lab.3

10 months ago

1.1.0-lab.2

10 months ago

1.1.0-lab.1

10 months ago

1.0.1-lab.1

10 months ago

1.0.0

10 months ago

1.0.0-lab.4

10 months ago

1.0.0-lab.3

10 months ago

1.0.0-lab.2

10 months ago

1.0.0-lab.1

10 months ago