interface Description { type: RTCSdpType; sdp: string; } interface Options { numOfLayers?: number; } /** * This class handles SDP munging for enabling simulcast for local video streams in Unified plan. A set of random SSRCs * are generated for the higher layer streams and they are cached for a given mid. The cached SSRCs are then reused on * the subsequent iterations while munging the local description. This class also handles imploding of the simulcast * SSRCs for remote endpoints into the primary FID group in remote description since Jicofo signals all SSRCs relevant * to a given endpoint. */ export default class SdpSimulcast { /** * Creates a new instance. * * @param options */ constructor(options: Options); /** * Munges the given media description to enable simulcast for the video media sections that are in either have * SENDRECV or SENDONLY as the media direction thereby ignoring all the RECVONLY transceivers created for remote * endpoints. * NOTE: This needs to be called only when simulcast is enabled. * * @param description * @returns */ mungeLocalDescription(description: Description): Description; /** * Munges the given media description by removing the SSRCs and related FID groups for the higher layer streams. * * @param description * @returns */ mungeRemoteDescription(description: Description): Description; }