1
0
Fork 0

Client: add warning if the user want to embed a video of a non https website

This commit is contained in:
Chocobozzz 2016-11-20 16:13:42 +01:00
parent cf02fbfb17
commit 2c8d4697db
2 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,10 @@
<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>

View File

@ -35,4 +35,8 @@ export class VideoShareComponent {
getVideoUrl() {
return window.location.href;
}
notSecure() {
return window.location.protocol === 'http:';
}
}