Confirmed users
632
edits
(Change "newpc" to "add-fingerprint") |
(→Proof-of-Concept Monkeypatch Shim: Remove mention of setTimeout() since the example shows an event emitter instead. Removed success/failure callbacks from emitter, since these can't legally be called more than once.) |
||
| Line 142: | Line 142: | ||
var setDescriptionShim = function(sdp, success, failure, pc, localRemote) { | var setDescriptionShim = function(sdp, success, failure, pc, localRemote) { | ||
var fingerprint = /a=fingerprint:([^\r\n]*)/.exec(sdp.sdp)[1]; | var fingerprint = /a=fingerprint:([^\r\n]*)/.exec(sdp.sdp)[1]; | ||
console.log(localRemote + " fingerprint = " + fingerprint); | console.log(localRemote + " fingerprint = " + fingerprint); | ||
// Use any available event-emitter to decouple this code from the application. | // Use any available event-emitter to decouple this code from the application. | ||
eventEmitter.emit("set" + localRemote + "Description", sdp | eventEmitter.emit("set" + localRemote + "Description", sdp); | ||
pc["_originalSet" + localRemote + "Description"](sdp, success, failure); | pc["_originalSet" + localRemote + "Description"](sdp, success, failure); | ||