OBSERVERTC / Observer

SFU & mediasoup integration

Resolve track relationships from signaling, then add router observation if needed.

An SFU receives a publisher’s media and forwards it to subscribers. Browser statistics describe each endpoint separately. To relate a receiver’s video to the publisher that sent it, Observer needs identifiers from your signaling layer.

Publisher and receiver relationships

RemoteTrackResolver connects publishers/subscribers across client boundaries. The mediasoup factory reads producerId/consumerId in track attachments. The P2P factory joins SSRC-derived identifiers and documents its single-encoding assumption. Generic SFUs need an explicit resolver factory based on their signaling IDs; schema IDs alone do not guarantee end-to-end association.

Source references

Mediasoup router observation

ObservedMediasoupRouter attaches to a real router and accumulates a separate MediasoupRouterSample; it observes server transports, producers/consumers and their lifecycle, and correlates a router’s transport with client PCs. Its server-side records use MediasoupRouterSample, rather than the browser ClientSample structure. The application decides when to persist the growing router sample. observer-js/src/ObservedMediasoupRouter.ts, observer-js/src/schema/MediasoupRouter.ts, observer-js/examples/sfu-observer.ts.

Version coverage varies by reference. Source revisions · Markdown source