1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/gallery/lightbox/media/media.lightbox.gallery.component.html

28 lines
846 B
HTML

<div class="imgContainer" #imgContainer>
<img *ngIf="showThumbnail()"
[style.width.%]="imageSize.width"
[style.height.%]="imageSize.height"
[src]="thumbnailSrc"/>
<img *ngIf="gridMedia !== null && gridMedia.isPhoto() && loadMedia && photoSrc"
[style.width.%]="imageSize.width"
[style.height.%]="imageSize.height"
[src]="photoSrc"
(load)="onImageLoad()"
(error)="onImageError()"/>
<video #video
*ngIf="gridMedia !== null && gridMedia.isVideo() && loadMedia"
[style.width.%]="imageSize.width"
[style.height.%]="imageSize.height"
(loadstart)="onImageLoad()"
autoplay
(error)="onImageError()"
(timeupdate)="onVideoProgress()" >
<source [src]="gridMedia.getPhotoPath()" type="{{getVideoType()}}">
</video>
</div>