diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index befbc43ad6..f7829efd56 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -345,7 +345,9 @@ h1 .imageLink { } .page > .ui-content { - padding-bottom: 120px; + + /* Need this so that the audio player doesn't cover content, but also for unveil lazy loading. */ + padding-bottom: 160px; } .dashboardPanelDivider { diff --git a/dashboard-ui/thirdparty/mediabrowser.apiclient.js b/dashboard-ui/thirdparty/mediabrowser.apiclient.js index 1e22291559..7cc266da0d 100644 --- a/dashboard-ui/thirdparty/mediabrowser.apiclient.js +++ b/dashboard-ui/thirdparty/mediabrowser.apiclient.js @@ -2122,6 +2122,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; + function supportsWebP() { + + // TODO: Improve with http://webpjs.appspot.com/ + return $.browser.chrome || $.browser.android; + } + function normalizeImageOptions(options) { var ratio = window.devicePixelRatio || 1; @@ -2147,6 +2153,10 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi } options.quality = options.quality || (options.type.toLowerCase() == 'backdrop' ? 80 : 90); + + if (supportsWebP()) { + options.format = 'webp'; + } } /** @@ -2220,6 +2230,10 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi delete options.type; delete options.index; + if (supportsWebP()) { + options.format = 'webp'; + } + return self.getUrl(url, options); };