Ionic 4, how can I change the duration of animations globally? - ionic4

The menu, modals etc. have a transition duration of 300 ms. Is there a simple way to adjust that time globally? I did not find anything in the docs.

Related

Having tasks complete in background for react native ios

Ive cycled through a number of libraries trying to implement a timer that runs in background for React Native (ios).....after an hour I want user notified that hour has passed (even if app is in background).
Ive tried:
react-native-background-timer: flat out doesnt work for ios.....app closes down after less than a minute
react-native-background-fetch: app does stay in background.....however there is no control over how often background event fires. I only want my timer to run for an hour....so if the background event takes a whole day to fire then its useless.
Short question is I want to find a react native library that allows me to run a timer in background from 1 hour to zero....then notifies user that hour has passed (Im using react-native-push-notification for notifications.....and thats working fine).
Any ideas?

Is it possible to set duration of push notification in react native ios?

I am using custom sound for push notification in react native ios.
Is it possible to adjust the duration of push notification in ios?
Since the custom sound is not a completely different sound, it consists of 3 repeat sound, 5 repeat sound, and 7 repeat sound.
The problem is that the toast and sound appear only about the length of the 3 repeat sound and disappear after that.
I am using #react-native-community/push-notification-ios and
I saw the repeat option, but I think it's different, so I'm thinking about how to do it.
Is it possible with the Notifee library?
If anyone has a solution, please advise to me.
I found that Apple's iOS has a time to display the Notification Toast by default, and when that time is exceeded, the Toast disappears and the custom sound stops as well.
In other words, if it is a custom sound that is less than approximately 5 seconds, it can be confirmed that it is played as desired.

How change the duration of a React-Native timing animation dynamically?

I want to know if, once you create a timing Animation in React-Native and start it, can you can update its duration dynamically, without having to stop/recreate the animation? This is the use case that motivated this question:
I am developing a music player in React-Native. I have a simple Player component with a progress bar (slider) like this:
Basically, an Animated.Value is used as the slider's value. When pressing play, a timing animation starts, its duration being the duration of the song. Simultaneously, I control the timers with setInterval(). Every 1000 milliseconds, I add +1 to the timer displayed.
This works fine. Here I have a simple Expo snackbar showing how this works.
The problem is, I want to add a slider that controls the playback speed:
let's ignore the real audio playback and focus only on the slider and timers behavior. If the playback is paused, then when sliding the "Speed factor" slider, it's a very easy change because I only need to update the timers. The progress bar stays the same. But when we're currently playing the song, how do I handle the updates of the timers and the progress bar?
The speed factor slider will adjust the real duration of the song with this formula:
real_duration = normal_duration / speed_factor where speed_factor can be a number between 0.5 and 1.5, for example.
And due to this change duration, I ask whether it is possible to update on the fly an animation's duration, once it has started.

How to show timeline (progress bar) while rendering a video in react native?

I am trying to show a progress bar, just like in any video.
Start -------O------------------ END
I am using React Native Video to embed video content into my app.
So far I came up with the following method:
This library comes with a method to know the current time of video. Since I know the full length of the video in seconds (e.g. 50 seconds), I call onProgess() method which allows me to extract the current time in seconds e.g. 20 seconds.
This allows me to build some UI to show 20/50 ~ 40% has been completed.
However, the downside is that I re-render the content 20 times per second (by constantly calling onProgress), and it just doesn't feel like the correct way to solve the problem.
Can anyone tell me is rendering ~600 (and more) times per minute is actually reasonable during video playback?

Running background tasks in React Native in short intervals

I'm trying to build a time lapse camera that captures images even when the screen is off (battery non-optimised). Ideally for both iOS and Android, but I'm working with Android at the moment. I've poked around react-native-background-job and react-native-background-task, but they all restrict the intervals to be >15 minutes on Android. Is there a good way to fire tasks in smaller intervals?