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