Ratio improvements

This commit is contained in:
Sam Potts
2019-04-25 12:02:37 +10:00
parent f0d3e8c3b9
commit 7a4a7dece8
5 changed files with 33 additions and 32 deletions

View File

@ -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;