import { Event , EventEmitter , h , Method , Prop } from '@stencil/core' ; import { Logger } from '../../core/player/PlayerLogger' ; import { ViewType } from '../../core/player/ViewType' ; import { withComponentRegistry } from '../../core/player/withComponentRegistry' ; import { MediaProvider , MediaProviderAdapter } from '../MediaProvider' ; import { withProviderConnect } from '../ProviderConnect' ; import { createProviderDispatcher , ProviderDispatcher , } from '../ProviderDispatcher' ; import { withProviderContext } from '../withProviderContext' ; export class Name implements MediaProvider { private dispatch ! : ProviderDispatcher ; internal @ Prop ( ) language = 'en' ; internal @ Prop ( ) autoplay = false ; internal @ Prop ( ) controls = false ; internal @ Prop ( ) logger ? : Logger ; internal @ Prop ( ) loop = false ; internal @ Prop ( ) muted = false ; internal @ Prop ( ) playsinline = false ; internal @ Event ( ) vmLoadStart ! : EventEmitter < void > ; constructor ( ) { withComponentRegistry ( this ) ; withProviderConnect ( this ) ; withProviderContext ( this ) ; } connectedCallback ( ) { this . dispatch = createProviderDispatcher ( this ) ; this . dispatch ( 'viewType' , ViewType . Video ) ; } internal @ Method ( ) async getAdapter ( ) { return { getInternalPlayer : async ( ) => { } , play : async ( ) => { } , pause : async ( ) => { } , canPlay : async ( ) => false , setCurrentTime : async ( time ) => { this . logger ! . log ( time ) ; } , setMuted : async ( muted ) => { this . logger ! . log ( muted ) ; } , setVolume : async ( volume ) => { this . logger ! . log ( volume ) ; } , } ; } render ( ) { return < div />; } }