Learn how the WebRTC Stream Manager library enables real-time and archive video streaming from Network Optix Media Servers (v5.1 or later) into custom web applications.
For ready-to-run code samples, API references, and step-by-step setup guides, visit the webrtc-stream-manager-v2 package on GitHub.
What is the WebRTC Stream Manager?
The WebRTC Stream Manager is an abstraction library designed to simplify WebRTC streaming integration. Instead of manually handling WebRTC peer connections, session negotiation, and media stream bindings, the library provides a simplified interface to establish and manage video streams from your Media Server.
Key capabilities
Live and archive playback: Stream low-latency live video directly from connected cameras, or pass specific timestamps to navigate and play recorded archive feeds.
Synchronized playback: Update the playback timeline position across multiple active
WebRTCStreamManagerinstances simultaneously.Automatic resource cleanup: Bind stream connections directly to HTML
<video>elements to automatically disconnect streams when elements are removed from the browser DOM.Adaptive stream switching: Gather playback metrics automatically using target video elements to support intelligent stream quality switching algorithms.
Integration workflow
Integrating WebRTC video into your web interface generally involves four high-level steps:
Target element setup: Create or reference standard HTML
<video>elements in your application interface.Endpoint configuration: Build a URL factory function that targets your Media Server's WebRTC tracker endpoint using your Server GUID and Camera ID.
Connection initialization: Call the stream manager's connection interface using your URL factory and target video element reference.
Stream subscription: Subscribe to the stream observable to attach incoming media streams to your target element and handle connection errors.
Code examples and demo application
To explore working implementation patterns, view method signatures, or run an interactive local demo featuring OAuth authentication and camera selection, visit the official web_packages repository on GitHub.
Comments
0 comments
Article is closed for comments.