Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-screen-recorder>

@methane-ui/rtc~6.8 KB brotli shell + lazy engine~1.4 KB shell · lazy engine chunk

Accessible getDisplayMedia + MediaRecorder screen capture control with system audio toggle and SSR fallback.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-screen-recorder> (@methane-ui/rtc)
Ready · interact with <mth-screen-recorder>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/rtc/screen-recorder"></script>
<mth-screen-recorder system-audio mime-type="video/webm"></mth-screen-recorder>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
systemAudiosystem-audiobooleantrueRequests system/tab audio when starting display capture.
mimeTypemime-typestring"video/webm"Preferred recorded video MIME type.
disableddisabledbooleanfalseDisables screen capture controls.
labellabelstring""Accessible region label.

Events

EventDetail TypeDescription
mth-state-change{ state: unknown }Fired when screen recorder state changes.
mth-record-complete{ blob: Blob | null; url: string; durationMs: number; mimeType: string; systemAudio: boolean }Fired when screen recording stops with output payload.
mth-error{ message: string }Fired on permission or display-capture errors.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
EnterbothFocus is on Share, Pause, Resume, or Stop buttonTransitions screen recorder state and emits mth-state-change

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 1 APG keyboard transitions across LTR/RTL.mth-screen-recorder.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(recording), :state(paused), :state(stopped), :state(unsupported).Conformance suite
i18nRoutes 16 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test