@seydx/rtsp / BackchannelSource
Interface: BackchannelSource
Defined in: types.ts:222
A source that can accept talkback audio back upstream.
Implemented by sources whose upstream supports a backchannel, such as an RTSP camera with an ONVIF backchannel. When a viewer sends audio, the relay forwards it through this capability so it reaches the upstream device. Use supportsBackchannel to detect whether a given source implements it.
Example
import { supportsBackchannel } from '@seydx/rtsp';
if (supportsBackchannel(source)) {
source.sendBackchannel(rtpPacket);
}See
- supportsBackchannel For the runtime type guard
- BackchannelInfo For the talkback format description
Properties
backchannel?
readonlyoptionalbackchannel?:BackchannelInfo
Defined in: types.ts:229
The negotiated backchannel format, once known.
Present only after the upstream is open and has advertised a backchannel; remains undefined while closed or when the upstream offers no talkback.
Methods
sendBackchannel()
sendBackchannel(
rtp):void
Defined in: types.ts:245
Send one RTP packet upstream over the backchannel.
The packet must already be encoded in the backchannel codec and packetized as RTP matching BackchannelInfo; the source forwards it verbatim to the upstream.
Parameters
rtp
Buffer
A single RTP packet, already in the backchannel codec
Returns
void
Example
source.sendBackchannel(rtpPacket);