Get Vimeo thumbnail for video using jQuery

前端 未结 4 851
长发绾君心
长发绾君心 2021-02-04 15:19

I\'ve found similar questions but none of the answers show clearly and easily how to get a thumbnail for a vimeo video using jQuery and JSON. If anyone can help that would be gr

4条回答
  •  甜味超标
    2021-02-04 16:04

    With the updated API, it would be...

    $.getJSON('https://vimeo.com/api/oembed.json?url=https://vimeo.com/' + id, {format: "json"}, function(data) {
      $(".thumbs").attr('src', data.thumbnail_url)
    });
    

提交回复
热议问题