private static LOADTIME_TOO_LONG: number = 30000;
@ViewChild('magnetUriModal') magnetUriModal: ModalDirective;
+ @ViewChild('shareModal') shareModal: ModalDirective;
downloadSpeed: number;
error: boolean = false;
}
loadVideo() {
- console.log('<iframe width="560" height="315" src="' + window.location.origin + '/videos/embed/' + this.video.id + '" frameborder="0" allowfullscreen></iframe>');
-
// Reset the error
this.error = false;
// We are loading the video
this.magnetUriModal.hide();
}
+ showShareModal() {
+ this.shareModal.show();
+ }
+
+ hideShareModal() {
+ this.shareModal.hide();
+ }
+
+ getVideoIframeCode() {
+ return '<iframe width="560" height="315" ' +
+ 'src="' + window.location.origin + '/videos/embed/' + this.video.id + '" ' +
+ 'frameborder="0" allowfullscreen>' +
+ '</iframe>';
+ }
+
+ getVideoUrl() {
+ return window.location.href;
+ }
+
private loadTooLong() {
this.error = true;
console.error('The video load seems to be abnormally long.');