* [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.
* Add a method to update options in Core
* Add a method to update options in Plugin (for any plugins)
* Allow re-initializing i18n locales after they’ve been updated with .setOptions
* use rest spread instead of Object.assign
* override setOptions in plugins to include i18nInit
* merge restrictions object in setOptions
* check that newOpts exists
* add spread ...
* don’t double merge
* add i18nInit to all plugins that use translation strings
* add setOptions tests to Core and Dashboard
* add setOptions docs for Core and Plugins
* fix tests for thumbnail-generator by adding plugins: {} to mock core
cause ThumbnailGenerator now calls this.setPluginState, which expects `core.state.plugins`
* also update meta with setOptions if it’s passed, change the way this.opts is set in core
@goto-bus-stop does this look ok? merging restrictions opts in core
* if locale was passed to setOptions(), call plugin.setOptions() on all plugins, so that i18n updates
* add Dashboard test that checks if locale is updated from Core via setOptions()
* Reafactor website Dashboard example to use setOptions and allow selecting a locale
🎉
* Update eslint
* Do eslint --fix
* Do not access Object.prototype method 'hasOwnProperty' from target object
* utils: add hasProperty
* eslint --fix
* Disable quote-props for locale files
* add back quotes in locale files
* revert locale files to state on master
* Update react-scripts
* lerna link convert
* ci: use npm ci
* update lockfile
* companion: set `bin` to source file
Since typescript doesn't actually transform anything, we can just use
this.
In a next major version we could set `noEmit: true` in the tsconfig and
stop publishing `lib`.
* companion: do chmod +x on start-server.js
* build: remove obsolete lerna config
* build: explicitly install latest versions when building e2e tests for ci
* Remove versions from private packages
* fix regex
* try fix
* ci: force npm to install to endtoend folder
* ci: fold up e2e build output
* Update netlify deploy preview command
* Remove mentions of npm run bootstrap
* Edit .github/CONTRIBUTING.md instead
* companion: add proxy executable
* companion: fix publish
* Downgrade jest to appease create-react-app
* Allow definition of MediaRecorder mimeType
This PR introduces a new option for the `@uppy/webcam` plugin called `preferredMimeType` which defaults as `null`.
If a value is passed, the browser's `MediaRecorder` implementation checks if the `preferredMimeType` is supported, and if it thinks it is, will attempt to record using the `preferredMimeType` rather than the browser default.
If the `preferredMimeType` is unsupported, the browser will fall back to using its default recording mime type.
This allows, for example, a user to pass `preferredMimeType: "video/webm"` during the `@uppy/webcam` plugin construction which will instruct the browser to record to a `.webm` container.
Specific codecs may also be passed here. For example, `video/webm;codecs=vp8` may still parse as valid by the browser.
## Limitations
This does not currently change the mime type for captured images on line 282 (`image/jpeg`) and will only pass the `preferredMimeType` to the browser `MediaRecorder` API.
### Reference
https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorderhttps://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/isTypeSupportedhttps://cs.chromium.org/chromium/src/third_party/blink/web_tests/fast/mediarecorder/MediaRecorder-isTypeSupported.html?q=MediaRecorder-isTypeSupported&drhttps://www.webmproject.org/about/faq/
* Constantize preferredMimeType
* Lint fix
* Change option name to preferredVideoMimeType
* One more preferredVideoMimeType
* Update comment
* docs: add preferredVideoMimeType
* Log error in uppy.addFile try/catch
* Add `.isRestriction` to a custom RestrictionError, check for that before logging
* keep throwing for robodog.upload
//cc @goto-bus-stop
* /examples/dev - added polyfills for easy development in IE11
* @uppy/dashboard - made all svgs not focusable in IE11
* /examples/dev - started sharing serviceWorker registration code
* /examples/dev - added polyfills for IE11 to dev bundle
* @uppy/provider-views - added accessibility
* @uppy/provider-views - simplified checkbox css
* @uppy/dashboard - on tab set focus to the current verlay
* @uppy/dashboard - factored out code related to focus into a separate file
* @uppy/dashboard, and connected plugins - made focus travel well, and be managed in a single place in Dashboard
* @uppy/dashboard - made modal opener button focus keep focus on modal close
* @uppy/dashboard - focus management for uploaded-files
* @uppy/dashboard - made informer read messages without interruption
* @uppy/provider-views - removed the bug of focus jumping on safari
* @uppy/dashboard - made focus travel well in instagram in firefox
* @uppy - moved lodash.debounce dependency from / to @uppy/dashboard
* everywhere - made <ul>s not focusable for firefox
* @uppy/provider-views - unnested scss, copypasted alex's :focus changes
* Added JSDoc eslint package and rules, and fixed some JSDoc comments
* .eslintrc - made jsdoc errors warnings instead
* package-lock.json for new package.json
* eslint fix
* @uppy/dashboard - avoid forcing focus when we are inline
* @uppy/dashboard - in firefox, made sure superfocus is not switching back to uppy
* @uppy/dashboard - no focus jump for .info() inline, fix for firefox
Made focus not interrupt .info() when we are in the inline mode;
Made firefox start superfocusing when we either tab into, or click on some element in Uppy
* @uppy/dashboard - only listen to click/focus on uppy
* @uppy/dashboard - started trapping focus in inline mode too
* @uppy/dashboard - restricted trapFocus() event listener to this.el
* @uppy/core - started throttling progress emits.
1. To fix heat up in firefox
2. To fix focus in firefox
* @uppy/core - fixed tests by adding .flush()-s for progress emits
* @uppy/dashboard - stopped trapping focus in inline mode, made background inert
* @uppy/dashboard - added MutationObserver polyfill
* tests - made locale-packs.js pass
* REVERTED last 3 commits that introduced inert
Inert requires too many polyfills, atm tests fail in IE 10.0, wicg-inert library reportedly has performance issues. We decided to at least wait until _some_ browser introduce inert html property natively.
* @uppy/dashboard - IE11 fix for focusing
* @uppy/dashboard - fix for a bug in Safari for long uploads with checkbox clicking
* RERUN TESTS - tiny commit to rerun tests
* @uppy/dashboard - removed useless touchstart event listener
* Cancel superFocus in recordIfFocusedOnUppyRecently, when focus moves away from Uppy
* @uppy/provider-views - made Filter not swallow letters
* @uppy/dashboard - stopped superfocus from refocusing if we're already in the overlay
Webpack likes to pick the ES module versions of modules over CJS
versions. So, if we do `require('preact')`, we can get the ES module
version of it. preact in version 8.3.0 switched its file extension
from `.esm.js` to `.mjs`, which in webpack's default configuration meant
the module implementation became much stricter. The result is that we
get a different value in `require('preact')`.
This older version of preact doesn't use `.mjs` yet so we can safely
`require('preact')` it in webpack. It still picks the ESM version, but
now it uses the looser implementation which is interchangeable for our
purposes.
* first swing at building locale pack
* expose default locale on the plugin instance
* write a pretty en_US locale to a file, using stringify-object and template.js
* generated locale pack
* start adding a script that checks for unused locale strings
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* Update bin/build-locale-pack.js
* Console output improvements
* Also sort plugin locale keys
* Support dependencies when digging up sources
because e.g. 'emptyFolderAdded' is used in provider-views but set in Dashboard's defaultLocale
* More complex matching
So can can support cases like: `uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')`
* Remaining const defaultLocale -> this.defaultLocale
* Update packages/@uppy/locales/en_US.js
* Mock browser environment so all plugins can be instantiated
* Clean up output a bit
* Update bin/build-locale-pack.js
* Add all remaining plugin's locales to en_US bundle
* Update packages/@uppy/dashboard/src/index.js
* Update en_US.js
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* remove unused strings
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* Also write csv because that makes it real easy to import to friendlier places for translators /cc @arturi
* don’t set locale: this.defaultLocale — it overrides the lang pack
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* Add 'russian plural' for english, for consistency
Allows us to signal that this is possible in new target languages, and also run better linting
* Cleanup
* No longer write csv
* WIP for NL
* Create package.json
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* move locales to /src
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* ignore locales themselves
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* build minified locale packs
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* expose Uppy.locale = {} placeholder object
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* Update ru_RU.js
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* add locale bundles to example
Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>
* Upload locales to cdn
* Allow to run tests with upload-to-cdn by setting a versionSuffix
* Move locale build to function, to make room for test()
* Bring ru_RU in sync with English
now that we've added 3 plural types across the board
* Document using locales as a consuming dev, and plugin dev
* Add linting for missing/excess locale strings
* Add the locales we had to remove to the legacy folder
and explain why they cannot make it back
* Move legacy outside of src so they are definitely not transpiled, etc
* Update packages/@uppy/locales/src/nl_NL.js
* Update website/src/docs/uppy.md