MenuMenu

RTCMultiConnection.setUserPreferences

Set userPreferences for RTCPeerConnection.js

This code is used internally. However it can help advance users to manage RTCPeerConnection execution.

How to use

connection.setUserPreferences({
    extra: connection.extra,
    localPeerSdpConstraints: {
        OfferToReceiveAudio: true,
        OfferToReceiveVideo: true
    },
    remotePeerSdpConstraints: {
        OfferToReceiveAudio: true,
        OfferToReceiveVideo: true
    },
    isOneWay: false,
    isDataOnly: false,
    dontGetRemoteStream: false,
    dontAttachLocalStream: false,
    connectionDescription: {
        remoteUserId: connection.userid,
        message: {
            newParticipationRequest: true,
            isOneWay: false,
            isDataOnly: false,
            localPeerSdpConstraints: {
                OfferToReceiveAudio: true,
                OfferToReceiveVideo: true
            },
            remotePeerSdpConstraints: {
                OfferToReceiveAudio: true,
                OfferToReceiveVideo: true
            }
        },
        sender: connection.userid
    },
    successCallback: function() {
        //
    }
});