import { Media , MediaObject } from '@ionic-native/media' ; import { Observable } from 'rxjs/Observable' ; hidden export class MediaObjectMock extends MediaObject { onSuccess : Observable < any > ; onError : Observable < any > ; onStatusUpdate : Observable < any > ; constructor ( _objectInstance , onSuccess , onError , onStatusUpdate ) { super ( _objectInstance ) ; } ; returns { Promise < any > } getCurrentAmplitude ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } getCurrentPosition ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { number } getDuration ( ) { return 42 ; } ; /**
     * Starts or resumes playing an audio file.
     */ play ( iosOptions ? ) { } ; /**
     * Pauses playing an audio file.
     */ pause ( ) { } ; /**
     * 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.
     */ release ( ) { } ; param { number } milliseconds seekTo ( milliseconds ) { } ; param volume { number } setVolume ( volume ) { } ; /**
     * Starts recording an audio file.
     */ startRecord ( ) { } ; /**
     * Stops recording
     */ stopRecord ( ) { } ; /**
     * Pauses recording
     */ pauseRecord ( ) { } ; /**
     * Resumes recording
     */ resumeRecord ( ) { } ; /**
     * Stops playing an audio file.
     */ stop ( ) { } ; } export declare type MediaStatusUpdateCallback = ( statusCode : number ) => void ; export interface MediaError { /**
     * Error message
     */ message : string ; /**
     * Error code
     */ code : number ; } export declare type MediaErrorCallback = ( error : MediaError ) => void ; export class MediaMock extends Media { hidden MEDIA_NONE : number ; hidden MEDIA_STARTING : number ; hidden MEDIA_RUNNING : number ; hidden MEDIA_PAUSED : number ; hidden MEDIA_STOPPED : number ; hidden MEDIA_ERR_ABORTED : number ; hidden MEDIA_ERR_NETWORK : number ; hidden MEDIA_ERR_DECODE : number ; hidden MEDIA_ERR_NONE_SUPPORTED : number ; param src { string } param onStatusUpdate { MediaStatusUpdateCallback } param onSuccess { Function } param onError { MediaErrorCallback } return { MediaObject } create ( src ) { let response ; return response ; } ; }