File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -210,8 +210,10 @@ export default class Session {
210210 return this . pc . createAnswer ( ) ;
211211 } )
212212 . then ( ( answer : any ) => {
213+ answerToSignal = { ...answer } ;
214+ // Do not include the renegotiation flag in the signaling
215+ // message as it may not be supported by the other side.
213216 if ( this . _iceRenominationOn ) answer . sdp = sdpModifier . enableIceRenomination ( answer . sdp ) ;
214- answerToSignal = answer ;
215217 return this . pc . setLocalDescription ( answer ) ;
216218 } )
217219 . then ( ( ) => {
Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ export function deprioritizeH264(sdp: any) {
154154// replace `a=ice-options:trickle` with `a=ice-options:trickle renomination`
155155// https://datatracker.ietf.org/doc/html/draft-thatcher-ice-renomination-00
156156export function enableIceRenomination ( sdp : any ) {
157+ if ( browserName === "firefox" ) {
158+ return sdp ;
159+ }
160+
157161 return (
158162 SDPUtils . splitLines ( sdp . trim ( ) )
159163 . map ( ( line ) => ( line === "a=ice-options:trickle" ? "a=ice-options:trickle renomination" : line ) )
Original file line number Diff line number Diff line change @@ -68,6 +68,23 @@ describe("sdpModifier", () => {
6868 } ) ;
6969
7070 describe ( "enableIceRenomination" , ( ) => {
71+ afterEach ( ( ) => {
72+ jest . resetModules ( ) ;
73+ } ) ;
74+
75+ it ( "returns the original sdp if the browserName is firefox" , ( ) => {
76+ jest . mock ( "webrtc-adapter" , ( ) => ( {
77+ browserDetails : {
78+ browser : "firefox" ,
79+ } ,
80+ } ) ) ;
81+ const sdp = getVideoSdpString ( ) ;
82+
83+ const modifiedSdp = sdpModifier . enableIceRenomination ( sdp ) ;
84+
85+ expect ( modifiedSdp ) . toEqual ( sdp ) ;
86+ } ) ;
87+
7188 it ( "returns the original sdp if it has no ice-options:tickle" , ( ) => {
7289 const sdp = getVideoSdpString ( ) ;
7390
You can’t perform that action at this time.
0 commit comments