Problem/Motivation
I have a Drupal view of videos which are displayed on a page using the OEmbed Lazyload widget. The first page of items displays just fine and operates as expected. The videos lazyload in as you scroll down and clicking on the videos triggers the video to play. However, upon moving to any of the other pages using the pager the videos no longer appear to lazyload and instead appear to already be loaded and upon clicking them you get redirected to the youtube website.
Steps to reproduce
Create a few media entities of type video and set display to use the oembed lazyload widget.
Create view of media entities of type video and set number of items to be less than total number of media entities.
Add pager and turn on use ajax.
Go to view and observe desired behavior on furst page.
Use pager and then observe buggy behaviour thereafter.
Proposed resolution
Not sure what the proposed resolution will be just yet but I will be taking a look.
Remaining tasks
N/A
User interface changes
N/A
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3268187-ajax-io-issue.patch | 5.88 KB | luke.leber |
Issue fork oembed_lazyload-3268187
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
d.fisher commentedComment #3
luke.leberHi Darren, thanks for the bug report. I think that I see the problem.
If I'm correct, this means that the scope of this issue includes any implementations that:
Luckily, this seems like a relatively easy fix! All we have to do is skip the intersection observer creation part of the javascript instead of returning from the method entirely. I'll try to get a patch ready for testing either today or tomorrow.
Comment #5
luke.leberAttached patch for testing convenience - the MR contains the canonical work.
Comment #6
luke.leberComment #8
luke.leberGiven this has been in NR status for 4 months, I'm going to merge this in and cut a 1.0.0 stable release.
Thank you for your contribution!