readium/r2-navigator-swift

HTML <media> elements keep playing after turning pages

mickael-menu opened this issue · 1 comments

When turning an EPUB's pages with <media> elements playing, the playback is not interrupted. It keeps going until the page is destroyed which can take 2 additional page turns for FXL.

/// Number of positions (as in `Publication.positionList`) to preload before the current page.
public var preloadPreviousPositionCount = 2
/// Number of positions (as in `Publication.positionList`) to preload after the current page.
public var preloadNextPositionCount = 6

Two questions:

  • Should we interrupt playback when navigating to another resource? (I think so)
  • Should we interrupt playback in a single reflowable resource, when the element is out of screen? (I'm not so sure)

Duplicate of readium/swift-toolkit#121, didn't notice before.