| Index: inject.preload.js |
| diff --git a/inject.preload.js b/inject.preload.js |
| index 109f31ab1f88b79f5e3ef5d5d34423e8ed7e53aa..c03f0c762d98fe8351e3462923926a883c0f219b 100644 |
| --- a/inject.preload.js |
| +++ b/inject.preload.js |
| @@ -225,6 +225,13 @@ function injected(eventName, injectedIntoContentWindow) |
| */ |
| let RealRTCPeerConnection = window.RTCPeerConnection || |
| window.webkitRTCPeerConnection; |
| + |
| + // Firefox has the option (media.peerconnection.enabled) to disable WebRTC |
|
Manish Jethani
2017/11/14 10:57:56
Wouldn't it be better to wrap the entire code for
Wladimir Palant
2017/11/14 11:12:49
I agree. While I'm normally not a big fan of incre
kzar
2017/11/14 11:36:35
Done.
|
| + // in which case RealRTCPeerConnection is undefined. Note: This logic assumes |
| + // that the WebRTC wrapping code comes last in the injected function! |
| + if (typeof RealRTCPeerConnection == "undefined") |
| + return; |
| + |
| let closeRTCPeerConnection = Function.prototype.call.bind( |
| RealRTCPeerConnection.prototype.close |
| ); |