werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4

MIT License

Downloads
31.3K
Stars
478
Committers
11
werift-webrtc - BreakingChange Latest Release

Published by shinyoshiaki about 1 month ago

To improve compatibility with browsers, undefined candidates are now included in the payload of events such as peerConnection.onIceCandidate when ice gathering is completed.

werift-webrtc -

Published by shinyoshiaki 3 months ago

werift-webrtc - webrtc v0.19.0

Published by shinyoshiaki 10 months ago

Move nonstandard module to subpath.
When using subpath, set moduleResolution in tsconfig to node16 or nodenext

werift-webrtc - webrtc v0.18.6

Published by shinyoshiaki about 1 year ago

  • exclude all inactive descriptions from bundle answer #339
werift-webrtc - werift v0.17.0

Published by shinyoshiaki almost 2 years ago

  • improve recording implementation #259
  • Fix GenericNack serialization #261
  • bundled media should use any available iceParams from any other bundled media sections #264
  • add support for stop/remove tracks. #250
  • replace rtp option to signal the stream contains a discontunity #267
werift-webrtc -

Published by shinyoshiaki about 2 years ago

  • renegotiation should reset the sequence numbers to 0 #255
  • Add function to filter STUN responses #257
  • Add iceUseIpv4/6 config to RTCPeerConnection #252
  • Allow use of specific network interface #249
  • Feature/improve reco #259
    • rewrite RTP processor
    • Added MediaRecorder option
werift-webrtc -

Published by shinyoshiaki over 2 years ago

#230

werift-webrtc - Support Node v18.x

Published by shinyoshiaki over 2 years ago

werift-webrtc - Specify static PayloadType

Published by shinyoshiaki over 2 years ago

          const pc = new RTCPeerConnection({
            codecs: {
              audio: [
                new RTCRtpCodecParameters({
                  mimeType: "PCMU",
                  clockRate: 8000,
                  channels: 1,
                  payloadType: 0
                }),
              ],
            },
          });
werift-webrtc - BundlePolicy

Published by shinyoshiaki over 2 years ago

How to specify BundlePolicy

const pc = new RTCPeerConnection({
            bundlePolicy: "disable" or "max-compat" or "max-bundle",
          });

Default value is max-compat

werift-webrtc - Suppor RED (RTP Payload for Redundant Audio Data)

Published by shinyoshiaki almost 3 years ago

werift-webrtc - MediaRecorder now supports AV1

Published by shinyoshiaki about 3 years ago

werift-webrtc - MediaRecorder now supports VP9

Published by shinyoshiaki about 3 years ago

werift-webrtc - MediaRecorder now supports h264

Published by shinyoshiaki about 3 years ago

werift-webrtc - Support MediaRecorder API

Published by shinyoshiaki about 3 years ago

Video and Audio can be saved to a webm file using Node.js alone, without the need for gStreamer.

example

import { MediaRecorder, RTCPeerConnection } from "werift";
import { Server } from "ws";

// open ./answer.html

const server = new Server({ port: 8888 });
console.log("start");

server.on("connection", async (socket) => {
  const recorder = new MediaRecorder([], "./test.webm", {
    width: 640,
    height: 360,
  });

  const pc = new RTCPeerConnection();

  {
    const transceiver = pc.addTransceiver("video");

    transceiver.onTrack.subscribe((track) => {
      recorder.addTrack(track);
      if (recorder.tracks.length === 2) {
        recorder.start();
      }
      setInterval(() => {
        transceiver.receiver.sendRtcpPLI(track.ssrc);
      }, 15_000);
    });
  }
  {
    const transceiver = pc.addTransceiver("audio");
    transceiver.onTrack.subscribe((track) => {
      recorder.addTrack(track);
      if (recorder.tracks.length === 2) {
        recorder.start();
      }
    });
  }

  await pc.setLocalDescription(await pc.createOffer());
  const sdp = JSON.stringify(pc.localDescription);
  socket.send(sdp);

  socket.on("message", (data: any) => {
    pc.setRemoteDescription(JSON.parse(data));
  });
});

werift-webrtc - Support SRTP_AEAD_AES_128_GCM

Published by shinyoshiaki about 3 years ago

werift-webrtc - Fixed some bugs

Published by shinyoshiaki about 3 years ago

werift-webrtc - Improve DTLS negotiation

Published by shinyoshiaki over 3 years ago

werift-webrtc - Fix remote iceLite flag issue

Published by shinyoshiaki over 3 years ago

werift-webrtc - Support Parse RTP Payload Format for VP8

Published by shinyoshiaki over 3 years ago