json-rpc

command
v1.9.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2021 License: MIT Imports: 15 Imported by: 0

README

json-rpc

ion-sfu supports a json-rpc interface for connecting peers to the sfu

Quick Start

Serving over http
go build cmd/signal/json-rpc/main.go
./main -c config.toml -a ":7000"
Serving over https

Generate a keypair and run:

go build cmd/signal/json-rpc/main.go
./main -c config.toml -key ./key.pem -cert ./cert.pem -a "0.0.0.0:10000"

API

Join

Initialize a peer connection and join a session.

{
    "sid": "defaultroom",
    "offer": {
        "type": "offer",
        "sdp": "..."
    }
}
Offer

Offer a new sdp to the sfu. Called to renegotiate the peer connection, typically when tracks are added/removed.

{
    "desc": {
        "type": "offer",
        "sdp": "..."
    }
}
Answer

Answer a remote offer from the sfu. Called in response to a remote renegotiation. Typically when new tracks are added to/removed from other peers.

{
    "desc": {
        "type": "answer",
        "sdp": "..."
    }
}
Trickle

Provide an ICE candidate.

{
    "candidate": "..."
}

Documentation

Overview

Package cmd contains an entrypoint for running an ion-sfu instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL