Skip to content
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

Refactor slideshow.js #967

Merged
merged 8 commits into from
Apr 4, 2020
Merged

Conversation

heyhippari
Copy link
Contributor

@heyhippari heyhippari commented Mar 21, 2020

Changes

Refactors slideshow.js to use standard features of Swiper where applicable.

  • Now uses virtual slides, only loading three items at a time (Current, previous and next), and preloads images (Better memory usage and performance for large libraries, as well as nicer experience).
  • Handle previous/next keyboard navigation using Swiper itself
  • Support play and pause keyboard inputs
  • Use the full resolution image
  • Disable autoplay by default except on Chromecast
  • Use Swiper itself to bind events to the next/previous arrows
  • Remove dead code and useless cruft

As a result of using virtual slides, looping had to be disabled.

Issues

Fixes #915
Fixes #918

@heyhippari heyhippari marked this pull request as ready for review March 22, 2020 14:52
@heyhippari heyhippari requested a review from a team March 25, 2020 21:26
@nielsvanvelzen
Copy link
Member

Related feature request

Copy link
Contributor

@dmitrylyzo dmitrylyzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In TV layout, left/right keys move focus and switch slides simultaneously.

Not related
Dialogs are broken when you use browser's Back. After switch to new page.js, dialogs do not use history.

Copy link
Contributor

@JustAMan JustAMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YOLO

Copy link
Contributor

@dmitrylyzo dmitrylyzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loop is somehow works, but first slide moves from left to right.

Edit:
in autoplay mode only

@JustAMan JustAMan added the merge conflict Conflicts prevent merging label Apr 4, 2020
@JustAMan JustAMan removed the merge conflict Conflicts prevent merging label Apr 4, 2020
@JustAMan JustAMan merged commit 04fa770 into jellyfin:master Apr 4, 2020
@ghost
Copy link

ghost commented Apr 5, 2023

I know this has been closed issue. However, during the refactoring of the code we forgot to do one important thing. Give end User ability to change slideshow timing. Its currently 3000ms. This is way, way too short. Can we make it User programable? Part fo the settings or config? This is way overdue.

@thornbill thornbill mentioned this pull request Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add feature - photos library - forward / backward - arrow keyboard Rewrite the photo slideshow
5 participants