New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rkv-signaling

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rkv-signaling

WebRTC signaling util for many-to-one communication

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-60%
Maintainers
3
Weekly downloads
 
Created
Source

Signaling

This package allows you to create applications and games where you can have communication between browsers with minimal lag.

It uses WebRTC and adds an abstraction on top of it which makes it easier to work with.

It can be used for games where one browser is the game screen while a mobile phone browser is the controller.

Index

  • Getting started
  • API
  • Events

Getting started

Usage of the signaling module is split into three parts:

  • Initiator

  • Receiver

  • Broker

API

import signaling from 'signaling'

signaling.runReceiver(options)

TODO: Add description here

Arguments

options (object):

OptionTypeRequiredDefaultDescription
wsAddressString-TODO
receiverIdString-TODO
onInitiatorJoinFunction-Function that is run whenever an initiator joins
onInitiatorLeaveFunction-Function that is run whenever an initiator leaves

onInitiatorJoin arguments

The onInitiatorJoin function is always called with an object with these properties:

PropertyTypeDescription
idString
setOnData
send
close

Returns

Nothing


signaling.runInitiator(options)

TODO: Add description

Arguments

options (object):

OptionTypeRequiredDefaultDescription
wsAddressString-The address of the broker
receiverIdString-The id of the receiver to join

Returns

(Promise): The promise is resolved with an object with these keys:

PropertyDescription
setOnDataTODO
setOnCloseTODO
sendTODO

Events

import { Event } from 'signaling'
EventDescription
ANSWERTODO
INITIATOR_CANDIDATETODO
RECEIVER_CANDIDATETODO
RECEIVER_UPGRADETODO
OFFERTODO
NOT_FOUNDTODO

Example

Event.ANSWER

Keywords

FAQs

Package last updated on 15 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc