]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Client: add warning if the user want to embed a video of a non https website
authorChocobozzz <florian.bigard@gmail.com>
Sun, 20 Nov 2016 15:13:42 +0000 (16:13 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Mon, 21 Nov 2016 21:09:45 +0000 (22:09 +0100)
client/src/app/videos/video-watch/video-share.component.html
client/src/app/videos/video-watch/video-share.component.ts

index 2e83e9a450987ad8dbebf170287c762de6851476..1c2fac1d7076cfbb742090ddc2cb7ee49c4133ff 100644 (file)
           <label>Embed</label>
           <input #shareInput (click)="shareInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getVideoIframeCode()" />
         </div>
+
+        <div *ngIf="notSecure()" class="alert alert-warning">
+          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).
+        </div>
       </div>
     </div>
   </div>
index 74b238350c55e8fdd6823eaff37d45bc8964260c..8e6de129423ef76b5f6829b55dd336e8bdc3d71f 100644 (file)
@@ -35,4 +35,8 @@ export class VideoShareComponent {
   getVideoUrl() {
     return window.location.href;
   }
+
+  notSecure() {
+    return window.location.protocol === 'http:';
+  }
 }