From 3ec7e6c76c92d08c66babfbf224c421cdb9c7691 Mon Sep 17 00:00:00 2001 From: Bobby Date: Fri, 27 May 2022 11:32:35 +0700 Subject: [PATCH] fix: responsive video.js audio waveform --- src/css/player.scss | 9 ++++++++- src/js/player.js | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/css/player.scss b/src/css/player.scss index 055b8a6..4582f50 100644 --- a/src/css/player.scss +++ b/src/css/player.scss @@ -9,5 +9,12 @@ } .video-js { - margin: 0 auto + margin: 0 auto; + + &.vjs-wavesurfer.vjs-fluid { + /* stylelint-disable-next-line selector-type-no-unknown */ + wave.vjs-wavedisplay { + height: calc(100% - 30px) !important + } + } } diff --git a/src/js/player.js b/src/js/player.js index 847430e..a37f885 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -114,7 +114,8 @@ page.reloadVideo = () => { if (isaudio) { options.plugins = { wavesurfer: { - backend: 'MediaElement' + backend: 'MediaElement', + responsive: true } } }