UNPKG

@raishid/react-native-voice-message-player

Version:

An intuitive and customizable React Native module for playing voice messages seamlessly in chat interfaces. This package offers out-of-the-box components and easy-to-use configurations to integrate voice message playback functionality in your application.

13 lines (12 loc) 418 B
/** * Convert seconds to a time format (MM:SS). * * @param {number} seconds - Total seconds. * @returns {string} Time in MM:SS format. */ const secondsToTime = (seconds: number): string => { const minutes = String(Math.floor(seconds / 60)).padStart(2, '0'); const remainingSeconds = String(seconds % 60).padStart(2, '0'); return `${minutes}:${remainingSeconds}`; }; export default secondsToTime