Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

456 B
Raw Blame
import type { MicrophoneListState } from './microphone-list-state';

export type MicrophonePermission = PermissionState | 'unknown';

export type MicrophoneStatus = 'allowed' | 'blocked' | 'pending';

export function microphoneStatus(permission: MicrophonePermission, list: MicrophoneListState): MicrophoneStatus {
  if (permission === 'denied') return 'blocked';
  if (permission === 'granted' || list === 'ready') return 'allowed';
  return 'pending';
}