@@ -13,24 +13,24 @@ const logger = getLogger('modules/sdp/RtxModifier');
1313 * Helper interfaces for type safety.
1414 */
1515export interface IPrimarySsrcInfo {
16+ cname ?: string ;
1617 id : number ;
1718 msid ?: string ;
18- cname ?: string ;
1919}
2020
2121export interface IMLineWrap {
22- getRtxSSRC ( primarySsrc : number ) : number | undefined ;
23- removeSSRC ( ssrc : number ) : void ;
24- removeGroupsWithSSRC ( ssrc : number ) : void ;
25- addSSRCAttribute ( attr : { id : number ; attribute : string ; value : string } ) : void ;
26- addSSRCGroup ( group : { semantics : string ; ssrcs : string } ) : void ;
22+ addSSRCAttribute : ( attr : { attribute : string ; id : number ; value : string ; } ) => void ;
23+ addSSRCGroup : ( group : { semantics : string ; ssrcs : string ; } ) => void ;
24+ containsAnySSRCGroups : ( ) => boolean ;
2725 direction : string ;
28- getSSRCCount ( ) : number ;
29- getPrimaryVideoSSRCs ( ) : number [ ] ;
30- getSSRCAttrValue ( ssrc : number , attribute : string ) : string | undefined ;
31- containsAnySSRCGroups ( ) : boolean ;
32- findGroups ( semantics : string ) : Array < { semantics : string ; ssrcs : string } > ;
33- removeGroupsBySemantics ( semantics : string ) : void ;
26+ findGroups : ( semantics : string ) => Array < { semantics : string ; ssrcs : string ; } > ;
27+ getPrimaryVideoSSRCs : ( ) => number [ ] ;
28+ getRtxSSRC : ( primarySsrc : number ) => number | undefined ;
29+ getSSRCAttrValue : ( ssrc : number , attribute : string ) => string | undefined ;
30+ getSSRCCount : ( ) => number ;
31+ removeGroupsBySemantics : ( semantics : string ) => void ;
32+ removeGroupsWithSSRC : ( ssrc : number ) => void ;
33+ removeSSRC : ( ssrc : number ) => void ;
3434}
3535
3636/**
@@ -47,9 +47,9 @@ export interface IMLineWrap {
4747 * @param {number } rtxSsrc the rtx ssrc to associate with the primary ssrc
4848 */
4949function updateAssociatedRtxStream (
50- mLine : IMLineWrap ,
51- primarySsrcInfo : IPrimarySsrcInfo ,
52- rtxSsrc : number
50+ mLine : IMLineWrap ,
51+ primarySsrcInfo : IPrimarySsrcInfo ,
52+ rtxSsrc : number
5353) : void {
5454 const primarySsrc = primarySsrcInfo . id ;
5555 const primarySsrcMsid = primarySsrcInfo . msid ;
@@ -146,7 +146,7 @@ export default class RtxModifier {
146146 return sdpStr ;
147147 }
148148
149- for ( const videoMLine of Array . isArray ( videoMLines ) ? videoMLines : [ videoMLines ] ) {
149+ for ( const videoMLine of Array . isArray ( videoMLines ) ? videoMLines : [ videoMLines ] ) {
150150 if ( this . modifyRtxSsrcs2 ( videoMLine as IMLineWrap ) ) {
151151 modified = true ;
152152 }
@@ -220,11 +220,11 @@ export default class RtxModifier {
220220 return sdpStr ;
221221 }
222222
223- for ( const videoMLine of Array . isArray ( videoMLines ) ? videoMLines : [ videoMLines ] ) {
223+ for ( const videoMLine of Array . isArray ( videoMLines ) ? videoMLines : [ videoMLines ] ) {
224224 if (
225- videoMLine . direction !== MediaDirection . RECVONLY &&
226- videoMLine . getSSRCCount ( ) &&
227- videoMLine . containsAnySSRCGroups ( )
225+ videoMLine . direction !== MediaDirection . RECVONLY
226+ && videoMLine . getSSRCCount ( )
227+ && videoMLine . containsAnySSRCGroups ( )
228228 ) {
229229 const fidGroups = videoMLine . findGroups ( SSRC_GROUP_SEMANTICS . FID ) ;
230230
0 commit comments