import { EventEmitter } from '@stencil/core' ; import { HTMLStencilElement } from '@stencil/core/internal' ; import { PlayerProps } from '../core/player/PlayerProps' ; import { AudioAdapter } from './adapters/AudioAdapter' ; import { CaptionsAdapter } from './adapters/CaptionsAdapter' ; import { FullscreenAdapter } from './adapters/FullscreenAdapter' ; import { PiPAdapter } from './adapters/PiPAdapter' ; export interface MediaProviderAdapter < InternalPlayerType = any > extends CaptionsAdapter , AudioAdapter , FullscreenAdapter , PiPAdapter { getInternalPlayer ( ) : Promise < InternalPlayerType > ; play ( ) : Promise < void > ; pause ( ) : Promise < void > ; canPlay ( type ) : Promise < boolean > ; setCurrentTime ( time ) : Promise < void > ; setMuted ( muted ) : Promise < void > ; setVolume ( volume ) : Promise < void > ; canSetPlaybackRate ? ( ) : Promise < boolean > ; setPlaybackRate ? ( rate ) : Promise < void > ; canSetPlaybackQuality ? ( ) : Promise < boolean > ; setPlaybackQuality ? ( quality ) : Promise < void > ; } export type MockMediaProviderAdapter = { [ P in keyof MediaProviderAdapter ] : any ; } ; export interface AdapterProvider < InternalPlayerType = any > { getAdapter ( ) : Promise < MediaProviderAdapter < InternalPlayerType > > ; } export interface AdapterHost < InternalPlayerType = any > extends HTMLStencilElement , AdapterProvider < InternalPlayerType > { } export interface MediaProvider < InternalPlayerType = any > extends AdapterProvider < InternalPlayerType > { logger ? : PlayerProps [ 'logger' ] ; controls : PlayerProps [ 'controls' ] ; language : PlayerProps [ 'language' ] ; loop : PlayerProps [ 'loop' ] ; autoplay : PlayerProps [ 'autoplay' ] ; playsinline : PlayerProps [ 'playsinline' ] ; muted : PlayerProps [ 'muted' ] ; vmLoadStart : EventEmitter < void > ; }