Enhancements in the OpenTok screen-sharing extension for Firefox

 

In the initial version of the OpenTok screen-sharing extension for Firefox, there was no way to detect if the screen-sharing extension was installed (for your domain). The extensionInstalled property of the OT.checkScreenSharingCapabilty() method was only set in Chrome. In other browsers, including Firefox, the property was undefined.

However, with the release of OpenTok.js 2.8, the extensionInstalled property of the OT.checkScreenSharingCapabilty() method is set to true in Firefox if you use the new version of the screen-sharing extension and it is installed and registered to work in your domain. Otherwise, the property is set to false. If you are using the older version of the screen-sharing extension for Firefox, this property is always set to false. (It is not undefined, as it was in OpenTok 2.7).

If you are using the old version of the screen-sharing extension for Firefox you should only check the extensionInstalled property if the extensionRequired property is set to true:

OT.checkScreenSharingCapability(function(response) {
  if (!response.supported || response.extensionRegistered === false) 
    alert('This browser does not support screen sharing.');
  } else if (response.extensionInstalled === false
      && (response.extensionRequired)) {
    alert('Please install the screen-sharing extension '
      + 'and load this page over HTTPS.');
  } else {
    // You can publish a screen-sharing stream
  }
} 

See complete sample code in the screensharing-test file at the OpenTok screensharing-extensions repo on GitHub. This code was updated for OpenTok 2.8.0+ and the new version of the screen-sharing extension for Firefox.

For more information about using screen sharing in OpenTok, see the OpenTok Screen Sharing developer guide.

 

Have more questions? Submit a request