UNPKG

@uppy/webcam

Version:

Uppy plugin that takes photos or records videos using the device's camera.

8 lines (7 loc) 1.08 kB
import { jsx as _jsx } from "preact/jsx-runtime"; export default function RecordButton({ recording, onStartRecording, onStopRecording, i18n, }) { if (recording) { return (_jsx("button", { className: "uppy-u-reset uppy-c-btn uppy-Webcam-button", type: "button", title: i18n('stopRecording'), "aria-label": i18n('stopRecording'), onClick: onStopRecording, "data-uppy-super-focusable": true, children: _jsx("svg", { "aria-hidden": "true", focusable: "false", className: "uppy-c-icon", width: "100", height: "100", viewBox: "0 0 100 100", children: _jsx("rect", { x: "15", y: "15", width: "70", height: "70" }) }) })); } return (_jsx("button", { className: "uppy-u-reset uppy-c-btn uppy-Webcam-button", type: "button", title: i18n('startRecording'), "aria-label": i18n('startRecording'), onClick: onStartRecording, "data-uppy-super-focusable": true, children: _jsx("svg", { "aria-hidden": "true", focusable: "false", className: "uppy-c-icon", width: "100", height: "100", viewBox: "0 0 100 100", children: _jsx("circle", { cx: "50", cy: "50", r: "40" }) }) })); }