Automattic / Automattic/jetpack

Audio Player Does Not Work with Infinite Scroll on Scrolled Pages

Open
#4,033 3 comments 0 reactions 0 assignees View on GitHub
[Feature] Infinite Scroll [Pri] Low Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

#### What I expected

When navigating a Jetpack-enabled site with infinite scroll turned on, and set to scroll infinitely, the audio player should play on all archive pages.
#### What happened instead

When navigating a Jetpack-enabled site with infinite scroll turned on, and set to scroll infinitely, the audio player does not play on subsequent scrolled archive pages, like, `sitename/page/2/`.
#### Steps to reproduce the issue

This appears to be because the right JavaScript isn't enqueued when posts are scrolled infinitely.
1. Create a post with an audio player embed. Publish it.
2. Create another post with an audio player embed. Publish it. Make sure it's on the second page of posts to ensure there are enough posts that infinite scroll has to load.
3. The first post with the player should work. The second post, dated older and with the player, should not work.

I was able to reproduce in Chrome and Firefox, on a WordPress.com site and a normal Jetpack site.

Sometimes it worked, and other times it did not.

Reproduced in a premium theme on WordPress.com and Twenty Sixteen on WordPress.com. Reproduced on Twenty Sixteen on a normal Jetpack site.

cc: @kraftbj since you helped test, and experienced the same behavior.

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.