The picker decides everything
Record opens the browser's screen-share prompt (getDisplayMedia). You pick the surface to share; if you choose a tab, most browsers offer a checkbox to include that tab's audio. Recording starts only after you confirm the picker, and the browser shows a persistent sharing indicator (usually a red dot or bar) until you stop. While the picker is open, nothing is being captured.