A shim to insulate apps from WebRTC spec changes and browser prefix differences
Overall
score
98%
A WebRTC connection monitor that tracks media streams using the legacy Stream API.
Build a connection monitor that tracks both local and remote media streams on a WebRTC peer connection. The monitor should provide methods to retrieve currently active streams and handle stream lifecycle events.
@generates
/**
* Creates a stream monitor for a WebRTC peer connection
* @param {RTCPeerConnection} peerConnection - The peer connection to monitor
* @returns {Object} Monitor object with methods to track streams
*/
export function createStreamMonitor(peerConnection);
/**
* Monitor object interface:
* {
* getLocalStreams(): MediaStream[] - Returns array of local streams
* getRemoteStreams(): MediaStream[] - Returns array of remote streams
* getTotalStreamCount(): number - Returns total count of all streams
* onStreamAdded(callback): void - Register callback for when remote streams are added
* }
*/Provides WebRTC compatibility and legacy Stream API support.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-webrtc-adapterdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10