aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-share.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/video-watch/video-share.component.ts')
-rw-r--r--client/src/app/videos/video-watch/video-share.component.ts32
1 files changed, 16 insertions, 16 deletions
diff --git a/client/src/app/videos/video-watch/video-share.component.ts b/client/src/app/videos/video-watch/video-share.component.ts
index aa921afc2..bbd25f5ef 100644
--- a/client/src/app/videos/video-watch/video-share.component.ts
+++ b/client/src/app/videos/video-watch/video-share.component.ts
@@ -1,42 +1,42 @@
1import { Component, Input, ViewChild } from '@angular/core'; 1import { Component, Input, ViewChild } from '@angular/core'
2 2
3import { ModalDirective } from 'ngx-bootstrap/modal'; 3import { ModalDirective } from 'ngx-bootstrap/modal'
4 4
5import { Video } from '../shared'; 5import { Video } from '../shared'
6 6
7@Component({ 7@Component({
8 selector: 'my-video-share', 8 selector: 'my-video-share',
9 templateUrl: './video-share.component.html' 9 templateUrl: './video-share.component.html'
10}) 10})
11export class VideoShareComponent { 11export class VideoShareComponent {
12 @Input() video: Video = null; 12 @Input() video: Video = null
13 13
14 @ViewChild('modal') modal: ModalDirective; 14 @ViewChild('modal') modal: ModalDirective
15 15
16 constructor() { 16 constructor () {
17 // empty 17 // empty
18 } 18 }
19 19
20 show() { 20 show () {
21 this.modal.show(); 21 this.modal.show()
22 } 22 }
23 23
24 hide() { 24 hide () {
25 this.modal.hide(); 25 this.modal.hide()
26 } 26 }
27 27
28 getVideoIframeCode() { 28 getVideoIframeCode () {
29 return '<iframe width="560" height="315" ' + 29 return '<iframe width="560" height="315" ' +
30 'src="' + window.location.origin + '/videos/embed/' + this.video.id + '" ' + 30 'src="' + window.location.origin + '/videos/embed/' + this.video.id + '" ' +
31 'frameborder="0" allowfullscreen>' + 31 'frameborder="0" allowfullscreen>' +
32 '</iframe>'; 32 '</iframe>'
33 } 33 }
34 34
35 getVideoUrl() { 35 getVideoUrl () {
36 return window.location.href; 36 return window.location.href
37 } 37 }
38 38
39 notSecure() { 39 notSecure () {
40 return window.location.protocol === 'http:'; 40 return window.location.protocol === 'http:'
41 } 41 }
42} 42}