From e01d298e958cf8d2bec5516060f4fe8adf08b73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Mon, 5 Sep 2016 19:20:18 +0100 Subject: [PATCH 1/2] Compress poster image more to get it appear faster --- src/js/video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/video.js b/src/js/video.js index d8835e7..2cc7f07 100644 --- a/src/js/video.js +++ b/src/js/video.js @@ -26,7 +26,7 @@ function addEvents(video, events) { // use the image resizing service, if width supplied function updatePosterUrl(posterImage, width) { - let url = `https://image.webservices.ft.com/v1/images/raw/${encodeURIComponent(posterImage)}?source=o-video`; + let url = `https://image.webservices.ft.com/v1/images/raw/${encodeURIComponent(posterImage)}?source=o-video&quality=low`; if (width) { url += `&fit=scale-down&width=${width}`; } From 503eeea2168d52171c14e796d913cd210c1200a8 Mon Sep 17 00:00:00 2001 From: Jake Champion Date: Thu, 15 Sep 2016 15:59:25 +0100 Subject: [PATCH 2/2] Update video.test.js --- test/video.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/video.test.js b/test/video.test.js index 8a9ee25..a86fff2 100644 --- a/test/video.test.js +++ b/test/video.test.js @@ -377,7 +377,7 @@ describe('Video', () => { video.posterImage.should.equal( 'https://image.webservices.ft.com/v1/images/raw/' + 'https%3A%2F%2Fbcsecure01-a.akamaihd.net%2F13%2F47628783001%2F201502%2F2470%2F47628783001_4085962850001_MAS-VIDEO-AuthersNote-stock-market.jpg%3FpubId%3D47628783001' + - '?source=o-video&fit=scale-down&width=300' + '?source=o-video&quality=low&fit=scale-down&width=300' ); }); });