aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/utils.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-03-17 23:27:40 +1100
committerSam Potts <sam@potts.es>2018-03-17 23:27:40 +1100
commit5db73b13276bf50357cc98896421318de66ab042 (patch)
treeae7d43ee753035458e5927b66eb588ff26d58afd /src/js/utils.js
parent5cb1628cd8f9d58b97bf1bf774ff89f61ceb31d5 (diff)
downloadplyr-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.js1
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);
},