twilio-video.js icon indicating copy to clipboard operation
twilio-video.js copied to clipboard

Breaking Changes in Firefox 68 (July 9, 2019)

Open manjeshbhargav opened this issue 5 years ago • 7 comments

Firefox 68 will be introducing changes which will cause applications built with Twilio Video JS SDK versions 1.18.0 and below, or 2.0.0-beta9 and below, to stop functioning correctly. Firefox 68 Participants will be unable to publish media Tracks to other Participants in Peer-to-Peer and Group Rooms. Chrome and Safari Participants will remain unaffected and continue to be able to publish media Tracks, even in Rooms that have Firefox 68 Participants.

What is the impact timeline?

Firefox 68 is currently in Beta, and will be released on July 9, 2019. We recommend that you upgrade as soon as possible to avoid impacting your Firefox users.

Will my application be affected by this change?

If you use one of the following Twilio Video JavaScript SDK versions, then your application will be affected when running on Firefox 68 and above:

Twilio Video JS SDK Affected versions Upgrade path
Version 1.x 1.18.0 and below 1.18.1+
Version 2.x 2.0.0-beta9 and below 2.0.0-beta10+

If you are loading the Twilio Video JavaScript library using our CDN convenience URL (1.x version only), then you will automatically get the latest version, and your application will not be affected by this change.

How can I upgrade my application?

If you are using specific versions of the Twilio Video JavaScript library through the Twilio CDN or through NPM, then you will need to upgrade to the latest versions of the Twilio Video Javascript library and re-deploy your application.

Upgrade to a newer release of the JavaScript SDK by updating your application to use one of the releases listed below:

  • 1.x - https://media.twiliocdn.com/sdk/js/video/releases/1.18.1/twilio-video.min.js or CDN convenience URL
  • 2.x - https://media.twiliocdn.com/sdk/js/video/releases/2.0.0-beta10/twilio-video.min.js

If you're using NPM, you can update your library with the following commands:

 npm install [email protected]
 npm install [email protected]

If you are planning to upgrade twilio-video.js from 1.x to 2.x, you can refer to the migration guide.

manjeshbhargav avatar Jun 11 '19 00:06 manjeshbhargav

@manjeshbhargav

What is the difference between v1.18.1 and 2.0.0-beta10?

kumail-raza avatar Jun 13 '19 10:06 kumail-raza

@smkrn110 ,

Please refer to this guide for API differences between 1.x and 2.x. Apart from this, 2.x (latest is 2.0.0-beta11) has the following extra features:

I hope this clears things up for you.

Thanks,

Manjesh Malavalli JSDK Team

manjeshbhargav avatar Jun 13 '19 23:06 manjeshbhargav

I believe 1.18.1 (or one of the most recent updates) introduced a bug which can be reproduced only on older devices:

On Safari 9 / iOS, the following error is thrown from the 1.18.1 library: Line 33939: ReferenceError: Can't find variable: RTCPeerConnection:

if (RTCPeerConnection.prototype.addTransceiver) {
  SafariRTCPeerConnection.prototype.addTransceiver = function addTransceiver() {
    var transceiver = this._peerConnection.addTransceiver.apply(this._peerConnection, arguments);
    var sender = transceiver.sender;
    var track = sender.track;
    this._senders.set(track, sender);
    return transceiver;
  };
}

I understand WebRTC and the video libraries won't be supported on older browsers like these, but this error halts execution of scripts loaded afterwards (causing my app to crash at launch). My workaround is currently to wrap the library in a try/catch which suppresses the error for browsers which don't have the RTCPeerConnection instance in the global domain.

I'd recommend refactoring this to: if(window.RTCPeerConnection && window.RTCPeerConnection.prototype ... ) or something similar. There may be other similar global domain issues like this which need to be reviewed.

gjdownes avatar Jun 23 '19 16:06 gjdownes

Hi @gjdownes ,

Thanks for your input. I was wondering if this error is thrown while you are loading the SDK or while you are trying to connect to a Room. If its happening while you are connecting to a Room, you can actually get around this problem by using the isSupported boolean in the Video namespace:

const { isSupported } = require('twilio-video');

if (isSupported) {
  connect(...);
}

We have an internal ticket to document the isSupported flag, which is part of the Twilio Video JS API.

On the other hand, if the error is thrown during load time, please let me know and I will schedule a fix in one of our upcoming sprints.

Thanks,

Manjesh Malavalli JSDK Team

manjeshbhargav avatar Jun 24 '19 18:06 manjeshbhargav

Hi @manjeshbhargav,

Thanks for your response. In my scenario, it's thrown while loading the SDK. I've had reports for both older iOS devices and Firefox on Linux.

Graeme

gjdownes avatar Jun 24 '19 19:06 gjdownes

Hi @gjdownes ,

Thanks for the clarification. I'll schedule the work for the fix on one of our upcoming sprints.

Thanks,

Manjesh Malavalli JSDK Team

manjeshbhargav avatar Jun 24 '19 20:06 manjeshbhargav

Is this also the reason for audio calls? suddenly the audio calls are not working. I get following error in console: "Warning: This browser does not support audio output selection." I am using firefox dev edition

harpreetsb avatar Jul 06 '19 08:07 harpreetsb