From c9055f391b3782d96d16fb6efa4337dc90120635 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Sat, 1 Jun 2019 18:45:07 +1000 Subject: Linting changes --- src/js/html5.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/js/html5.js') diff --git a/src/js/html5.js b/src/js/html5.js index 34f0c391..e538e922 100644 --- a/src/js/html5.js +++ b/src/js/html5.js @@ -52,7 +52,7 @@ const html5 = { get() { // Get sources const sources = html5.getSources.call(player); - const source = sources.find(source => source.getAttribute('src') === player.source); + const source = sources.find(s => s.getAttribute('src') === player.source); // Return size, if match is found return source && Number(source.getAttribute('size')); @@ -60,9 +60,8 @@ const html5 = { set(input) { // Get sources const sources = html5.getSources.call(player); - // Get first match for requested size - const source = sources.find(source => Number(source.getAttribute('size')) === input); + const source = sources.find(s => Number(s.getAttribute('size')) === input); // No matching source found if (!source) { -- cgit v1.2.3 From 97d9228bed639f0c20b1f21468dd3f181af6b262 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 3 Jun 2019 20:13:16 +1000 Subject: Aspect ratio tweaks --- src/js/html5.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/js/html5.js') diff --git a/src/js/html5.js b/src/js/html5.js index e538e922..b03e9c26 100644 --- a/src/js/html5.js +++ b/src/js/html5.js @@ -44,8 +44,10 @@ const html5 = { const player = this; - // Set aspect ratio if set - setAspectRatio.call(player); + // Set aspect ratio if fixed + if (!is.empty(this.config.ratio)) { + setAspectRatio.call(player); + } // Quality Object.defineProperty(player.media, 'quality', { -- cgit v1.2.3