aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2019-04-25 12:02:37 +1000
committerSam Potts <sam@potts.es>2019-04-25 12:02:37 +1000
commit7a4a7dece8538b1ff23d9155d882bda01c7940ee (patch)
treef944d7a1b857ed019b172884baa16020b4c36250 /src/js/plyr.js
parentf0d3e8c3b95886f64ef5216a665f5644929359b6 (diff)
downloadplyr-7a4a7dece8538b1ff23d9155d882bda01c7940ee.tar.lz
plyr-7a4a7dece8538b1ff23d9155d882bda01c7940ee.tar.xz
plyr-7a4a7dece8538b1ff23d9155d882bda01c7940ee.zip
Ratio improvements
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index be1cba4b..e81e073e 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -894,6 +894,10 @@ class Plyr {
* Get the current aspect ratio in use
*/
get ratio() {
+ if (!this.isVideo) {
+ return null;
+ }
+
const ratio = reduceAspectRatio(getAspectRatio.call(this));
return is.array(ratio) ? ratio.join(':') : ratio;