Fix videos not loading

master
Max 5 years ago
parent eb01cbbbde
commit 1fda5eef9a

@ -22,10 +22,12 @@
</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<mat-spinner *ngIf="post.mediaLoading" style="margin:0 auto; margin-top: 2em;" diameter="50"></mat-spinner>
<div class="postMedia" [hidden]="post.mediaLoading">
<mat-spinner *ngIf="post.mediaLoading && post.mediaType === 'IMAGE'" style="margin:0 auto; margin-top: 2em;" diameter="50"></mat-spinner>
<div class="postMedia">
<div [hidden]="post.mediaLoading">
<img *ngIf="post.mediaType === 'IMAGE'" [src]="post.mediaUrl" (load)="onLoad(this.post)" alt="post image"/>
<video *ngIf="post.mediaType === 'VIDEO'" (load)="onLoad(this.post)" controls>
</div>
<video *ngIf="post.mediaType === 'VIDEO'" controls>
<source [src]="post.mediaUrl" type="video/webm">
</video>
</div>

Loading…
Cancel
Save