From dac1e624d1befa2d0fa7987d004d324bedac0965 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 21 Feb 2024 13:20:59 +0800 Subject: [PATCH] bugfix --- bricks/audio.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bricks/audio.js b/bricks/audio.js index d4437d7..13cef2f 100755 --- a/bricks/audio.js +++ b/bricks/audio.js @@ -38,6 +38,9 @@ bricks.AudioPlayer = class oops extends bricks.JsWidget { this.audio.src = url; console.log(this.audio.src,' new src seted'); } + play(){ + this.audio.play(); + } toggle_play(){ if (this.audio.paused){ this.audio.play(); @@ -45,6 +48,9 @@ bricks.AudioPlayer = class oops extends bricks.JsWidget { this.audio.pause(); } } + set_url(url){ + this.set_source(url); + } }