Skip to content

Make it possible to pass own media stream when making or receiving the call - #588

Closed
kooler wants to merge 2 commits into
onsip:masterfrom
kooler:master
Closed

kooler wants to merge 2 commits into
onsip:masterfrom
kooler:master

Conversation

@kooler

@kooler kooler commented Aug 10, 2018

Copy link
Copy Markdown

Previously (I believe versions prior to 0.8) it was possible to reuse media streams (https://www.sipjs.com/guides/reuse-mediastreams/) but it is not working anymore.

This is quite important though if you requested media stream previously (before establishing the call) to avoid asking for permissions again.

Added extra property to options of acquire method to receive media streams specified in sessionDescriptionHandlerOptions:

session.accept({
    sessionDescriptionHandlerOptions: {
        media: {
            streams: [this.ownMediaStream]
        }
    }
});

@egreenmachine

Copy link
Copy Markdown
Collaborator

We will not be taking this. The logic here is that the SDH should be the minimum to get you going. SIP.js is a SIP library, not a media library. We would like you to create your own SDH. You can do this by taking ours and applying your patch to it, then passing it back to SIP.js via UA options. This way you can run a stock SIP.js with your own media logic. Session Description Handler documentation.

Once we start adding logic to the SDH to do more things, it becomes a slippery slope. The SDH becomes unwieldy and we are forced to support lots of different media logic when making changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants