From 4333bc950d6878978bd5888a619a1995a3b8e117 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Wed, 17 May 2017 07:34:54 -0400 Subject: [PATCH] refactor(media): --- src/@ionic-native/plugins/media/index.ts | 44 ++++++------------------ 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/src/@ionic-native/plugins/media/index.ts b/src/@ionic-native/plugins/media/index.ts index c9ad9fca0..92cff246a 100644 --- a/src/@ionic-native/plugins/media/index.ts +++ b/src/@ionic-native/plugins/media/index.ts @@ -29,17 +29,13 @@ export class MediaObject { * Get the duration of an audio file in seconds. If the duration is unknown, it returns a value of -1. * @returns {number} Returns a promise with the duration of the current recording */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) getDuration(): number { return; } /** * Starts or resumes playing an audio file. */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) play(iosOptions?: { numberOfLoops?: number, playAudioWhenScreenIsLocked?: boolean @@ -48,75 +44,57 @@ export class MediaObject { /** * Pauses playing an audio file. */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) pause(): void { } /** * Releases the underlying operating system's audio resources. This is particularly important for Android, since there are a finite amount of OpenCore instances for media playback. Applications should call the release function for any Media resource that is no longer needed. */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) release(): void { } /** * Sets the current position within an audio file. * @param {number} milliseconds The time position you want to set for the current audio file */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) seekTo(milliseconds: number): void { } /** * Set the volume for an audio file. * @param volume {number} The volume to set for playback. The value must be within the range of 0.0 to 1.0. */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) setVolume(volume: number): void { } /** * Starts recording an audio file. */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) startRecord(): void { } /** * Stops recording */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) stopRecord(): void { } /** * Pauses recording */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) pauseRecord(): void { } /** * Resumes recording */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) resumeRecord(): void { } /** * Stops playing an audio file. */ - @CordovaInstance({ - sync: true - }) + @CordovaInstance({ sync: true }) stop(): void { } }