diff options
author | Sam Potts <sam@potts.es> | 2019-01-14 00:33:48 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2019-01-14 00:33:48 +1100 |
commit | 6782737009bec028b393dbfb8c9897cd0c6df48f (patch) | |
tree | b60c7a6bce9d78e9b8b3244c254fc4e234b0165c /src/js/plugins/youtube.js | |
parent | 6be125db8762c7ee8d29282ff5bcd08e6bcee042 (diff) | |
download | plyr-6782737009bec028b393dbfb8c9897cd0c6df48f.tar.lz plyr-6782737009bec028b393dbfb8c9897cd0c6df48f.tar.xz plyr-6782737009bec028b393dbfb8c9897cd0c6df48f.zip |
Fullscreen fixes
Diffstat (limited to 'src/js/plugins/youtube.js')
-rw-r--r-- | src/js/plugins/youtube.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/js/plugins/youtube.js b/src/js/plugins/youtube.js index 0cc8fd1d..9d47aa53 100644 --- a/src/js/plugins/youtube.js +++ b/src/js/plugins/youtube.js @@ -10,6 +10,7 @@ import is from '../utils/is'; import loadImage from '../utils/loadImage'; import loadScript from '../utils/loadScript'; import { format, generateId } from '../utils/strings'; +import { setAspectRatio } from '../utils/style'; // Parse YouTube ID from URL function parseId(url) { @@ -38,7 +39,7 @@ const youtube = { toggleClass(this.elements.wrapper, this.config.classNames.embed, true); // Set aspect ratio - youtube.setAspectRatio.call(this); + setAspectRatio.call(this); // Setup API if (is.object(window.YT) && is.function(window.YT.Player)) { @@ -98,12 +99,6 @@ const youtube = { } }, - // Set aspect ratio - setAspectRatio() { - const ratio = this.config.ratio.split(':'); - this.elements.wrapper.style.paddingBottom = `${100 / ratio[0] * ratio[1]}%`; - }, - // API ready ready() { const player = this; |