From f2c3ad98c32f7902cd59d1e6ac2a867698107c7e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 5 Oct 2025 18:40:29 +0800 Subject: [PATCH] bugfix --- bricks/svg.js | 28 ++++++++++------------------ bricks/videoplayer.js | 14 -------------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/bricks/svg.js b/bricks/svg.js index e4f1e2f..92a7e40 100644 --- a/bricks/svg.js +++ b/bricks/svg.js @@ -4,9 +4,7 @@ bricks.Svg = class extends bricks.VBox { options:{ rate: url: - blink:false color:* - blinkcolor:* blinktime:* } */ @@ -20,9 +18,6 @@ bricks.Svg = class extends bricks.VBox { if (! this.color) { this.color = bricks.app.get_color(); } - if (!this.blinkcolor){ - this.blinkcolor = bricks.app.get_bgcolor() - } if (opts.url){ this.set_url(opts.url); } @@ -39,7 +34,7 @@ bricks.Svg = class extends bricks.VBox { if (svgText.startsWith("
-
- -
@@ -51,7 +48,6 @@ bricks.VideoPlayer = class extends bricks.VBox { this.playPauseBtn = this.controls.querySelector('.play-pause'); this.muteBtn = this.controls.querySelector('.mute'); this.volumeInput = this.controls.querySelector('.volume'); - this.progressBar = this.controls.querySelector('.progress-bar'); this.timeDisplay = this.controls.querySelector('.time'); this.speedSelect = this.controls.querySelector('.playback-speed'); this.audioTrackSelect = this.controls.querySelector('.audio-track-select'); @@ -151,12 +147,6 @@ bricks.VideoPlayer = class extends bricks.VBox { this.updateMuteUI(); }); - // 进度条拖动 - this.progressBar.addEventListener('input', (e) => { - const time = e.target.value * this.video.duration; - this.video.currentTime = time; - }); - // 播放速度 this.speedSelect.addEventListener('change', (e) => { this.video.playbackRate = parseFloat(e.target.value); @@ -212,9 +202,6 @@ bricks.VideoPlayer = class extends bricks.VBox { this.video.addEventListener('loadedmetadata', () => { this.updateAudioTracks(); }); - this.video.addEventListener('seeking', () => { - this.progressBar.value = this.video.currentTime / this.video.duration; - }); } updateUI() { @@ -234,7 +221,6 @@ bricks.VideoPlayer = class extends bricks.VBox { updateProgress() { const percent = this.video.duration ? this.video.currentTime / this.video.duration : 0; - this.progressBar.value = percent; this.timeDisplay.textContent = `${this.formatTime(this.video.currentTime)} / ${this.formatTime(this.video.duration || 0)}`; }