Thanks to visit codestin.com
Credit goes to github.com

Skip to content

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 00:54
· 248 commits to main since this release

node-av Release v3.1.0

📦 Updated Packages

The following platform packages have been updated to v3.1.0:

Added

WebRTC High-Level API

  • WebRTCSession: Complete WebRTC streaming with SDP negotiation and ICE handling
    • Automatic codec detection and transcoding (H.264, H.265, VP8, VP9, AV1 video; Opus, PCMA, PCMU audio)
    • Hardware acceleration support
    • Werift integration for peer connection management
import { WebRTCSession } from 'node-av/api';

const session = await WebRTCSession.create('rtsp://camera.local/stream', {
  hardware: 'auto'
});

// Handle signaling
session.onIceCandidate = (candidate) => ws.send({ type: 'candidate', candidate });
const answer = await session.setOffer(sdpOffer);
await session.start();
  • WebRTCStream: Library-agnostic WebRTC streaming with RTP callbacks for custom WebRTC implementations

fMP4/MSE High-Level API

  • FMP4Stream: Fragmented MP4 streaming for Media Source Extensions
    • Browser codec negotiation (H.264, H.265, AV1 video; AAC, FLAC, Opus audio)
    • Automatic transcoding based on browser support
    • Hardware acceleration support
import { FMP4Stream, FMP4_CODECS } from 'node-av/api';

const stream = await FMP4Stream.create('input.mp4', {
  supportedCodecs: 'avc1.640029,mp4a.40.2', // From browser
  hardware: 'auto',
  onChunk: (chunk) => ws.send(chunk)
});

const codecString = stream.getCodecString(); // For MSE addSourceBuffer()
await stream.start();
  • FMP4_CODECS: Predefined codec strings (H.264, H.265, AV1, AAC, FLAC, Opus)

📋 All Changes since v3.0.6

  • Re-export werift types and classes (9fd2569)
  • chore: bump version to 3.1.0 (1dd0f12)
  • Update deps (382b24b)
  • Update Changelog (f125668)
  • Update fMP4 streaming example (3f7ff59)
  • Add FMP4/MSE streaming implementation with codec negotiation and transcoding (3dd2d1a)
  • Reorganize WebRTC API (11dfc8f)
  • Remove unused codec compatibility functions and related imports from utils.ts (583f291)
  • Reorganize imports in RTSP custom IO example (76d995e)
  • Refactor WebRTC example to use high level WebRTC API (ce25a74)
  • Add support for setting codecTag as string (FourCC) in CodecContext and CodecParameters (85e4389)
  • Add codecTag and codecTagString properties to CodecContext (5cbac41)
  • Add AV1 codec support for WebRTC compatibility checks and configuration (7d62271)
  • Add audio sample file for testing purposes (fb8e0db)
  • Add high level WebRTC stream and session implementation (9654c22)