Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[H.264] SDP Modifiers Not Triggered When Configuring sessionDescriptionHandlerFactoryOptions in SIP.js 0.21.2 #1103

@mht-one

Description

@mht-one

Labels: bug h264 sdp

Environment
SIP.js Version: 0.21.2
Browser: Chrome 133
WebRTC Server: FreeSWITCH 1.10

Issue Description
When attempting to force H.264 video codec by modifying SDP through sessionDescriptionHandlerFactoryOptions.modifiers, the modifier function is not invoked. The modifiers array remains empty during SessionDescriptionHandler initialization despite explicit configuration.

Steps to Reproduce
1: Configure UserAgent with sessionDescriptionHandlerFactoryOptions:

const userAgent = new SIP.UserAgent({
loggerFactory: { /* ... */ },
sessionDescriptionHandlerFactoryOptions: {
modifiers: [forceH264] // Modifier not triggered
}
});

2: Initiate a video call with constraints:

userAgent.invite(target, {
sessionDescriptionHandlerOptions: {
constraints: { audio: true, video: true }
}
});
Observe that forceH264 function is never called.

Expected Behavior
The forceH264 modifier should process SDP to retain only H.264 payloads.
Resulting SDP should contain a=rtpmap:... H264/90000 and exclude other codecs like VP8/VP9.

Current Behavior
modifiers array is empty in SessionDescriptionHandler options (debug screenshot).
Raw SDP still contains multiple video codec options (e.g., VP8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions