From 41b9ab956c95045d9ea01d11adc0c4fd3978e4e7 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Sat, 15 May 2021 21:25:03 +0200 Subject: [PATCH] Replace vimeo meta data api Vimeo deprecated the v2 api and recommends to use https://developer.vimeo.com/api/oembed/videos Signed-off-by: Tilman Vatteroth --- public/js/extra.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/extra.js b/public/js/extra.js index c71475b50..099831ee6 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -294,14 +294,14 @@ export function finishView (view) { imgPlayiframe(this, '//player.vimeo.com/video/') }) .each((key, value) => { + const vimeoLink = `https://vimeo.com/${$(value).attr('data-videoid')}` $.ajax({ type: 'GET', - url: `//vimeo.com/api/v2/video/${$(value).attr('data-videoid')}.json`, + url: `https://vimeo.com/api/oembed.json?url=${encodeURIComponent(vimeoLink)}`, jsonp: 'callback', dataType: 'jsonp', success (data) { - const thumbnailSrc = data[0].thumbnail_large - const image = `` + const image = `` $(value).prepend(image) if (window.viewAjaxCallback) window.viewAjaxCallback() }