This commit is contained in:
Peter Maquiran
2023-12-13 19:08:44 +01:00
parent 79fe69c6aa
commit 9e4d5dbf82
4 changed files with 31 additions and 3 deletions
@@ -52,7 +52,7 @@
[lazyLoad]="'data:image/jpg;base64,' + files.FileBase64">
<video #videoElement [appVisibility]="onVisibilityChange" *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'video'" class="post-video" controls="controls" preload="metadata"
webkit-playsinline="webkit-playsinline" (play)="stopvideoService.registerVideoWithEvent($event)">
webkit-playsinline="webkit-playsinline" (play)="stopvideoService.registerVideoWithEvent($event)" (click)="preventVideoPlay($event)">
<source src="{{'data:video/mp4;base64,' + files.FileBase64}}" type="video/mp4">
</video>
@@ -323,6 +323,16 @@ export class ViewPublicationsPage implements OnInit {
}
preventVideoPlay(event: Event): void {
// Prevent the default behavior of the click event (which is to play the video)
event.preventDefault();
// You may also want to stop the propagation of the event to prevent any parent click handlers
//event.stopPropagation();
// Optionally, you can add additional logic here
}
async viewPublicationDetail(DocumentId: string) {
// alert('nice');
const modal = await this.modalController.create({