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
@@ -347,6 +347,24 @@ 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
const videoElement: HTMLVideoElement = event.target as HTMLVideoElement;
videoElement.pause()
}
stopVideo() {
var videos = document.querySelectorAll('video');