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