support video in media-overlay #41
This commit is contained in:
parent
8bc73810ba
commit
580c886b57
|
@ -3,7 +3,12 @@
|
|||
<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)">
|
||||
<source src="{{ gifvUrl }}" type="video/mp4">
|
||||
</video>
|
||||
<video class="media-viewer-canvas__image" *ngIf="gifvUrl" role="application" loop autoplay
|
||||
(click)="attachmentSelected(0)">
|
||||
<source src="{{ gifvUrl }}" type="video/mp4">
|
||||
</video>
|
||||
<video class="media-viewer-canvas__image" *ngIf="videoUrl" role="application" loop controls="controls"
|
||||
(click)="attachmentSelected(0)">
|
||||
<source src="{{ videoUrl }}" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
|
@ -19,6 +19,7 @@ export class MediaViewerComponent implements OnInit {
|
|||
|
||||
imageUrl: string;
|
||||
gifvUrl: string;
|
||||
videoUrl: string;
|
||||
|
||||
@Input('openedMediaEvent')
|
||||
set openedMediaEvent(value: OpenMediaEvent) {
|
||||
|
@ -46,12 +47,13 @@ export class MediaViewerComponent implements OnInit {
|
|||
this.imageUrl = attachment.url;
|
||||
} else if (attachment.type === 'gifv'){
|
||||
this.gifvUrl = attachment.url;
|
||||
} else if (attachment.type === 'video'){
|
||||
this.videoUrl = attachment.url;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
close(): boolean {
|
||||
console.warn('xclose media');
|
||||
this.closeSubject.next(true);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue