Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

and turn off audio and video in outgoing call constraints for Chrome, Safari and MS Edge browsers

Code Block
languagejs
themeRDark
    var constraints = {
        audio: false,
        video: false
    };

    var outCall = session.createCall({
		callee: $("#callee").val(),
        visibleName: $("#sipLogin").val(),
        constraints: constraints,
        ...
	})

In addition to it, an empty audio stream should be created for Firefox browser:

Code Block
languagejs
themeRDark
    var constraints = {
        audio: false,
        video: false
    };
    if(Browser.isFirefox()) {
        var audioContext = new AudioContext();
        var emptyAudioStream = audioContext.createMediaStreamDestination().stream;
        constraints.customStream = emptyAudioStream;
    }
    var outCall = session.createCall({
		callee: $("#callee").val(),
        visibleName: $("#sipLogin").val(),
        constraints: constraints,
        ...
	})

...