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

Media Overlays + scroll view: user-invoked scroll => playback shifts to visible element #57

Closed
danielweck opened this issue Jul 15, 2014 · 6 comments

Comments

@danielweck
Copy link
Member

This default behaviour can actually get really annoying, especially when users try to "look around" before or after the current playback position.

@danielweck
Copy link
Member Author

3 options when user "manually" scrolls the viewport:

  1. (default?) shift playback to "top-most" visible element
  2. continue playback even if active element is invisible (style highlight, but no "bring into view" scroll). Problem: users looses track of playback location (hard to find by just scrolling around), maybe switching back to option (1) is acceptable to bring back active element into view? ... but what if paused?)
  3. pause (user is required to explicitly resume ... but we then need new "pause/resume" logic in the MO engine, because right now the playback starts at the topmost visible element, not the preserved previously-paused location)

Side issue: this configurable user setting (preference dialog or top-level MO UI switch) may also impact paginated reflowable view (i.e. when switching page, obviously there is no "user scroll" interaction).

@danielweck
Copy link
Member Author

Related issue:
#58

@danielweck
Copy link
Member Author

For options (1) and (2) above:

https://github.com/readium/readium-shared-js/blob/develop/js/views/media_overlay_player.js#L1543

==> An additional condition is needed for call to reader.insureElementVisibility(), which in the case of the scroll view, results in:

https://github.com/readium/readium-shared-js/blob/develop/js/views/scroll_view.js#L1290

...and for the paginated view:

https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L718

...fixed layout view assume "always visible":

https://github.com/readium/readium-shared-js/blob/develop/js/views/fixed_view.js#L651

@danielweck
Copy link
Member Author

@dmitrym0
Copy link

The default behaviour seems reasonable if the assumed use case is to follow along with the text being read. I don't think I can actively listen and jump around the book.

@danielweck
Copy link
Member Author

Hi @dmitrym0, there is a high-importance feature request for use-case (2), namely: manual scroll to peek at content (e.g. image, diagrams) after or before currently-spoken text.
I have implemented the required feature in shared-js (with "ensure visibility" mechanism to restore visual position by using pause/play, or previous/next, or click-on-text, etc. (basically, anything other than just manually scrolling)):
78dfc8e

Note that there is no js-viewer UI yet to control this option.

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

No branches or pull requests

2 participants