-
-
Notifications
You must be signed in to change notification settings - Fork 39
Feat/recording notification #875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Unregister the notification from the system. Must call `register()` again to use. | ||
| | Error type | Description| | ||
| | :--------: | :---------- | | ||
| | `NotSupportedError` | NativeAudioAPIModule is not available | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think that we want to add this type of error to this section of docs
| }; | ||
| }, []); | ||
|
|
||
| const setNotification = (paused: boolean) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to set icons once and than only change contentText?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we could split the notification setup into config and state options
packages/audiodocs/docs/system/recording-notification-manager.mdx
Outdated
Show resolved
Hide resolved
...eact-native-audio-api/android/src/main/java/com/swmansion/audioapi/core/NativeAudioPlayer.kt
Outdated
Show resolved
Hide resolved
...ct-native-audio-api/android/src/main/java/com/swmansion/audioapi/core/NativeAudioRecorder.kt
Outdated
Show resolved
Hide resolved
...-native-audio-api/android/src/main/java/com/swmansion/audioapi/system/MediaSessionManager.kt
Show resolved
Hide resolved
...-native-audio-api/android/src/main/java/com/swmansion/audioapi/system/MediaSessionManager.kt
Show resolved
Hide resolved
| } | ||
|
|
||
| if (!NativeAudioAPIModule) { | ||
| throw new Error('NativeAudioAPIModule is not available'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be sth like AudioAPIError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't there all errors that are not directly connected with audio api implementation, be like that then?
f.e. throw new Error('Unsupported input type or failed to decode audio'); in decoder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add some section about that kind of errors to docs
|
|
||
| if (!NativeAudioAPIModule) { | ||
| throw new Error('NativeAudioAPIModule is not available'); | ||
| throw new NotSupportedError('NativeAudioAPIModule is not available'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| throw new NotSupportedError('NativeAudioAPIModule is not available'); | |
| throw new AudioAPIError('NativeAudioAPIModule is not available'); |
packages/react-native-audio-api/src/web-system/notification/RecordingNotificationManager.ts
Show resolved
Hide resolved
michalsek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, but lets talk a bit what to do about reverts that not necessarily we would like to be reverted. We can create followup tasks if they are not critical to "revert the revertion" later, for important parts it would be best to bring them back before merge'ing
Closes RNAA-397, RNAA-370
Introduced changes
Checklist