fix(types): Add type definition for getCurrentAmplitude (#241)
* ci(travis): Update Travis CI configuration for new paramedic (#227)
* Update Travis CI configuration for new paramedic
* Update .travis.yml
* remove failing platforms
* Add type definition for getCurrentAmplitude
Co-authored-by: Jan Piotrowski <piotrowski+git@gmail.com>
diff --git a/types/index.d.ts b/types/index.d.ts
index 3e47fb9..18f4496 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -28,6 +28,14 @@
*/
interface Media {
/**
+ * Returns the current amplitude within an audio file.
+ * @param mediaSuccess The callback that is passed the current amplitude (0.0 - 1.0).
+ * @param mediaError The callback to execute if an error occurs.
+ */
+ getCurrentAmplitude(
+ mediaSuccess: (amplitude: number) => void,
+ mediaError?: (error: MediaError) => void): void;
+ /**
* Returns the current position within an audio file. Also updates the Media object's position parameter.
* @param mediaSuccess The callback that is passed the current position in seconds.
* @param mediaError The callback to execute if an error occurs.
@@ -81,4 +89,4 @@
interface IosPlayOptions {
numberOfLoops?: number;
playAudioWhenScreenIsLocked?: boolean;
-}
\ No newline at end of file
+}