diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-11-20 16:13:42 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-11-21 22:09:45 +0100 |
commit | 2c8d4697db4b5a2d645b7bfcaf91093a64597958 (patch) | |
tree | 4a54a426058592c187a569a41b864c947236e3cf /client/src | |
parent | cf02fbfb17f9e04312f771f245778d31bc1b69d2 (diff) | |
download | PeerTube-2c8d4697db4b5a2d645b7bfcaf91093a64597958.tar.gz PeerTube-2c8d4697db4b5a2d645b7bfcaf91093a64597958.tar.zst PeerTube-2c8d4697db4b5a2d645b7bfcaf91093a64597958.zip |
Client: add warning if the user want to embed a video of a non https website
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/videos/video-watch/video-share.component.html | 4 | ||||
-rw-r--r-- | client/src/app/videos/video-watch/video-share.component.ts | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/client/src/app/videos/video-watch/video-share.component.html b/client/src/app/videos/video-watch/video-share.component.html index 2e83e9a45..1c2fac1d7 100644 --- a/client/src/app/videos/video-watch/video-share.component.html +++ b/client/src/app/videos/video-watch/video-share.component.html | |||
@@ -19,6 +19,10 @@ | |||
19 | <label>Embed</label> | 19 | <label>Embed</label> |
20 | <input #shareInput (click)="shareInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getVideoIframeCode()" /> | 20 | <input #shareInput (click)="shareInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getVideoIframeCode()" /> |
21 | </div> | 21 | </div> |
22 | |||
23 | <div *ngIf="notSecure()" class="alert alert-warning"> | ||
24 | The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites). | ||
25 | </div> | ||
22 | </div> | 26 | </div> |
23 | </div> | 27 | </div> |
24 | </div> | 28 | </div> |
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 74b238350..8e6de1294 100644 --- a/client/src/app/videos/video-watch/video-share.component.ts +++ b/client/src/app/videos/video-watch/video-share.component.ts | |||
@@ -35,4 +35,8 @@ export class VideoShareComponent { | |||
35 | getVideoUrl() { | 35 | getVideoUrl() { |
36 | return window.location.href; | 36 | return window.location.href; |
37 | } | 37 | } |
38 | |||
39 | notSecure() { | ||
40 | return window.location.protocol === 'http:'; | ||
41 | } | ||
38 | } | 42 | } |