@@ -161,6 +161,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
161161 simStreams = [ ] ,
162162 ridStreamMap = new Map ( ) ,
163163 isSimulcast = false ,
164+ transportSeqNumExt = - 1 ,
164165 wrtc ;
165166
166167 /*
@@ -219,7 +220,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
219220 info : JSON . parse ( mediaUpdate )
220221 } ;
221222 on_mediaUpdate ( JSON . stringify ( data ) ) ;
222- } ) ;
223+ } , transportSeqNumExt ) ;
223224 simulcastConstructors . push ( vfc ) ;
224225 const simStream = new WrtcStream ( {
225226 audioFramePacketizer,
@@ -317,7 +318,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
317318 info : JSON . parse ( mediaUpdate )
318319 } ;
319320 on_mediaUpdate ( JSON . stringify ( data ) ) ;
320- } ) ;
321+ } , transportSeqNumExt ) ;
321322 simulcastConstructors . push ( vfc ) ;
322323 const simStream = new WrtcStream ( {
323324 audioFramePacketizer,
@@ -341,7 +342,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
341342 audioFrameConstructor . bindTransport ( wrtc . getMediaStream ( wrtcId ) ) ;
342343 }
343344 if ( video ) {
344- const transportSeqNumExt = getExtId ( sdp , TransportSeqNumUri ) ;
345+ transportSeqNumExt = getExtId ( sdp , TransportSeqNumUri ) ;
345346 videoFrameConstructor = new VideoFrameConstructor ( on_mediaUpdate , transportSeqNumExt ) ;
346347 videoFrameConstructor . bindTransport ( wrtc . getMediaStream ( wrtcId ) ) ;
347348 }
@@ -366,7 +367,7 @@ module.exports = function (spec, on_status, on_mediaUpdate) {
366367 if ( video ) {
367368 const hasRed = hasCodec ( sdp , 'red' ) ;
368369 const hasUlpfec = hasCodec ( sdp , 'ulpfec' ) ;
369- const transportSeqNumExt = getExtId ( sdp , TransportSeqNumUri ) ;
370+ transportSeqNumExt = getExtId ( sdp , TransportSeqNumUri ) ;
370371 videoFramePacketizer = new VideoFramePacketizer ( hasRed , hasUlpfec , transportSeqNumExt ) ;
371372 videoFramePacketizer . bindTransport ( wrtc . getMediaStream ( wrtcId ) ) ;
372373 }
0 commit comments