← All Components
<mth-screen-recorder>
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
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>import '@methane-ui/rtc/screen-recorder';
import '@methane-ui/react';
export function Example() {
return <mth-screen-recorder system-audio mime-type="video/webm"></mth-screen-recorder>;
}<script setup lang="ts">
import '@methane-ui/rtc/screen-recorder';
</script>
<template>
<mth-screen-recorder system-audio mime-type="video/webm"></mth-screen-recorder>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/rtc/screen-recorder';
import { MthScreenRecorderDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthScreenRecorderDirective],
template: `<mth-screen-recorder system-audio mime-type="video/webm"></mth-screen-recorder>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/rtc/screen-recorder';
import MthScreenRecorder from '@methane-ui/svelte/MthScreenRecorder.svelte';
</script>
<MthScreenRecorder system-audio mime-type="video/webm"></MthScreenRecorder>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
systemAudio | system-audio | boolean | true | Requests system/tab audio when starting display capture. |
mimeType | mime-type | string | "video/webm" | Preferred recorded video MIME type. |
disabled | disabled | boolean | false | Disables screen capture controls. |
label | label | string | "" | Accessible region label. |
Events
| Event | Detail Type | Description |
|---|---|---|
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
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| Enter | both | Focus is on Share, Pause, Resume, or Stop button | Transitions screen recorder state and emits mth-state-change |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 1 APG keyboard transitions across LTR/RTL. | mth-screen-recorder.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(recording), :state(paused), :state(stopped), :state(unsupported). | Conformance suite |
| i18n | Routes 16 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |