From 2c8d4697db4b5a2d645b7bfcaf91093a64597958 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 20 Nov 2016 16:13:42 +0100 Subject: [PATCH] Client: add warning if the user want to embed a video of a non https website --- client/src/app/videos/video-watch/video-share.component.html | 4 ++++ client/src/app/videos/video-watch/video-share.component.ts | 4 ++++ 2 files changed, 8 insertions(+) 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 @@ + +
+ 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). +
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 { getVideoUrl() { return window.location.href; } + + notSecure() { + return window.location.protocol === 'http:'; + } } -- 2.41.0