Fix videos not loading

master
Max 5 years ago
parent eb01cbbbde
commit 1fda5eef9a

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

Loading…
Cancel
Save