code: function () {
  
      var deferred = $.Deferred();
  
      if (window.location.protocol === 'http:' && !_this.dev) {
        alert("Screensharing only works under 'https', please add 'https://' in front of your debugger url.");
        deferred.reject('https required');
      }
  
      OT.checkScreenSharingCapability(function (response) {
        if (!response.supported || response.extensionRegistered === false) {
          alert('This browser does not support screen sharing! Please use Chrome, Firefox or IE!');
          deferred.reject('browser support not available');
        } else if (response.extensionInstalled === false) {
          if (detectBrowser() === 'Firefox') {
            if (!firefoxExtensionRequired()) {
              deferred.resolve();
            } else {
              $('#dialog-form-ff').toggle();
              deferred.reject('screensharing extension not installed');
            }
          } else {
            $('#dialog-form-chrome').toggle();
            deferred.reject('screensharing extension not installed');
          }
        } else {
          deferred.resolve();
        }
      });
  
      return deferred.promise();
  
    }
docs: Public Methods