Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

Add getCurrentTime to iOS #304

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add getCurrentTime to iOS #304

wants to merge 2 commits into from

Conversation

liamse
Copy link
Contributor

@liamse liamse commented Dec 5, 2018

Sometimes it is required to get current time of recording in a moment. This method return an promise that can use like this:

import {AudioRecorder} from 'react-native-audio';
// ...
AudioRecorder.getCurrentTime().then(currentTime => {
    if (currentTime) {
        console.log('current Time', currentTime);
    } else {
        console.log('The recorder is not in progress');
    }
})

Add getCurrentTime method. This method returns a promise when audio is in recording. `onProgress` method return this value each 250 milliseconds. Sometimes you need to get it in a moment. This method can help you.
To connect JS to native side to run getCurrentTime method. This function return an promise.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant