Calls navigator.mediaDevices.getDisplayMedia() so the user can pick a screen, window, or browser tab to record. MediaRecorder captures the stream into a webm/mp4 File that lands in the upload queue. Useful for bug-report attachments, demo videos, training content — any workflow where the user needs to show what they see.
The browser will show a chooser for the screen / window / tab to share. Click â— Record in the modal to start.
Stop sharing also stops the recording: when the user clicks the browser's native "Stop sharing" bar, the modal's record session ends cleanly and resolves with the bytes captured up to that point.
JavaScript API
uploader.openScreenCapture({
audio: true, // system / mic audio if browser allows
maxDurationSec: 300, // 5-minute hard cap
mimeType: 'video/webm', // optional codec hint
fileName: 'screen-rec.webm' // optional
}).then(function (file) {
uploader.addFile(file);
});
Bug report attachment recipe
Pair with a single submit button that captures, uploads, and links the file URL into a Jira / Linear ticket:
uploader.on('taskComplete', function (task, result) {
sendBugReport({
screenRecordingUrl: result.fileUrl,
title: 'User-recorded reproduction',
ts: new Date().toISOString()
});
});
document.getElementById('reportBugBtn').addEventListener('click', function () {
uploader.openScreenCapture({ audio: false, maxDurationSec: 120 })
.then(function (file) { uploader.addFile(file); uploader.startUpload(); });
});
Browser support
- Chrome / Edge / Opera: full support including audio capture.
- Firefox: video only — system audio capture is not supported.
- Safari (16.4+): screen capture supported; audio capture limited.
- Mobile: not supported on iOS Safari or Chrome Android — the API rejects with a clear error.