import { AndroidExoplayer } from '@ionic-native/android-exoplayer' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export declare type AndroidExoPlayerAspectRatio = 'FILL_SCREEN' | 'FIT_SCREEN' ; export interface AndroidExoPlayerParams { /**
     * Url of the video to play.
     */ url : string ; /**
     * Set the user agent. Default is `ExoPlayerPlugin`
     */ userAgent ? : string ; /**
     * Set the player aspect ratio.
     */ aspectRatio ? : AndroidExoPlayerAspectRatio ; /**
     * Hide controls after this many milliseconds, default is `5000`.
     */ hideTimeout ? : number ; /**
     * When set to false stream will not automatically start.
     */ autoPlay ? : boolean ; /**
     * Start playback at this many milliseconds into video, default is `0`.
     */ seekTo ? : number ; /**
     * Amount of time in milliseconds to use when skipping forward, default is `1000`.
     */ forwardTime ? : number ; /**
     * Amount of time in milliseconds to use when skipping backward, default is `1000`.
     */ rewindTime ? : number ; /**
     * Only play audio in the backgroud, default is `false`.
     * If you pass in `audioOnly: true`, make sure to manually close the player on some event (like escape button) since the plugin won't be detecting keypresses when playing audio in the background.
     */ audioOnly ? : true ; /**
     * Optional subtitle url to display over the video.
     * We currently support .srt and .vtt subtitle formats. Subtitles are not supported on all stream types, as ExoPlayer has requirement that both video and subtitle "must have the same number of periods, and must not have any dynamic windows", which means for simple mp4s it should work, but on more complex HLS/Dash setups it might not.
     */ subtitleUrl ? : string ; /**
     * okhttp connect timeout in milliseconds (default is `0`)
     */ connectTimeout ? : number ; /**
     * okhttp read timeout in milliseconds (default is `0`)
     */ readTimeout ? : number ; /**
     * okhttp write timeout in milliseconds (default is `0`)
     */ writeTimeout ? : number ; /**
     * okhttp socket ping interval in milliseconds (default is `0` or disabled)
     */ pingInterval ? : number ; /**
     * Number of times datasource will retry the stream before giving up (default is `3`)
     */ retryCount ? : number ; /**
     * If this object is not present controller will not be visible.
     */ controller ? : AndroidExoPlayerControllerConfig ; } export interface AndroidExoplayerState { [ s ] : string ; } export interface AndroidExoPlayerControllerConfig { /**
     * Image in the controller.
     */ streamImage : string ; /**
     *
     */ streamTitle : string ; /**
     *
     */ streamDescription : string ; /**
     * Hide entire progress bar.
     */ hideProgress ? : true ; /**
     * If progress bar is visible hide current position from it
     */ hidePosition : false ; /**
     * If progress bar is visible Hide stream duration from it
     */ hideDuration : false ; /**
     * Override the player control button icons.
     */ controlIcons ? : { /**
         * Rewind button icon.
         */ exo_rew : string ; /**
         * Play button icon.
         */ exo_play : string ; /**
         * Payse button icon.
         */ exo_pause : string ; /**
         * Fast forward button icon.
         */ exo_ffwd : string ; } ; } export class AndroidExoplayerMock extends AndroidExoplayer { param parameters { AndroidExoPlayerParams } return { Observable < AndroidExoplayerState > } show ( parameters ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; param url { string } param controller { AndroidExoPlayerControllerConfig } return { Promise < void > } setStream ( url , controller ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; return { Promise < void > } playPause ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; return { Promise < void > } stop ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param milliseconds { number } return { Promise < void > } seekTo ( milliseconds ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param milliseconds { number } return { Promise < void > } seekBy ( milliseconds ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; return { Promise < AndroidExoplayerState > } getState ( ) { let response ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; return { Promise < void > } showController ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; return { Promise < void > } hideController ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param controller { AndroidExoPlayerControllerConfig } return { Promise < void > } setController ( controller ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; return { Promise < void > } close ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; }