ressio / lazy-load-xt

Lazy load XT is a jQuery plugin for images, videos and other media
http://ress.io/lazy-load-xt-jquery/
MIT License
1.36k stars 243 forks source link

Lazy-load-xt + plyr #117

Open parknenok opened 6 years ago

parknenok commented 6 years ago

lazy load xt doesn't change data-src when using plyr script rendered code below

<figure class="reveal-testi">
<div tabindex="0" class="plyr plyr--video plyr--fullscreen-enabled plyr--stopped plyr--ready"><div class="plyr__video-wrapper" style="cursor: pointer;"><div class="plyr__captions"></div><video class="rarejob-story plyr--setup" data-poster="https://d1atgierv9op2.cloudfront.net/ph/assets/jpg/tutor-img-230.jpg" preload="none">
<source data-src="https://d1atgierv9op2.cloudfront.net/ph/assets/video/tutor-vid-015.mp4" type="video/mp4">
</video></div><button type="button" data-plyr="play" class="plyr__play-large" aria-label="Play"><svg><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#plyr-play"></use></svg><span class="plyr__sr-only">Play</span></button><div class="plyr__controls"><button type="button" data-plyr="fullscreen" aria-pressed="false"><svg class="icon--exit-fullscreen"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#plyr-exit-fullscreen"></use></svg><svg><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#plyr-enter-fullscreen"></use></svg><span class="plyr__sr-only">Toggle Fullscreen</span></button></div></div>
<div class="figure-name"><h2>ChelMac</h2><span>TUTOR</span></div>
<figcaption>
<div class="testimontial">
<p>[The students] are very appreciative of the lesson. They would really value and treasure what you do for them.</p>
</div>
<a onclick="_gaq.push([&quot;_trackEvent&quot;, &quot;Homepage - Life With RareJob&quot;, &quot;Click&quot;, &quot;View More button&quot;]);" href="/site/life_with_rarejob#chelmac">View more</a></figcaption>
</figure>

original code

<div class="tutor-testi grid">
<figure class="reveal-testi">
<video class="rarejob-story" data-poster="<?php echo RJ_Static::URL_ASSETS_JPG;?>tutor-img-230.jpg" preload="none">
<source data-src="<?php echo RJ_Static::URL_ASSETS_VID . 'tutor-vid-015.mp4'; ?>" type="video/mp4">
</video>
<div class="figure-name"><h2>ChelMac</h2><span>TUTOR</span></div>
<figcaption>
<div class="testimontial">
<p>[The students] are very appreciative of the lesson. They would really value and treasure what you do for them.</p>
</div>
janstieler commented 5 years ago

Hi, have the same problem. Can anyone help?