Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Janus gateway handleRemoteJsep.dengeroslyCustomizeSdp callback
function prepareWebrtcPeer(handleId, callbacks) {
callbacks = callbacks || {};
callbacks.success = (typeof callbacks.success == "function") ? callbacks.success : Janus.noop;
callbacks.error = (typeof callbacks.error == "function") ? callbacks.error : webrtcError;
callbacks.dangerouslyCustomizeSdp = (typeof callbacks.dangerouslyCustomizeSdp == "function") ? callbacks.dangerouslyCustomizeSdp : Janus.noop;
...
if (jsep) {
if (!config.pc) {
Janus.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep");
callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");
return;
}
callbacks.dangerouslyCustomizeSdp(jsep);
config.pc.setRemoteDescription(jsep)
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment