clean up
This commit is contained in:
parent
580c886b57
commit
97d223feae
@ -2,13 +2,11 @@
|
|||||||
<button class="media-viewer-canvas__close" title="close">
|
<button class="media-viewer-canvas__close" title="close">
|
||||||
<fa-icon [icon]="faTimes"></fa-icon>
|
<fa-icon [icon]="faTimes"></fa-icon>
|
||||||
</button>
|
</button>
|
||||||
<img class="media-viewer-canvas__image" *ngIf="imageUrl" src="{{imageUrl}}" />
|
<img class="media-viewer-canvas__image" *ngIf="imageUrl" src="{{imageUrl}}" (click)="blockClick($event)"/>
|
||||||
<video class="media-viewer-canvas__image" *ngIf="gifvUrl" role="application" loop autoplay
|
<video class="media-viewer-canvas__image" *ngIf="gifvUrl" role="application" loop autoplay (click)="blockClick($event)">
|
||||||
(click)="attachmentSelected(0)">
|
|
||||||
<source src="{{ gifvUrl }}" type="video/mp4">
|
<source src="{{ gifvUrl }}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
<video class="media-viewer-canvas__image" *ngIf="videoUrl" role="application" loop controls="controls"
|
<video class="media-viewer-canvas__image" *ngIf="videoUrl" role="application" loop controls="controls" (click)="blockClick($event)">
|
||||||
(click)="attachmentSelected(0)">
|
|
||||||
<source src="{{ videoUrl }}" type="video/mp4">
|
<source src="{{ videoUrl }}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
@ -40,9 +40,6 @@ export class MediaViewerComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private loadAttachment(attachment: Attachment) {
|
private loadAttachment(attachment: Attachment) {
|
||||||
console.warn('attachment');
|
|
||||||
console.warn(attachment);
|
|
||||||
|
|
||||||
if (attachment.type === 'image') {
|
if (attachment.type === 'image') {
|
||||||
this.imageUrl = attachment.url;
|
this.imageUrl = attachment.url;
|
||||||
} else if (attachment.type === 'gifv'){
|
} else if (attachment.type === 'gifv'){
|
||||||
@ -52,9 +49,13 @@ export class MediaViewerComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
close(): boolean {
|
close(): boolean {
|
||||||
this.closeSubject.next(true);
|
this.closeSubject.next(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blockClick(event: any): boolean{
|
||||||
|
event.stopPropagation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user