Automattic / Automattic/jetpack
Audio Player Does Not Work with Infinite Scroll on Scrolled Pages
- 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
Assessment
This issue has not been assessed yet.