diff options
author | Jesús <heckyel@hyperbola.info> | 2021-08-09 15:50:18 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-08-09 15:50:18 -0500 |
commit | de51411ce53e253b27e059d9fae1f80efb937203 (patch) | |
tree | 6d8d58200f4cf5a9e2a0e55343dee4746392d116 /src/js | |
parent | 7e2288304cda304a187c4fc01c2fed12eeed22c8 (diff) | |
download | plyr-de51411ce53e253b27e059d9fae1f80efb937203.tar.lz plyr-de51411ce53e253b27e059d9fae1f80efb937203.tar.xz plyr-de51411ce53e253b27e059d9fae1f80efb937203.zip |
[general]: fix w3c change 'size' to 'data-res'
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/html5.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/html5.js b/src/js/html5.js index 0cb5b27a..ab796234 100644 --- a/src/js/html5.js +++ b/src/js/html5.js @@ -39,7 +39,7 @@ const html5 = { // Get sizes from <source> elements return html5.getSources .call(this) - .map((source) => Number(source.getAttribute('size'))) + .map((source) => Number(source.getAttribute('data-res'))) .filter(Boolean); }, @@ -66,7 +66,7 @@ const html5 = { const source = sources.find((s) => s.getAttribute('src') === player.source); // Return size, if match is found - return source && Number(source.getAttribute('size')); + return source && Number(source.getAttribute('data-res')); }, set(input) { if (player.quality === input) { @@ -80,7 +80,7 @@ const html5 = { // Get sources const sources = html5.getSources.call(player); // Get first match for requested size - const source = sources.find((s) => Number(s.getAttribute('size')) === input); + const source = sources.find((s) => Number(s.getAttribute('data-res')) === input); // No matching source found if (!source) { |