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