2017-06-16 08:32:15 -04:00
|
|
|
import { Component, Input, ViewChild } from '@angular/core'
|
2016-11-20 10:09:38 -05:00
|
|
|
|
2017-06-16 08:32:15 -04:00
|
|
|
import { ModalDirective } from 'ngx-bootstrap/modal'
|
2016-11-20 10:09:38 -05:00
|
|
|
|
2017-10-25 10:43:19 -04:00
|
|
|
import { VideoDetails } from '../shared'
|
2016-11-20 10:09:38 -05:00
|
|
|
|
|
|
|
@Component({
|
2017-10-19 08:58:28 -04:00
|
|
|
selector: 'my-video-download',
|
|
|
|
templateUrl: './video-download.component.html',
|
|
|
|
styles: [ '.resolution-block { margin-top: 20px; }' ]
|
2016-11-20 10:09:38 -05:00
|
|
|
})
|
2017-10-19 08:58:28 -04:00
|
|
|
export class VideoDownloadComponent {
|
2017-10-25 10:43:19 -04:00
|
|
|
@Input() video: VideoDetails = null
|
2016-11-20 10:09:38 -05:00
|
|
|
|
2017-06-16 08:32:15 -04:00
|
|
|
@ViewChild('modal') modal: ModalDirective
|
2016-11-20 10:09:38 -05:00
|
|
|
|
2017-06-16 08:32:15 -04:00
|
|
|
constructor () {
|
2016-11-20 10:09:38 -05:00
|
|
|
// empty
|
|
|
|
}
|
|
|
|
|
2017-06-16 08:32:15 -04:00
|
|
|
show () {
|
|
|
|
this.modal.show()
|
2016-11-20 10:09:38 -05:00
|
|
|
}
|
|
|
|
|
2017-06-16 08:32:15 -04:00
|
|
|
hide () {
|
|
|
|
this.modal.hide()
|
2016-11-20 10:09:38 -05:00
|
|
|
}
|
|
|
|
}
|