JsSIP icon indicating copy to clipboard operation
JsSIP copied to clipboard

Add support for sender encodings priority option

Open marcovidonis opened this issue 11 months ago • 0 comments

Addresses #873. Adds the option to set the sender's priority when adding local media stream tracks to the peer connection in RTCSession.

I added an optional field called encodingsPriority to the options passed to call() and to answer(). When not passed, the default value is applied ('low').

I tested this both on Chrome and Safari. While encodings setting appears successful in both, as it turns out, Safari doesn't actually apply the settings to the packet headers, as can be verified with Wireshark:

Chrome

gc image

Safari

saf image

This appears to be a bug in Safari (verified both in v17.x and v18.x) and we're going to report it to Safari's bug tracker.

Example usage

const SESSION_OPTIONS = {
    mediaConstraints: {
        audio: true,
        video: false
    },
    encodingsPriority: 'high',
};

const newSession = jssip.call(uri, SESSION_OPTIONS);

marcovidonis avatar Jan 22 '25 13:01 marcovidonis