[av][ios] Fix the low quality audio preset (#24323)# Why Setting recording options to `RecordingOptionsPresets.LOW_QUALITY` would produce really large files. Fixes https://github.com/expo/ex
[av][ios] Fix the low quality audio preset (#24323)# Why Setting recording options to `RecordingOptionsPresets.LOW_QUALITY` would produce really large files. Fixes https://github.com/expo/expo/issues/24257 P.S. We might consider switching from the `.caf` extension to `.m4a` for the low quality preset so the audio format is more recognizable. For example chrome won't open `.caf` files in the browser, but it does open `.m4a` files saved with the same settings. # How We were saving with `.caf` extension and not setting the `outputFormat`, so the audio produced was uncompressed (I think). I've set the output format to `IOSOutputFormat.MPEG4AAC` and reduced the bit rate to `64000`, now 1 minute low quality recording is about the same size (460KB +- 10%) as a 1 minute recording from the iOS voice memos app, which I think is a good baseline. # Test Plan Tested in iOS simulator and iPhone 11 running iOS 16
show more ...
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)Why --- Prettier 3 is out. Add support for it with this linter config. **Note for reviewer:** the first commit is the one with th
[lint] Upgrade to Prettier v3, typescript-eslint to v6 (#23544)Why --- Prettier 3 is out. Add support for it with this linter config. **Note for reviewer:** the first commit is the one with the actual changes. The rest of this PR are changes to get the linter passing (mostly autofix). How --- Update eslint-config-prettier and eslint-plugin-prettier. To address deprecation warnings, also update typescript-eslint/parser and typescript-eslint/eslint-plugin. Because of an update to typescript-eslint/parser, we need to suppress deprecation warnings (documented in a comment). Regenerated test snapshots. Due to the upgraded dependencies, typecasts and optional chaining are now auto-fixable by lint. This converts warnings into autofixes. Test Plan --- `yarn test` in the linter config. Run `expotools check --all --fix-lint --no-build --no-test --no-uniformity-check` to try this config on the whole repo. --------- Co-authored-by: Expo Bot <[email protected]>
[workspace] Bump TypeScript version to 5.1.3 (#23143)# Why Closes ENG-9088 # How Bump TypeScript to the latest, and rebuild all required SDK packages Had to update `typeRoots` inside `
[workspace] Bump TypeScript version to 5.1.3 (#23143)# Why Closes ENG-9088 # How Bump TypeScript to the latest, and rebuild all required SDK packages Had to update `typeRoots` inside `expo-module-scripts` due to a change in TypeScript 5.1 where it no longer walks up automatically looking in parent directories ([Release notes](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1-rc/#typeroots-are-consulted-in-module-resolution)) # Test Plan Ensure that `et cp -a` yields no errors, docs and tools build correctly, and that CI is green # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
[docs][packages] fix problematic Apple links (#20591)
[packages][docs] fix few issues in code comments, regenerate docs data (#19366)
[android][expo-av] Add volume panning for MediaPlayer (#15530) Signed-off-by: DominickVale <[email protected]>
[av][docs] move documentation to source, autogenerate docs (#18223)
[av][docs] move documentation to source, use docs autogeneration feature (#17954)Co-authored-by: Bartłomiej Bukowski <[email protected]>
[expo-av][ios] Display "Remote Debug" warn on the JS side only (#17210)# Why The _"Audio sample callback is unavailable when Remote Debugging"_ warning was displayed from the native side, so it
[expo-av][ios] Display "Remote Debug" warn on the JS side only (#17210)# Why The _"Audio sample callback is unavailable when Remote Debugging"_ warning was displayed from the native side, so it was always included in Expo Go, regardless of expo-av being actually installed. # How - Removed the native warning - Improved the message on the JS side. It is displayed every time when user calls `soundInstance.setOnAudioSampleReceived()` when remote debugging. Replaced error with warning. - Backported native changes to SDK 45 and 44 versioned code.
[av] improve and cleanup types as well as their exports (#16905)
[av] Implement JSI Audio on Android (#16075)* Marc's Gradle/CMake/C++ changes * Java code changes * Add Android to supported platforms on NCL * Reformat C++ code * Rebase, fixes, sugges
[av] Implement JSI Audio on Android (#16075)* Marc's Gradle/CMake/C++ changes * Java code changes * Add Android to supported platforms on NCL * Reformat C++ code * Rebase, fixes, suggestions * Requested Gradle CMake changes * Fix spotless
[lint] Add "caughtErrors: 'all'" to linter config (#16591)Why --- ES2019 added "optional catch bindings" so that `e`/`error`/etc. don't need to be specified in catch clauses if the thrown value i
[lint] Add "caughtErrors: 'all'" to linter config (#16591)Why --- ES2019 added "optional catch bindings" so that `e`/`error`/etc. don't need to be specified in catch clauses if the thrown value isn't used. This changes our lint rules to warn if unnecessary error variables are declared. https://2ality.com/2017/08/optional-catch-binding.html. In JS, as opposed to TS, we allow unused catch bindings if the variable names are prefixed with an underscore. This is so that JS targeting older JS interpreters can write `catch (_) {}` if needed. With TS we disallow unused catch bindings since tsc can compile code to its target JS version. How --- Added `caughtErrors: 'all'` to the no-unused-vars rule's configuration. As part of this change, I made the TypeScript linting rules apply only to .ts/.tsx/.ts.d files and updated the unit test snapshots. Test Plan --- Added unit tests to the linter. Ran linter over all modules in this repo with expotools.
[expo-av] Enable selection of audio recording input (#15806)
[av] Fix NCL error message on unsupported platforms by jsi audio[skip ci]
[expo-av][ios] Implement JSI Audio on iOS (#14904)* Add .mm files to podspec * Add JSI callback extension * Audio tap processing * TypeScript part * Install JSI bindings * Make it wo
[expo-av][ios] Implement JSI Audio on iOS (#14904)* Add .mm files to podspec * Add JSI callback extension * Audio tap processing * TypeScript part * Install JSI bindings * Make it work on Hermes * Cleanup, JS-doc comments * Minor fixes * Rework File structure * Use JSI HostObject for cleanup * Cleanup, review suggestions, namespaces * Fix crash when reloading * Use unique_ptr for wrapper holder * provide EXAV module name in Expo Go * Rebuild JS, Apply more suggestions, Fix comment
[expo-av] fix require cycles (#14820)
[ios][audio] Add audio metadata (title) updates (#14134)
[eslint-config] remove `arrowParens` overwrite, reformat files (#14232)
[eslint-config] bump dependencies and minimum required lint tools versions (#13858)Co-authored-by: James Ide <[email protected]>
Rename unimodules imports to expo-modules-core
[av] Add permissions hook from factory (#13851)Co-authored-by: Bartłomiej Bukowski <[email protected]>
[ios][av] Fix container default type to work cross-platform (#13492)
[web][expo-av] Added recording web support via MediaRecorder (#8791)Co-authored-by: Michael Nightingale <[email protected]> Co-authored-by: James EdJo <[email protected]
[web][expo-av] Added recording web support via MediaRecorder (#8791)Co-authored-by: Michael Nightingale <[email protected]> Co-authored-by: James EdJo <[email protected]> # Why See issue #8721, expo-av currently doesn't support web audio recording. # How Added MediaRecorder to `ExponentAV.web.ts`, # Test Plan I have ensured the existing tests now run on web also, so run `yarn web` within `packages/expo-av`. # Further Notes This is really just an initial outline of what usage might look like with the MediaRecorder API, some thoughts: **Chrome issues preventing us from getting duration/milliseconds** - what is the consensus on adding a polyfill to the MediaRecorder to allow more options and wider browser support? Only Firefox and Chrome currently include a working MediaRecorder implementation. * I have modified tests to exclude duration assertions on web only. [Please see this Chromium issue](https://bugs.chromium.org/p/chromium/issues/detail?id=642012) Polyfill library options are: - [ai/audio-recorder-polyfill](https://github.com/ai/audio-recorder-polyfill): This looks great and is lightweight, but only supports wav encoding out of the box. We could however allow users to pass their own encoder in via the `web` key in the recording options. - [kbumsik/opus-media-recorder](https://github.com/kbumsik/opus-media-recorder): More recently developed, built in support for 3 codecs. However, its use of workers and WASM may make it more difficult to integrate. As the web side of this uses window.MediaRecorder and passes the options directly in, there is no reason why we couldn't leave it down to the implementer to polyfill on a per project basis. My understanding is that the current android and iOS implementations return a file URI on preparation, this file is then actively written to for recording? **This doesn't seem possible on web and in order to pass tests currently returns `{ uri: 'file:///unsupported' ...}**`, I felt this was better than risk breaking current iOS and Android implementations/tests. **A uri/resource generated from the recording blob is returned on stop.** (See packages/expo-av/src/ExponentAV.web.ts:185) I wasn't able to add the recording tests to `apps/bare-expo/e2e/TestSuite-test.web.js` as I received a `Not supported` error, the tests do run and pass under `yarn web` however. Final note: the type definitions probably need vast improvement, I am still fairly new to TS and getting my head around it. You'll notice
[permissions] Migrate interface to expo-modules-core (#12961)
[av][ios] Reduce time to record for Audio recordings (#12294)Recording Audio on iOS is pretty slow to start on real devices and may take up to 1..1.5 seconds before it starts. This is caused in lar
[av][ios] Reduce time to record for Audio recordings (#12294)Recording Audio on iOS is pretty slow to start on real devices and may take up to 1..1.5 seconds before it starts. This is caused in large part due to the AVSession which is deactivated and reactivated in between the prepare and start calls. This PR introduces an optimised API (similar to Sound.createAsync) to streamline audio recording. On iOS it sets a new option called keepAudioActiveHint which hints the native layer that start will be called immediately after and thus the session does not need to be deactivated.
12