code: function onMessageCallback(data) {
      // "cancel" button is clicked
      if (data == 'PermissionDeniedError') {
          chromeMediaSource = 'PermissionDeniedError';
          if (screenCallback) return screenCallback('PermissionDeniedError');
          else throw new Error('PermissionDeniedError');
      }
  
      // extension notified his presence
      if (data == 'rtcmulticonnection-extension-loaded') {
          chromeMediaSource = 'desktop';
      }
  
      // extension shared temp sourceId
      if (data.sourceId && screenCallback) {
          screenCallback(sourceId = data.sourceId, data.canRequestAudioTrack === true);
      }
  }
docs: and the function that handles received messages