Skip to content

Commit

Permalink
janus.js (meetecho#2548)
Browse files Browse the repository at this point in the history
customizeSdp callback added to handleRemoteJsep to be able to mangle remote SDP if needed
  • Loading branch information
B-R-Bender committed Feb 3, 2021
1 parent 213b6c7 commit 794e89a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions html/janus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2566,6 +2566,7 @@ function Janus(gatewayCallbacks) {
callbacks = callbacks || {};
callbacks.success = (typeof callbacks.success == "function") ? callbacks.success : Janus.noop;
callbacks.error = (typeof callbacks.error == "function") ? callbacks.error : webrtcError;
callbacks.customizeSdp = (typeof callbacks.customizeSdp == "function") ? callbacks.customizeSdp : Janus.noop;
var jsep = callbacks.jsep;
var pluginHandle = pluginHandles[handleId];
if(!pluginHandle || !pluginHandle.webrtcStuff) {
Expand All @@ -2580,6 +2581,7 @@ function Janus(gatewayCallbacks) {
callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");
return;
}
callbacks.customizeSdp(jsep);
config.pc.setRemoteDescription(jsep)
.then(function() {
Janus.log("Remote description accepted!");
Expand Down

0 comments on commit 794e89a

Please sign in to comment.