mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-29 21:13:21 +00:00
* add Audio plugin
* add audio-oscilloscope to visualize the recording
* refactor: rename everything to Audio, use oscilloscope, re-init when appropriate, improved preview screen
* tweak styles
* add @uppy/audio to the Uppy bundle
* update Readme and package.json
* add docs, update locales, add website example
* webcam plugin also shouldn’t show recording length counter on video preview screen
* update package.json and yarn.lock
* update types
* update locale
* fix locale issues
* remove leftover webcam test
* Delete index.test-d.ts
* Revert "Delete index.test-d.ts"
This reverts commit f4ec431f6a.
* fix lint and type tests
* Update website/src/docs/audio.md
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/audio-oscilloscope/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/DiscardButton.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/audio-oscilloscope/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/supportsMediaRecorder.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update website/src/docs/audio.md
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/types/index.d.ts
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* remove unused method
* remove unused commented declarations
* make all methods private
* convert class component to hooks
* more private
* fix lint
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
30 lines
790 B
JavaScript
30 lines
790 B
JavaScript
const { h } = require('preact')
|
|
|
|
function DiscardButton ({ onDiscard, i18n }) {
|
|
return (
|
|
<button
|
|
className="uppy-u-reset uppy-c-btn uppy-Audio-button"
|
|
type="button"
|
|
title={i18n('discardRecordedFile')}
|
|
aria-label={i18n('discardRecordedFile')}
|
|
onClick={onDiscard}
|
|
data-uppy-super-focusable
|
|
>
|
|
<svg
|
|
width="13"
|
|
height="13"
|
|
viewBox="0 0 13 13"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
aria-hidden="true"
|
|
className="uppy-c-icon"
|
|
>
|
|
<g fill="#FFF" fillRule="evenodd">
|
|
<path d="M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z" />
|
|
<path d="M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z" />
|
|
</g>
|
|
</svg>
|
|
</button>
|
|
)
|
|
}
|
|
|
|
module.exports = DiscardButton
|