From 59f4ce6bc82e899e53a3d5317cae5ddf4134478f Mon Sep 17 00:00:00 2001 From: A-Circle Zhang Date: Sat, 29 Sep 2018 12:07:59 +0800 Subject: [PATCH] Update controller.js --- src/js/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/controller.js b/src/js/controller.js index 52eecb5..f398891 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -85,13 +85,13 @@ class Controller { if (this.player.options.video.thumbnails) { this.thumbnails = new Thumbnails({ container: this.player.template.barPreview, - barWrap: this.player.template.barWrap, + barWidth: this.player.template.barWrap.offsetWidth, url: this.player.options.video.thumbnails, events: this.player.events }); this.player.on('loadedmetadata', () => { - this.thumbnails.resize(160, this.player.video.videoHeight / this.player.video.videoWidth * 160); + this.thumbnails.resize(160, this.player.video.videoHeight / this.player.video.videoWidth * 160, this.player.template.barWrap.offsetWidth); }); } }