0

After getting an email from Twilio with the title "Twilio Video JS SDK and Firefox 68 Breaking Change" which suggest that applications with twilio-video package version 1.18.0 and below will have breaking changes for the new firefox 68, I went to update my npm package to version 1.18.1 but now when I try to open my app in firefox quantum 67.0.4 I get the following error:

ReferenceError: mozRTCSessionDescription is not defined

./node_modules/@twilio/webrtc/lib/rtcsessiondescription/firefox.js
node_modules/@twilio/webrtc/lib/rtcsessiondescription/firefox.js:4

  1 | /* globals mozRTCSessionDescription, RTCSessionDescription */
  2 | 'use strict';
  3 | 
> 4 | module.exports = typeof RTCSessionDescription !== 'undefined' ? RTCSessionDescription : mozRTCSessionDescription;

Bug?, Is there a fix to this? Thanks!

1 Answers1

2

One of the reasons this can happen is that you or an addon has disabled WebRTC. If you paste this into the JS console

console.log(window.RTCSessionDescription, window.mozRTCSessionDescription);

and it shows undefined undefined that is very likely the cause of the error you get. Check the value of media.peerconnection.enabled in Firefox about:config page and enable it if it is disabled.

Philipp Hancke
  • 15,855
  • 2
  • 23
  • 31
  • Yes sir, you were absolutely right. That was the problem. I only have one question though, how did you come to this conclusion? – Sebastian Serrano Jun 25 '19 at 01:05
  • after more than half a decade of working with this stuff on a daily basis... you know these things. https://github.com/twilio/twilio-webrtc.js/pull/107 should make things work a bit better in this situation. – Philipp Hancke Jun 25 '19 at 07:10