diff --git a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html
index b1188d8a..584b5781 100644
--- a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html
+++ b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html
@@ -41,10 +41,23 @@
[href]="activePhoto.gridMedia.getMediaPath()"
[download]="activePhoto.gridMedia.media.name"
class="dropdown-item">
- Download
+
+ Download
(shift + D)
+
+
+
+ Slideshow speed:
+
+
+
Show caption
@@ -83,7 +96,7 @@
+ role="menuitem">
Play videos
-
+
-
-
- {{selectedPlayBackDuration + 's'}}
-
-
-
-
+
diff --git a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts
index da5cf1d5..5040cb57 100644
--- a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts
+++ b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts
@@ -58,7 +58,7 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges {
public zoom = 1;
public playBackState: PlayBackStates = PlayBackStates.Paused;
public PlayBackStates = PlayBackStates;
- public playBackDurations = [2,5,10,15,20,30,60];
+ public playBackDurations = [2, 5, 10, 15, 20, 30, 60];
public selectedPlayBackDuration: number = null;
public controllersDimmed = false;
@@ -67,6 +67,7 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges {
public SearchQueryTypes = SearchQueryTypes;
public faceContainerDim = {width: 0, height: 0};
public searchEnabled: boolean;
+
private visibilityTimer: number = null;
private timer: Observable;
private timerSub: Subscription;
@@ -78,7 +79,7 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges {
public lightboxService: LightboxService,
public fullScreenService: FullScreenService,
private authService: AuthenticationService,
- private cookieService:CookieService
+ private cookieService: CookieService
) {
this.searchEnabled =
Config.Client.Search.enabled && this.authService.canSearch();
@@ -316,6 +317,10 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges {
} else {
this.cookieService.delete(CookieNames.playBackDuration);
}
+ if (this.playBackState === PlayBackStates.Play) {
+ this.pause();
+ this.play();
+ }
}
@HostListener('mousemove')
diff --git a/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts b/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts
index 95bdf917..ca63253e 100644
--- a/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts
+++ b/src/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.ts
@@ -132,6 +132,8 @@ export class GalleryLightboxMediaComponent implements OnChanges {
this.thumbnailSrc = null;
this.photo.src = null;
this.nextImage.src = '';
+ this.nextImage.onload = null;
+ this.nextImage.onerror = null;
this.mediaLoaded = false;
this.imageLoadFinished = {
this: false,
@@ -219,8 +221,16 @@ export class GalleryLightboxMediaComponent implements OnChanges {
} else {
this.nextImage.src = this.nextGridMedia.getMediaPath();
}
- this.nextImage.onload = () => this.imageLoadFinished.next = true;
+ this.nextImage.onload = () => this.imageLoadFinished.next = true;
+ this.nextImage.onerror = () => {
+ console.error('Cant preload:' + this.nextImage.src);
+ this.imageLoadFinished.next = true;
+ };
+
+ if (this.nextImage.complete) {
+ this.imageLoadFinished.next = true;
+ }
}
private loadPhoto(): void {