plugins/protocol_lws_webrtc/README.md
This plugin implements a shared WebRTC signaling and media transport layer within libwebsockets. It handles the WebSocket signaling, DTLS (Datagram Transport Layer Security) negotiation, SRTP (Secure Real-time Transport Protocol) keying, and RTP packetization for both audio and video streams.
lws_webrtc_send_video, lws_webrtc_send_audio) to inject raw H.264/AV1 NAL units and Opus frames into the WebRTC session.This protocol is usually utilized as an underlying infrastructure plugin for higher-level media handlers (like protocol_lws_rtc_camera or protocol_lws_webrtc_mixer), which feed the raw media frames into lws_webrtc.
It provides operations via lws_vhost_name_to_protocol(vh, "lws-webrtc")->user, exposing functions like:
lws_webrtc_send_video()lws_webrtc_send_audio()lws_webrtc_send_text()When a client connects to the lws-webrtc WebSocket endpoint, the server responds with an SDP offer containing the supported codecs (H.264, AV1, Opus) and negotiates the WebRTC UDP data path transparently.