aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
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;