A Chrome extension that records the active tab's audio, lets users trim and remove silent sections, and download it as MP3.
- Install dependencies with
npm install. - Run
npm run build; the loadable extension is created indist/. - In Chrome, open
chrome://extensions, enable Developer mode, select Load unpacked, and choosedist/. - Pin the extension, open it on an audible tab, and choose Start recording. There is no sharing picker: audio only is captured from the tab that was active when the action was invoked.
- You can close the popup while recording. Reopen it to pause, resume, finish, or cancel. Finished recordings are kept locally in IndexedDB until the next recording replaces them.
- No runtime WebExtension polyfill is used. The project uses Chrome's native
chrome.*global and@types/chrome. Safari and Firefox provide a nativebrowser.*global, but Chrome does not; therefore there is no nativebrowserreplacement that works unchanged in all three browsers. - Direct capture is intentionally implemented with
chrome.tabCapture.getMediaStreamId()and audio-onlygetUserMedia()constraints. Chrome requires thetabCapturepermission and a user invocation, but does not show a source picker. The extension reconnects the capture stream to the audio destination so playback continues during recording. - The recording runs in an MV3 offscreen document, not the popup. The service worker obtains a
tabCapturestream ID and the offscreen document ownsMediaRecorder, so popup lifecycle no longer affects capture. - MP3 export uses
@breezystack/lamejs, the maintained ESM/type-enabled fork. It replaces the legacylamejspackage, which has the known bundler errorMPEGMode is not defined. - Safari WebExtensions do not expose this Chrome-specific
tabCapturefeature, so the exact no-picker, automatically-selected-tab requirement cannot be fulfilled in Safari with WebExtension APIs alone. The UI reports this limitation instead of falling back to screen sharing. A Safari version would require an approved native macOS companion using Apple capture APIs, which is a separate product architecture. - The source recording is decoded with Web Audio, so trimming and silence deletion operate on PCM audio. Export uses LAME at a configurable bitrate up to 320 kbps, the MP3 maximum.
- Recordings stay in memory and are not uploaded or persisted. Keep the popup open while recording; closing it ends the extension page and may end the session.
- Start a recording on an audible tab and confirm the toolbar badge says
REC. - Pause and resume; the timer should exclude the paused interval.
- Finish, verify the preview plays, and trim the range.
- Use Delete silent parts on a recording with a known pause, then export and inspect the MP3 bitrate.