import { ElementRef , Input , Output , OnInit , ViewChild , AfterViewInit , EventEmitter } from '@angular/core' ; import { BaseComponent , Config , LogService } from '../../shared/core/index' ; import { TrackControlService } from '../../shared/shoutoutplay/index' ; @ BaseComponent ( { selector : 'player-controls' , templateUrl : './components/player/player-controls.component.html' } ) export class PlayerControlsComponent { @ Input ( ) public currentTrack : any ; @ Output ( ) public expand : EventEmitter < any > = new EventEmitter ( ) ; constructor ( private logger , public trackControl ) { } public maximize ( ) { this . logger . debug ( 'maximize' ) ; this . expand . emit ( true ) ; } public onSwipe ( e ) { this . logger . debug ( `Swipe Direction: ${ e . direction }` ) ; if ( e . direction == 4 ) { this . maximize ( ) ; } } }