diff options
author | Sam Potts <sam@potts.es> | 2018-03-17 23:27:40 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-03-17 23:27:40 +1100 |
commit | 5db73b13276bf50357cc98896421318de66ab042 (patch) | |
tree | ae7d43ee753035458e5927b66eb588ff26d58afd /src/js/utils.js | |
parent | 5cb1628cd8f9d58b97bf1bf774ff89f61ceb31d5 (diff) | |
download | plyr-5db73b13276bf50357cc98896421318de66ab042.tar.lz plyr-5db73b13276bf50357cc98896421318de66ab042.tar.xz plyr-5db73b13276bf50357cc98896421318de66ab042.zip |
Added buffered getter
Diffstat (limited to 'src/js/utils.js')
-rw-r--r-- | src/js/utils.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/js/utils.js b/src/js/utils.js index 4958627b..37dd6461 100644 --- a/src/js/utils.js +++ b/src/js/utils.js @@ -671,6 +671,7 @@ const utils = { if (current === 0 || max === 0 || Number.isNaN(current) || Number.isNaN(max)) { return 0; } + return (current / max * 100).toFixed(2); }, |