import { RTCRtpTransceiver , RtpTrack } from "../../../../werift/webrtc/src" ; export class Track { rtcpId : any ; constructor ( public track , public receiver ) { track . onRtp . once ( ( rtp ) => { this . startPLI ( rtp . header . ssrc ) ; } ) ; } private startPLI ( ssrc ) { this . rtcpId = setInterval ( ( ) => { this . receiver . receiver . sendRtcpPLI ( ssrc ) ; } , 2000 ) ; } stop = ( ) => { clearInterval ( this . rtcpId ) ; } ; }