]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-watch/video-share.component.ts
Fix tag display on video watch
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / video-share.component.ts
CommitLineData
df98563e 1import { Component, Input, ViewChild } from '@angular/core'
cf02fbfb 2
df98563e 3import { ModalDirective } from 'ngx-bootstrap/modal'
cf02fbfb 4
404b54e1 5import { VideoDetails } from '../shared'
cf02fbfb
C
6
7@Component({
8 selector: 'my-video-share',
9 templateUrl: './video-share.component.html'
10})
11export class VideoShareComponent {
404b54e1 12 @Input() video: VideoDetails = null
cf02fbfb 13
df98563e 14 @ViewChild('modal') modal: ModalDirective
cf02fbfb 15
df98563e 16 constructor () {
cf02fbfb
C
17 // empty
18 }
19
df98563e
C
20 show () {
21 this.modal.show()
cf02fbfb
C
22 }
23
df98563e
C
24 hide () {
25 this.modal.hide()
cf02fbfb
C
26 }
27
df98563e 28 getVideoIframeCode () {
cf02fbfb 29 return '<iframe width="560" height="315" ' +
d8755eed 30 'src="' + this.video.embedUrl + '" ' +
cf02fbfb 31 'frameborder="0" allowfullscreen>' +
df98563e 32 '</iframe>'
cf02fbfb
C
33 }
34
df98563e
C
35 getVideoUrl () {
36 return window.location.href
cf02fbfb 37 }
2c8d4697 38
df98563e
C
39 notSecure () {
40 return window.location.protocol === 'http:'
2c8d4697 41 }
cf02fbfb 42}