Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Feedback
  3. Thumbnails grid url video

Thumbnails grid url video

Scheduled Pinned Locked Moved Feedback
3 Posts 2 Posters 34 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    ta_io
    wrote on last edited by
    #1

    It would be interesting to put an external URL in video thumbnails grid like one from Vimeo https://player.vimeo.com/ since the loading of videos is much faster.

    I'm trying with this script but it doesn't work at all

    <script>
    jQuery(document).ready(function() {
    var newVideoUrls = [
    // Video
    'https://player.vimeo.com/progressive_redirect/playback/929651530/rendition/1080p/file.mp4?loc=external&log_user=0&signature=43094fa43b31495020241416581fc9d0e435cbe0ba98802673cf86e9e7cb1211',
    // Video
    'https://player.vimeo.com/progressive_redirect/playback/843550565/rendition/1080p/file.mp4?loc=external&log_user=0&signature=59c985552b4e60df3819741c8df3f7e76aee3671dd4b88a07473eaeed6bb6542',
    // Video 3
    'https://player.vimeo.com/progressive_redirect/playback/981872045/rendition/2160p/file.mp4?loc=external&log_user=0&signature=985fc53ee963d4ab1b9770be6984a12b42c4ef8a3987895b1a0f38ebc3d9c690',
    // Video 4
    // ...
    ];

    jQuery('.thumb-collection .thumbnail-wrap video source').each(function(index) {
    if (index < newVideoUrls.length) {
    jQuery(this).attr({
    'data-src': newVideoUrls[index],
    'src': newVideoUrls[index]
    });
    }
    });
    });

    </script

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      you need to use newpageshown

      window.laytheme.on('newpageshown', function(){

      })

      instead of jquery document ready
      https://laytheme.com/documentation/custom-javascript.html#newpage-events

      1 Reply Last reply
      0
      • arminunruhA Offline
        arminunruhA Offline
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        the videos aspect ratio is determined by a .ph container that gets a padding bottom css. you might need to adapt this too

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        I also code custom websites or custom Lay features.
        šŸ’æ Email me here: šŸ’æ
        info@laytheme.com

        Before you post:
        1. When using a WordPress Cache plugin, disable it or clear your cache.
        2. Update Lay Theme and all Lay Theme Addons
        3. Disable all Plugins
        4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

        This often solves issues you might run into

        When you post:
        1. Post a link to where the problem is
        2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
        3. If the problem is difficult to explain, post screenshots / link to a video to explain it
        Online Users
        E
        ersc_
        swiftandeasyauS
        swiftandeasyau
        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
        laytheme.com
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Search