-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(web): slideshow ascending order when video has ended #8024
Conversation
Deploying immich with
|
Latest commit: |
b96a07d
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a8da99fd.immich.pages.dev |
Branch Preview URL: | https://fix-slideshow-video.immich.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
||
const handleCanPlay = async (event: Event) => { | ||
try { | ||
const video = event.currentTarget as HTMLVideoElement; | ||
video.muted = true; | ||
await video.play(); | ||
video.muted = false; | ||
dispatch('onVideoStarted'); | ||
if (onVideoStart) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious, does onVideoStart ?? onVideoStart()
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would want to do onVideoStart && onVideoStart()
and that should work, yea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really it should just be onVideoStart?.()
2f5d2ae
to
1feb877
Compare
$slideshowNavigation === SlideshowNavigation.AscendingOrder | ||
? await navigateAsset('previous') | ||
: await navigateAsset('next'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Man, I really dislike this. We're adding more duplicate code everywhere and the asset-viewer is even more coupled to the slideshow functionality than it was before. The component should only be in charge of rendering an asset, not managing all this unrelated state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved everything to navigateAsset
4436bd5
to
b96a07d
Compare
When video has ended, the slideshow order is not respected. This PR fix it.