瀏覽代碼

Update controller.js

A-Circle Zhang 7 年之前
父節點
當前提交
59f4ce6bc8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/js/controller.js

+ 2 - 2
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);
             });
         }
     }