1 import { Component, Input, ViewChild } from '@angular/core'
2 import { ModalDirective } from 'ngx-bootstrap/modal'
3 import { VideoDetails } from '../../shared/video/video-details.model'
6 selector: 'my-video-share',
7 templateUrl: './video-share.component.html'
9 export class VideoShareComponent {
10 @Input() video: VideoDetails = null
12 @ViewChild('modal') modal: ModalDirective
26 getVideoIframeCode () {
27 return '<iframe width="560" height="315" ' +
28 'src="' + this.video.embedUrl + '" ' +
29 'frameborder="0" allowfullscreen>' +
34 return window.location.href
38 return window.location.protocol === 'http:'