ampproject / ampproject/amphtml

[Story video] Optimize media play/pause operations on page navigation

Open
#29,508 2 comments 0 reactions 1 assignee Claimed by @gmajoulet View on GitHub
P1: High Priority Stale Type: Feature Request WG: stories
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Here's the timeline of what happens on story page navigation:

1. `touchstart` the active page video is paused
2. `touchend` the active page video is resumed
3. `click` event is emulated from the previous `touchend` and triggers a navigation, video is paused again

These 3 media operations should be just 1 operation from (1). Play/pause operations are fast on Android, but this improvement would make iOS page navigation noticeably faster.

cc @ampproject/wg-stories

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.