ion-sfu
supports a json-rpc
interface for connecting peers to the sfu
go build cmd/signal/json-rpc/main.go
./main -c config.toml -a ":7000"
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"
Initialize a peer connection and join a session.
{
"sid": "defaultroom",
"offer": {
"type": "offer",
"sdp": "..."
}
}
Offer a new sdp to the sfu. Called to renegotiate the peer connection, typically when tracks are added/removed.
{
"desc": {
"type": "offer",
"sdp": "..."
}
}
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": "..."
}
}
Provide an ICE candidate.
{
"candidate": "..."
}