refactory of the draft validation and add video player

This commit is contained in:
Eudes Inácio
2023-10-31 10:09:12 +01:00
parent 2d08c5b776
commit 4801ea2210
13 changed files with 510 additions and 507 deletions
@@ -32,8 +32,12 @@
</ion-refresher-content>
</ion-refresher>
<div class="post-item px-20">
<div (click)="openPreview(publication)" *ngIf="publication.FileBase64.length > 30" class="post-img">
<img src="{{publication.FileBase64}}" alt="image" tappable>
<div (click)="openPreview(publication)" class="post-img">
<!-- <img src="{{publication.FileBase64}}" alt="image" tappable> -->
<video controls>
<source type="video/webm" src="data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8......jVOrhB9DtnVTrIMQTPc=">
<source type="video/mp4" src="data:video/mp4;base64,AAAAHGZ0eXBtcDQyAAAAAG1wNDJpc29....../l/L+X8v5AAAAMgfDg==">
</video>
</div>
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
<img src="/assets/icon/icon-no-image.svg" alt="image">
@@ -73,6 +73,7 @@ export class PublicationDetailPage implements OnInit {
console.log('console.log local storage')
this.publication = localPublication
console.log('Local publication',this.publication)
} else {
@@ -83,11 +84,13 @@ export class PublicationDetailPage implements OnInit {
this.publication = this.publicationPipe.itemList(res)
console.log('API pub', this.publication)
this.showLoader = false;
}, (error) => {
this.showLoader = false;
console.log(this.publication)
if(error.status == 404) {
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
}