lightbox: Remove any video players when navigating thumbnails.

This commit is contained in:
Karl Stolley 2024-09-27 12:45:37 -05:00 committed by Tim Abbott
parent c36c561f07
commit b8037a9980
1 changed files with 3 additions and 0 deletions

View File

@ -647,6 +647,9 @@ export function initialize(): void {
});
$("#lightbox_overlay").on("click", ".image-list .image", function (this: HTMLElement) {
// Remove any video players so sound does not continue when
// navigating away from a video that might be playing
remove_video_players();
const $media_list = $(this).parent();
let $original_media_element;
const is_video = $(this).hasClass("lightbox_video");