aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plugins
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2020-03-30 17:04:43 +1100
committerSam Potts <sam@potts.es>2020-03-30 17:04:43 +1100
commitd06881783d7c8a9faa5d902da5ec33bc74f3aa38 (patch)
tree9a38dd562153f9172c9e489546e92f7c039804dc /src/js/plugins
parentda943b384ca334cad66fd261cb9a0f924716da9d (diff)
downloadplyr-d06881783d7c8a9faa5d902da5ec33bc74f3aa38.tar.lz
plyr-d06881783d7c8a9faa5d902da5ec33bc74f3aa38.tar.xz
plyr-d06881783d7c8a9faa5d902da5ec33bc74f3aa38.zip
Formatting fixes
Diffstat (limited to 'src/js/plugins')
-rw-r--r--src/js/plugins/preview-thumbnails.js15
-rw-r--r--src/js/plugins/vimeo.js17
2 files changed, 22 insertions, 10 deletions
diff --git a/src/js/plugins/preview-thumbnails.js b/src/js/plugins/preview-thumbnails.js
index 290ce949..60033331 100644
--- a/src/js/plugins/preview-thumbnails.js
+++ b/src/js/plugins/preview-thumbnails.js
@@ -628,7 +628,10 @@ class PreviewThumbnails {
}
determineContainerAutoSizing() {
- if (this.elements.thumb.imageContainer.clientHeight > 20 || this.elements.thumb.imageContainer.clientWidth > 20) {
+ if (
+ this.elements.thumb.imageContainer.clientHeight > 20 ||
+ this.elements.thumb.imageContainer.clientWidth > 20
+ ) {
// This will prevent auto sizing in this.setThumbContainerSizeAndPos()
this.sizeSpecifiedInCSS = true;
}
@@ -640,10 +643,16 @@ class PreviewThumbnails {
const thumbWidth = Math.floor(this.thumbContainerHeight * this.thumbAspectRatio);
this.elements.thumb.imageContainer.style.height = `${this.thumbContainerHeight}px`;
this.elements.thumb.imageContainer.style.width = `${thumbWidth}px`;
- } else if (this.elements.thumb.imageContainer.clientHeight > 20 && this.elements.thumb.imageContainer.clientWidth < 20) {
+ } else if (
+ this.elements.thumb.imageContainer.clientHeight > 20 &&
+ this.elements.thumb.imageContainer.clientWidth < 20
+ ) {
const thumbWidth = Math.floor(this.elements.thumb.imageContainer.clientHeight * this.thumbAspectRatio);
this.elements.thumb.imageContainer.style.width = `${thumbWidth}px`;
- } else if (this.elements.thumb.imageContainer.clientHeight < 20 && this.elements.thumb.imageContainer.clientWidth > 20) {
+ } else if (
+ this.elements.thumb.imageContainer.clientHeight < 20 &&
+ this.elements.thumb.imageContainer.clientWidth > 20
+ ) {
const thumbHeight = Math.floor(this.elements.thumb.imageContainer.clientWidth / this.thumbAspectRatio);
this.elements.thumb.imageContainer.style.height = `${thumbHeight}px`;
}
diff --git a/src/js/plugins/vimeo.js b/src/js/plugins/vimeo.js
index 010cf5f7..8f999153 100644
--- a/src/js/plugins/vimeo.js
+++ b/src/js/plugins/vimeo.js
@@ -201,13 +201,16 @@ const vimeo = {
return speed;
},
set(input) {
- player.embed.setPlaybackRate(input).then(() => {
- speed = input;
- triggerEvent.call(player, player.media, 'ratechange');
- }).catch(() => {
- // Cannot set Playback Rate, Video is probably not on Pro account
- player.options.speed = [1];
- });
+ player.embed
+ .setPlaybackRate(input)
+ .then(() => {
+ speed = input;
+ triggerEvent.call(player, player.media, 'ratechange');
+ })
+ .catch(() => {
+ // Cannot set Playback Rate, Video is probably not on Pro account
+ player.options.speed = [1];
+ });
},
});