0.1.2 • Published 4 years ago

sdp-minify v0.1.2

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

SDP Minify

Removes all the fluff from a simple SDP to make it easily transmitted over IRC or SMS

How To Use

Host can create an offer.

import {pack} from 'sdp-minify'

const pc = new RTCPeerConnection
// Setup ...
const offer = await pc.createOffer()
pc.setLocalDescription(offer)
const length70ish = pack(offer) // send this over IRC, discord, SMS w/e

Then the client an accept it and send an answer.

import {pack, unpack} from 'sdp-minify'

const pc = new RTCPeerConnection
// Setup ...
const obj = unpack(length70ish) // the received string
pc.setRemoteDescription(new RTCSessionDescription(obj))
const answer = await pc.createAnswer()
pc.setLocalDescription(answer)
const length70ish = pack(answer) // send this over IRC, discord, SMS w/e

Install

yarn add sdp-minify or npm i sdp-minify

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.2

5 years ago

0.0.1

5 years ago