mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 03:08:34 +00:00
* [feature] - Add new ‘showRecordingLength’ prop for the Webcam plugin. When this is true, it counts the duration of a recording and displays it to the user. Add a test for generating the correct duration of the recording. * Update packages/@uppy/webcam/src/style.scss Co-Authored-By: Artur Paikin <artur@arturpaikin.com> * Added i18n for the recording length counter and update Readme. Fix Webcam styles where some styles were not in alphabetical order. * Update packages/@uppy/webcam/src/style.scss Co-Authored-By: Artur Paikin <artur@arturpaikin.com> Added i18n for the recording length counter and update Readme. Fix Webcam styles where some styles were not in alphabetical order.
12 lines
448 B
JavaScript
12 lines
448 B
JavaScript
const { h } = require('preact')
|
|
const formatSeconds = require('./formatSeconds')
|
|
|
|
module.exports = function RecordingLength ({ recordingLengthSeconds, i18n }) {
|
|
const formattedRecordingLengthSeconds = formatSeconds(recordingLengthSeconds)
|
|
|
|
return (
|
|
<div class="uppy-Webcam-recordingLength" aria-label={i18n('recordingLength', { recording_length: formattedRecordingLengthSeconds })}>
|
|
{formattedRecordingLengthSeconds}
|
|
</div>
|
|
)
|
|
}
|