GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Signal-Fire/client: Browser client for Signal-Fire Server, a WebRTC signaling server

This repository was archived by the owner on Jun 11, 2024. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

86 Commits
86 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Signal-Fire Client

Signal-Fire Client is a WebRTC signaling client for Signal-Fire Server.

A WebRTC signaling server communicates between peers to set up peer-to-peer audio/video and/or data channels. This allows your clients to communicate directly with each other.

Features

  • Works seamlessly with Signal-Fire Server
  • Abstracts away the hassles of setting up peer connections
  • Uses a simple, JSON-based protocol
  • No forest of dependencies

Install

Install using npm:

npm i @signal-fire/client

Documentation

Click here to view the documentation.

Example

Note: Is is assumed the server is running Signal Fire Server or a server which uses the same protocol.

See the documentation for more examples!

This example shows how to start a session.

import connect, { SessionAcceptedEvent } from '@signal-fire/client'

async function run () {
  const client = await connect('ws://localhost:3003/socket')
  const session = await client.createSession('<target id>')

  session.addEventListener('accepted', (ev: SessionAcceptedEvent) => {
    console.log('Session accepted!')

    const connection = ev.detail
    const stream = await navigator.mediaDevices.getUserMedia({
      video: true,
      audio: true
    })

    stream.getTracks().forEach(track => {
      connection.addTrack(track, stream)
    })
  })

  session.addEventListener('rejected', () => {
    console.log('Session rejected')
  })

  session.addEventListener('timed-out', () => {
    console.log('Session timed out')
  })
}

This example shows how to accept a session.

import connect, { IncomingSessionEvent } from '@signal-fire/client'

async function run () {
  const client = await connect('ws://localhost:3003/socket')

  client.addEventListener('session', (ev: IncomingSessionEvent) => {
    const session = ev.detail
    const connection = await session.accept()
  })
}

About

Browser client for Signal-Fire Server, a WebRTC signaling server

signal-fire.github.io/client/

Topics

rtcsignal-fire-clientsignal-fire-serverwebrtcwebsocketwebsocket-client

Resources

Readme
MIT license
Activity
Custom properties

Stars

2 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.